How do I write my formula to automatically regenerate a RAND () i.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have developed a formula to generate a random number between 0 and 1, (RAND
()). I take the product and apply some additional calculations. At a later
step, (step 4) I want the program to automatically regenerate a new random
number if a condition has not been met, (in my case, if W is >1). Nothing I
try seems to work. I always get hung up on the automatic part. Any ideas?
Thank you very much.
 
What is "step 4" referring to. Is "the program" a VBA program? If so,
something like this should work:

Assume cell A1 contains the random reference, and you get your W value
from cell A2.

Do Until W > 1
Range("A1").Calculate
W = Range("A2").Value
Loop
 
Back
Top