Generate random number from a list

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

Guest

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?
 
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.
 
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()))
 
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()))
 
Back
Top