How to generate random numbers from a range of cells?

  • Thread starter Thread starter fruitchunk
  • Start date Start date
F

fruitchunk

I have a list of 25 differnt numbers in cells from A1 to A25
How can I randomly pick 5 numbers from the range A1:A25
I would like the 5 number to show up in cells C1 to G1

Thanks
 
Use this in C1:G1...
=INDIRECT("A" & INT(RAND()*25)+1)
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)



"fruitchunk"
wrote in message
I have a list of 25 differnt numbers in cells from A1 to A25
How can I randomly pick 5 numbers from the range A1:A25
I would like the 5 number to show up in cells C1 to G1
Thanks
 
create helper column in column B
B1: =RAND()
copy down to B25

In C1: =INDEX($A$1:$A$25,RANK(INDIRECT("B"&COLUMNS($C:C)),$B$1:$B$25))
copy across to G1
 
Back
Top