Loop till value changes

  • Thread starter Thread starter Ruben
  • Start date Start date
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!
 
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
 
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
 

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