How to Sort by Multiple Columns in Excel
To sort by multiple columns in Excel, follow these steps:
- Open your Excel workbook and select the worksheet you want to sort.
- Click on any cell within the data you want to sort.
- Go to the "Data" tab on the Excel ribbon.
- Click the "Sort" button in the "Sort & Filter" group. This will open the "Sort" dialog box.
- In the "Sort" dialog box, choose the first column you want to sort by from the "Sort by" dropdown list.
- Choose the sorting order (either "A to Z" or "Z to A" for text, or "Smallest to Largest" or "Largest to Smallest" for numbers) in the "Order" dropdown list.
- Click the "Add Level" button to add another sorting level.
- Choose the second column you want to sort by from the "Then by" dropdown list.
- Choose the sorting order for the second column in the "Order" dropdown list.
- Repeat steps 7-9 for any additional sorting levels you want to add.
- Once you've added all the sorting levels, click the "OK" button to apply the sorting to your data.
Example
Let's say you have an Excel worksheet with the following data:
A B
1 Name Age
2 John 25
3 Jane 28
4 Jake 25
5 Mary 22
6 Mark 28
You want to sort the data first by the "Age" column (column B) in ascending order and then by the "Name" column (column A) in alphabetical order.
- Click on any cell within the data.
- Go to the "Data" tab and click the "Sort" button.
- In the "Sort" dialog box, choose "Age" from the "Sort by" dropdown list.
- Choose "Smallest to Largest" in the "Order" dropdown list.
- Click the "Add Level" button.
- Choose "Name" from the "Then by" dropdown list.
- Choose "A to Z" in the "Order" dropdown list.
- Click the "OK" button to apply the sorting.
Your data should now be sorted like this:
A B
1 Name Age
2 Mary 22
3 John 25
4 Jake 25
5 Jane 28
6 Mark 28
Did you find this useful?