The Excel sort function is useful for rearranging data. When working in Excel sorting data can quickly reorganize content too.
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.
To add a level:
In our example below, we'll sort the worksheet by Homeroom Number (column A), then by Last Name (column C).
- Select a cell in the column you want to sort by. In our example, we'll select cell A2.
Selecting cell A2
- Click the Data tab, then select the Sort command.
Clicking the Sort command
- The Sort dialog box will appear. Select the first column you want to sort by. In this example, we will sort by Homeroom # (column A).
- Click Add Level to add another column to sort by.
Clicking Add Level
- Select the next column you want to sort by, then click OK. In our example, we'll sort by Last Name (column C).
Sorting by Homeroom # and Last Name
- The worksheet will be sorted according to the selected order. In our example, the homeroom numbers are sorted numerically. Within each homeroom, students are sorted alphabetically by 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