ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   How to generate random numbers from a range of cells? (https://www.excelbanter.com/excel-worksheet-functions/168827-how-generate-random-numbers-range-cells.html)

fruitchunk

How to generate random numbers from a range of cells?
 
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

Jim Cone

How to generate random numbers from a range of cells?
 

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

Teethless mama

How to generate random numbers from a range of cells?
 
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


"fruitchunk" wrote:

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


fruitchunk

How to generate random numbers from a range of cells?
 
Thank to you all!


All times are GMT +1. The time now is 10:41 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com