looping through range

  • Thread starter Thread starter john.9.williams
  • Start date Start date
J

john.9.williams

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
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top