Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello. I'd like to use a Random number generator to provide a number
from 1 to 6. I would then have the result 'posted' to cell "B2". If the result is a 6, I would have another random number from 1 to 6 generated that would be 'posted' to cell "B3" (offset B2 by 1). This would continue on as long as the result comes back to be 6 for each new random number. (Does that make sense) If the results are anything but 6, then the chain would end. Result 1 = 6 (Cell B2 = 6) new Random Generated number for cell B3 (Result 2) Result 2 = 6 (Cell B3 = 6) new Random Generated number for cell B4 (Result 3) Result 3 = 6 (cell B4 = 6) " " and so on and so forth. Sorry for the repetitiveness of the data. I wanted to make sure it was clear. Thanks for any assistance. Paul |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
In this example, Rnd will result in a number between 0 and 1, so to ge
a single random digit you must multiply by 10, so to get a numbe between 1 and 6 you'll have to multiply by 7. Randomize For x = 1 To 5 MyValue = Int(Rnd * 10) Cells(x, 1).Value = MyValue Next x - Piku -- Message posted from http://www.ExcelForum.com |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Sorting random Data created from a random formula | Excel Discussion (Misc queries) | |||
random 3 out of many | Excel Discussion (Misc queries) | |||
Non-random numbers generated by excel's data analysis random gener | Excel Worksheet Functions | |||
Non-random numbers generated by excel's data analysis random gener | Excel Discussion (Misc queries) | |||
How do I find random number in list of random alpha? (Position is. | Excel Discussion (Misc queries) |