Excel

Occasional Visitor

Hi,

 

Is it possible in Excel to have a list of names, then assign to each name a unique random number, then sort the names based on there unique random number from (small to large)?  I tried Randarray but did not work.

 

I then want to break this list down into groups on another sheet based on that sorting, in numerical order without having to copy and paste. i.e. numbers 1-5 would be one group, 6-10 would be another, and so on.

 

Thanks

 

Tim

1 Reply
The short answer is yes, but apparently not in the way you're trying. So a couple of things: randarray can't be 'sorted' using the built in sort because it is an array. you could just use =RAND() and fill down (i.e. in column A) and then do the sort (i.e. highlight the RAND in col A and the names in col B and click Sort). However, the RAND() and all the built in random functions in Excel are volatile meaning they will get re-calculated every time a change happens so after you 'sort' that random index column will not be sorted any more but at least the names in column B are 'randomized'.
As for the break-down that should be easy as you just reference those cells where you want them:
the 1st 5 from column B would be:
=Sheet1!B1:B5
then 6-10:
=Sheet1!B6:B10