ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Radomising rows in a spreadsheet (https://www.excelbanter.com/excel-programming/328426-radomising-rows-spreadsheet.html)

cdb

Radomising rows in a spreadsheet
 
I currently have a list of data that looks like this:

Pay No Name Age
1 Dave 23
2 James 35
3 Lucy 19
etc

And I need some code that can randomise the order of the rows so that the
outcome will look like this:

Pay No Name Age
19 Joanne 29
31 Susan 44
1 Dave 23
etc

Can anyone help?

cdb

Tom Ogilvy

Radomising rows in a spreadsheet
 
in the column beyond age, put in

=rand()
in the top cell (D2 for example) and copy down.

then sort the data using that column as the key value.

--
Regards,
Tom Ogilvy

"cdb" wrote in message
...
I currently have a list of data that looks like this:

Pay No Name Age
1 Dave 23
2 James 35
3 Lucy 19
etc

And I need some code that can randomise the order of the rows so that the
outcome will look like this:

Pay No Name Age
19 Joanne 29
31 Susan 44
1 Dave 23
etc

Can anyone help?

cdb





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

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