![]() |
Generate random number from a list
I have a list in cell A2:A300. There are not just integer values. Is there a
way to generate random values from that list even though some of the number have decimals? |
Generate random number from a list
Tools - Add-ins ... Select Analysis tool pack.
Enter this in the cell for your random values. =INDIRECT("A"&RANDBETWEEN(2,300)) Keep in mind that when you recalculate the cell, it will change. "Arnie" wrote: I have a list in cell A2:A300. There are not just integer values. Is there a way to generate random values from that list even though some of the number have decimals? |
Generate random number from a list
Barb Reinhardt wrote...
Tools - Add-ins ... Select Analysis tool pack. Enter this in the cell for your random values. =INDIRECT("A"&RANDBETWEEN(2,300)) .... Unnecessary. Could be achieved using =INDEX($A$2:$A$300,2+INT(299*RAND())) |
Generate random number from a list
Hello,
Not =INDEX($A$2:$A$300,1+INT(300*RAND())) ? Regards, Bernd |
Generate random number from a list
|
Generate random number from a list
Hello Harlan,
Couldn't you also do without INT? =INDEX($A$2:$A$300,1+299*RAND()) "Harlan Grove" wrote: wrote: Not =INDEX($A$2:$A$300,1+INT(300*RAND())) ? Now we've both made mistakes. Your 2nd argument would return 300 when RAND() 299/300, but then your INDEX call would return #REF!. Mine would error when RAND() 298/299, a bit more frequent, and it'd never return the value in cell A2. It should be =INDEX($A$2:$A$300,1+INT(299*RAND())) or =INDEX($A$1:$A$300,2+INT(299*RAND())) |
Generate random number from a list
Hello,
Looks fine. Sometime it takes a daddy with long legs :-) Regards, Bernd |
All times are GMT +1. The time now is 09:42 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com