As you add more content to a worksheet, organizing this information becomes especially important. You can quickly reorganize a worksheet by sorting your data. For example, you could organize a list of contact information by last name. Content can be sorted alphabetically, numerically, and in many other ways
Optional: Download our practice workbook .
When sorting data, it's important to first decide if you want the sort to apply to the entire worksheet or just a cell range .
Sorting a sheet
Sorting a cell range
In our example, we'll sort a T-shirt order form alphabetically by Last Name (column C ).
Selecting cell C2
Clicking the Ascending command
The sorted worksheet
In our example, we'll select a separate table in our T-shirt order form to sort the number of shirts that were ordered on different dates.
Selecting cell range A13:B17
Clicking the Sort command
Selecting a column to sort by
Clicking OK
The sorted cell range
If your data isn't sorting properly, double-check your cell values to make sure they are entered into the worksheet correctly. Even a small typo could cause problems when sorting a large worksheet. In the example below, we forgot to include a hyphen in cell A18, causing our sort to be slightly inaccurate.
A small typo in cell A18 causing an incorrect sort
Sometimes you may find that the default sorting options can't sort data in the order you need. Fortunately, Excel allows you to create a custom list to define your own sorting order.
In our example below, we want to sort the worksheet by T-Shirt Size (column D ). A regular sort would organize the sizes alphabetically, which would be incorrect. Instead, we'll create a custom list to sort from smallest to largest.
Selecting cell D2
Clicking the Sort command
Selecting Custom List... from the Order: field
Creating a Custom list
Clicking OK to select the custom list
Clicking OK to sort the worksheet
The worksheet sorted by t-shirt size
You can also choose to sort your worksheet by formatting rather than cell content. This can be especially helpful if you add color coding to certain cells. In our example below, we'll sort by cell color to quickly see which T-shirt orders have outstanding payments.
Selecting cell E2
Clicking the Sort command
Choosing to sort by cell color
Choosing a cell color to sort by
The worksheet sorted by cell color
If you need more control over how your data is sorted, you can add multiple levels to any sort. This allows you to sort your data by more than one column .
In our example below, we'll sort the worksheet by Homeroom Number (column A ), then by Last Name (column C ).
Selecting cell A2
Clicking the Sort command
Clicking Add Level
Sorting by Homeroom # and Last Name
The worksheet sorted by homeroom number and last name
If you need to change the order of a multilevel sort, it's easy to control which column is sorted first. Simply select the desired column , then click the Move Up or Move Down arrow to adjust its priority.
Changing the sorting priority for a column