Computer Learning Zone CLZ Access Excel Word Windows

For me, it is far better to grasp the Universe as it really is than to persist in delusion, however satisfying and reassuring.

-Carl Sagan
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to Excel Forum    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Loops are my Nemisis
Gary 

12 years ago
OK here is what I am trying to do now, I have a calendar workbook with worksheets by month. I have 3 rows 1st row has day of month, second has weekday of month and third contains a number 1-4 indicating what duty section have duty that day. Now I added a blank 4th row and what I am trying to do is fill in the 4th row based on criteria from rows 2 and 3. To get this to work I was trying to use the offset command move around cells to set and retrieve values however I cannot seem to get it to work. I just dont know how to maneuver around within the loop. I am also going to have more if statements but for now if i can get this one to work I can get the rest.

My poor example

Dim singlecell As Range
Dim listofcells As Range
Set listofcells = Range("E7", Range("F7").End(xlToRight))
For Each singlecell In listofcells

If singlecell.Value = 1 and offset(singlecell.address,-2,0) ="FRI" then

offset(singlecell.address,1,0) = "duty"
offset(singlecell.address,1,0 = "Off"
offset(singlecell.address,1,0= "Off"
offset(singlecell.address,0,3)= "dog"
  

End If
Next singlecell

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Excel Forum.
 

Next Unseen

 
New Feature: Comment Live View
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 5/17/2026 7:44:08 PM. PLT: 1s