Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
random number generation: loop
Hello,
I am trying to do a simulation. I have many random numbers (rand()) within my spreadsheet. Right now, I keep hitting F9 until I get a certain set of numbers tha meets some conditions I have. I would like to know how to program a loop that essentially recalcs th spreadsheet (just like hitting F9 over and over again) until a certai cell value is less than a certain numerical value. Additionally, I want many sets of random numbers that fit this criteri (otherwise, I could hit F9 until I get one set and then just quit). S I need something I can "run" repeatedly. Any help would be vastly appreciated -- Message posted from http://www.ExcelForum.com |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
random number generation: loop
Nick,
Suppose the randomly filled cell = A1 , this routine will run until the value of this cell < the value you specify ( fill in for ???) Mind however that this routine might end up in an endless loop if you don't choose your conditionvalue carefull !!! Sub RunTillCondition() ConditionValue = ??? While Cells(1, 1) = ConditionValue Calculate Wend End Sub -- Regards, Auk Ales * Please reply to this newsgroup only * * I will not react on unsolicited e-mails * "NickC " wrote in message ... Hello, I am trying to do a simulation. I have many random numbers (rand()) within my spreadsheet. Right now, I keep hitting F9 until I get a certain set of numbers that meets some conditions I have. I would like to know how to program a loop that essentially recalcs the spreadsheet (just like hitting F9 over and over again) until a certain cell value is less than a certain numerical value. Additionally, I want many sets of random numbers that fit this criteria (otherwise, I could hit F9 until I get one set and then just quit). So I need something I can "run" repeatedly. Any help would be vastly appreciated ! --- Message posted from http://www.ExcelForum.com/ |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
random number generation: loop
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
RANDOM NUMBER GENERATION. | Excel Worksheet Functions | |||
Help for Random Number Generation | Excel Worksheet Functions | |||
random number generation | Excel Worksheet Functions | |||
random number generation | Excel Worksheet Functions | |||
I need help with random number generation | Excel Worksheet Functions |