View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Jo[_2_] Jo[_2_] is offline
external usenet poster
 
Posts: 69
Default Help with macro?

Here is the macro code:

Dim SCell As Integer

Do Until SCell.Value = 1
If SCell.Value < 1 Then

Range("J24").Select
Calculate
End If
Loop

where SCell checks a condition like this: "if(A2A3,1,0)" and A2 has
RAND in it so everytime sheet is calculated by changing RAND, SCell's
condition is checked. The macro's loop might runs one time or 500
times but it must stop when SCell=1

Thanks,
Jo