Loop till value changes

R

Ruben

I am making a code in visual basic that has to loop till the value in column
C changes. But I don't know how I can put in the code "loop till value in
column C changes". Would be great if someone could help me! Thanks!
 
B

Bob Phillips

i = 2

Do While Cells(i, "C").Value = Cells(i - 1, "C").Value

i = i + 1
Loop

on exit, Cells(i, "C") will point at the changed cell
 
R

Ruben

Bob, thanks for your reaction!

Ruben


Bob Phillips said:
i = 2

Do While Cells(i, "C").Value = Cells(i - 1, "C").Value

i = i + 1
Loop

on exit, Cells(i, "C") will point at the changed cell

--
__________________________________
HTH

Bob
 
Top