Tom’s Tutorials For Excel: Sorting a List in Random Order

Tom’s Tutorials For Excel: Sorting a List in Random Order

Here’s how you can sort a table in a random order, instead of strictly as ascending or descending.

In the example, a company has 10 coveted parking spaces that are nearer to the office building. Because there are more than 10 employees, a weekly lottery is held, using the RAND function, to determine which 10 lucky employees get to park in the preferred parking spaces.

Enter the RAND() function as a one-time only step to set up your worksheet.
Column B is empty and hidden so as to not be a part of the Sort range.



Select the range to be sorted. In the example pictured below, it is range C4:D27.
From your keyboard, press Alt+D+S to show the Sort dialog box.



If you are using version 2003, in the Sort dialog box:
• In the Sort by field, select the column headed by your random header label.
• You can sort by Ascending or Descending; I selected Ascending.
• Be sure to indicate that your sort range has a header row.
• Click OK.



If you are using version 2007 or after, in the Sort dialog box:
• Select (put a checkmark in the box nest to) “My data has headers”.
• In the Sort by field, select the column headed by your random header label.
• Sort on Values.
• Sort by Smallest to Largest, or by Largest to Smallest (ascending or descending).
• Click OK.

Share Button
Posted in Tom's Tutorials for Excel
Tags: , , , , , , , , , , , , ,

Leave a Reply

Your email address will not be published.

*