Link to home
Start Free TrialLog in
Avatar of slattbr
slattbr

asked on

Loop until Cell is empty

I am having trouble with a simple do/loop.  I want to loop until there is no value in the cell in column C.  Here is what I currently have:

Counter = 2
 
 Do
 Range("D" & Counter).Select
 Range("D" & Counter) = Range("Change!C9")
 Counter = Counter + 1
 Loop While ("C" & Counter) <> Null


This results in the first cell 'D2' being filled in but no other cells in row D.

I have tried Loop Until- this results in a never ending loop.  I have also tried
Loop While ("C" & Counter) <> ""- this results in a never ending loop.


Can anyone tell me what I am doing wrong.
ASKER CERTIFIED SOLUTION
Avatar of Data-Man
Data-Man
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of slattbr
slattbr

ASKER

Entered

 Do While Range("C" & Counter) <> ""
 
 Range("D" & Counter).Select
 Range("D" & Counter) = Range("Change!C9")
 Counter = Counter + 1
 Loop

and worked perfectly.

thanks mike
you are welcome....Mike