ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Randomize numbers (https://www.excelbanter.com/excel-worksheet-functions/446925-randomize-numbers.html)

mytyab

Randomize numbers
 
I have 2500 rows that I need to put in a random order. Does anyone know of a way to assaign a random number in a column for these rows? I need to be able to sort by the random column number so the rows are completely mixed up.

Spencer101

Quote:

Originally Posted by mytyab (Post 1604880)
I have 2500 rows that I need to put in a random order. Does anyone know of a way to assaign a random number in a column for these rows? I need to be able to sort by the random column number so the rows are completely mixed up.

Have a look at how to use =RAND() or =RANDBETWEEN()

That should do the trick.

joeu2004[_2_]

Randomize numbers
 
"mytyab" wrote:
I have 2500 rows that I need to put in a random order.

[....]
I need to be able to sort by the random column number
so the rows are completely mixed up.


Suppose your data are in A1:A2500. Enter the formula =RAND() into B1:B2500.
Select A1:B2500 (the two columns), and use Sort to put B1:B2500 in ascending
order. Now A1:A2500 is in random order. You can delete B1:B2500.

Note: After the Sort, the values in B1:B2500 will change, and they will not
appear to be in ascending order. Don't worry about it. We only care about
the values in A1:A2500.



All times are GMT +1. The time now is 07:46 AM.

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