Performing Custom Sorts
You aren’t limited to sorting data alphabetically and numerically. With a little extra setup work, you can randomize the order or sort by a custom sequence.
Perform a Random Sort
Excel doesn’t have a built-in tool to do a random sort, but by using the RAND function in a column to the right of the data and then sorting, you can create your own randomizer.
Add a new column to the right of the data and give the column a label in the first cell, such as Random.
In the second cell of the new column, type =RAND() and press Ctrl+Enter (this will keep the formula cell as the active cell). The formula will calculate a value between 0 and 1.
- Copy the formula to the rest of the rows in the column.
- Select one cell in the new column.
On the Data tab, click the AZ button.
The list will be sorted in a random sequence. Delete the temporary column added in step 1.
Sort with a Custom Sequence
At times, data may need to be sorted in a custom sequence that is neither alphabetical nor numerical. For example, you might want to sort by month, by weekday, or by some custom sequence of your own. You can do this by sorting by a custom list.
- Select a cell in the dataset.
On the Data tab, click Sort.
- From the Sort By drop-down, select the column header by which to sort.
- From the Sort On drop-down, select Values.
- From the Order drop-down, select Custom List.
- Select the desired list.
- Click OK.
- The data is sorted by the custom list.