Classic Hacks: Sort A List Randomly In Excel

An oldie but a goodie, this little titbit was much appreciated when it was first posted back in 2012, so I’ve dug it out of the archives to share with a new generation of Excel wizards. While Excel (still) has no way to natively sort a list randomly, it’s a pretty easy process with a few short steps.

From Angus’s original story, the way to do this is with a bit of random number generation:

  1. Insert a new column on the list next to your list of names. (Click the Insert drop-down on the Home tab and choose ‘Insert Sheet Column’.)
  2.  

  3. In the first cell in that column, enter the formula =RAND(). (This generates a random number between 0 and 1.)
  4.  

  5. Fill that formula to the end of your list by holding Shift, pressing the down key until you’ve selected to the row where your list ends, and typing Control-D to auto-fill. This will place a different random number in each cell next to the relevant names.
  6.  

  7. Select the column filled with random numbers by clicking on the initial row letter at the top.
  8.  

  9. Click on the ‘Sort & Filter’ button on the Home tab and choose ‘Sort Smallest To Largest’. Excel will offer to expand the selection (so you’ll actually sort the names as well). Click OK.
  10.  

  11. Select the column again by clicking on the initial row letter and then click Delete. This gets rid of the random numbers, as you no longer need them.

It’s true that there’s no such thing as true random in the world of computing, so if you’re unhappy with your first random sorting, then you can hit sort again before you delete the numbers for a totally different order — and so on and so on until you’re happy with the list you’ve got. (Though at that point it almost ruins the point of sorting it randomly in the first place!)

Lifehacker’s Classic Hacks is a regular segment where we dig up the most popular, useful and offbeat advice from our archives and update it for your modern lifestyle.


The Cheapest NBN 50 Plans

Here are the cheapest plans available for Australia’s most popular NBN speed tier.

At Lifehacker, we independently select and write about stuff we love and think you'll like too. We have affiliate and advertising partnerships, which means we may collect a share of sales or other compensation from the links on this page. BTW – prices are accurate and items in stock at the time of posting.

Comments