How to generate random numbers from a range of cells?

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
 
J

Jim Cone

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
 
T

Teethless mama

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top