Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / March 2008

Tip: Looking for answers? Try searching our database.

looping through range

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
john.9.williams@bt.com - 25 Mar 2008 14:55 GMT
I have a range withing a list, i wish to loop throught the range
without activating the cells and in each blank cell put todays date
in. I am using a do loop but I am struggling, possible need a for loop
but I am not to good on these, any advice much grateful

John
Mike H - 25 Mar 2008 15:06 GMT
Hi,

There are several ways of which this one may meet your needs

Sub versive()
Set myrange = Range("A1:A10") 'Change to suit
For Each c In myrange
   If IsEmpty(c) Then
   c.Value = Date
   End If
Next
End Sub

Mike

> I have a range withing a list, i wish to loop throught the range
> without activating the cells and in each blank cell put todays date
> in. I am using a do loop but I am struggling, possible need a for loop
> but I am not to good on these, any advice much grateful
>
> John
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.