ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   randomize set of numbers (https://www.excelbanter.com/excel-programming/369211-randomize-set-numbers.html)

justintime

randomize set of numbers
 
Hi!

Column A contains a set of 50, non repeating numbers in random order.

Is there a way to have Excel randomly pick 5 of those numbers, not
repeating its choosing, and display them across a row beginning in
column C?

Thanks!


[email protected]

randomize set of numbers
 
Assuming you have your numbers A1 to A50, you can enter the following
formula in in columns C onwards
=INDEX($A$1:$A$50,IF(ROUNDUP(RAND()*50,0)=0,1,ROUN DUP(RAND()*50,0)))

With every recalculate event (Press F9) the result will change.

-Pramathesh

=m
justintime wrote:
Hi!

Column A contains a set of 50, non repeating numbers in random order.

Is there a way to have Excel randomly pick 5 of those numbers, not
repeating its choosing, and display them across a row beginning in
column C?

Thanks!



[email protected]

randomize set of numbers
 
Hello,

I suggest to use my function UniqRandInt:
http://www.sulprobil.com/html/uniqrandint.html

HTH,
Bernd


Jim Cone

randomize set of numbers
 
As they are in random order, just pick the top five.
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware

"justintime"

wrote in message
Hi!
Column A contains a set of 50, non repeating numbers in random order.

Is there a way to have Excel randomly pick 5 of those numbers, not
repeating its choosing, and display them across a row beginning in
column C?
Thanks!


All times are GMT +1. The time now is 02:54 AM.

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