Looping till value is 1?

J

Jo

How can I make this loop correct:


Dim SCell As Range

Do
Range("J24").Select
Calculate
Loop Until SCell.Value = 1

where SCell has a formula like this "if(c5>c11,1,0)"

Thanks,
Jo
 
D

Dave O

Is that the entire code? It looks like it would loop infinitely unless
c5 or c11 change, somehow.
 
J

Jo

Is that the entire code? It looks like it would loop infinitely unless
c5 or c11 change, somehow.

Yes, they do change as they have random number built in them......
 

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

Top