Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Regi
 
Posts: n/a
Default How do I write my formula to automatically regenerate a RAND () i.

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.
  #2   Report Post  
JE McGimpsey
 
Posts: n/a
Default

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


In article ,
"Regi" wrote:

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.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
formula to have each new invoice automatically have the next numb Jacqui Excel Discussion (Misc queries) 1 January 15th 05 07:12 PM
How can I write an if-then formula for 0 or less than 0 in cell t. Baz1 Excel Worksheet Functions 1 November 30th 04 04:33 PM
Cell doesn't show formula result - it shows formula (CTRL + ' doe. o0o0o0o Excel Worksheet Functions 6 November 19th 04 03:13 PM
How do I write a formula to subtract a # from a total ONLY if the. JP Excel Worksheet Functions 2 November 17th 04 12:32 AM
write a formula to sum cells on different pages of the same workb. Kestle Excel Worksheet Functions 1 November 8th 04 07:53 PM


All times are GMT +1. The time now is 02:51 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"