View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
dan dungan dan dungan is offline
external usenet poster
 
Posts: 411
Default Help with macro?

I put RAND in A2, 3 in A3, and =IF(A2A3,1,0) in J24. SCell value
remains at 0. It appears never to reach 1.


On Oct 4, 10:38 am, Jo wrote:
On Oct 4, 1:28 pm, "Bob Phillips" wrote:



Probably should be


Dim SCell As Integer


Do Until Activeell.Value = 1
If Activecell.Value < 1 Then


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


--
HTH


Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)


"Jo" wrote in message


oups.com...


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- Hide quoted text -


- Show quoted text -


It is working but it is NOT stopping when SCell is 1?! What could be
missing?