Home > Data > Sort > Multiple Columns How to Sort Multiple Columns in ExcelHow to sort multiple columns in Excel, to organize data in table or list. Use Quick Sort buttons, or use the Sort dialog box, for more options when multi-level sorting. |
Before You Sort Excel DataI've seen many people mess up their Excel data, by doing a quick sort on a worksheet. So, before you sort your Excel data, be sure to do these 3 things: -- 1) Make a backup of your Excel file -- 2) Check the data that you're going to sort -- 3) Fix any blank rows or columns in the data -- 4) For best results, set up the data in a named Excel table, to avoid problems NOTE: There are detailed steps on the How to Sort in Excel page, if you need them. |
Video: Sort Multiple Columns in ExcelSee how to sort an Excel list by multiple columns. First, a 2-level sort, using the Quick Sort buttons. Next, do a 3-level sort, using the Sort dialog box. There are written steps below the video, and a sample file to download. Video Timeline
|
Sort Multiple Columns With Sort ButtonsIn Excel, you can quickly sort multiple columns in your data, by using the A-Z (ascending order) and Z-A (descending order) buttons on the Ribbon's Data tab.
Multiple Sorting StepsIf you only need to sort by 2 or 3 columns in Excel, I recommend using the Sort buttons, as a quick and efficient way to do that. With this method, you will:
|
Sort By Region and Sales RepIn this example, there is a worksheet list with sales orders, in a named Excel table:
Plan the Sorting OutcomeBefore sorting any of the columns, decide how you want the sorted data organized. For this list of sales orders, here's the result that I want:
For this Excel sort, Region column is more important, and Rep name is less important. |
Sort by Reverse ImportanceWhen sorting multiple columns, work in reverse order of importance.
1) Sort Sales Rep ColumnThe Sales Rep column is less important in this sort, so follow these steps, to sort it first:
In the list, the Sales Rep names are in alphabetical order |
2) Sort Region ColumnThe Region column is most important in this sort, so follow these steps, to sort it last:
In the list, the Sales Rep names are in alphabetical order Check the ResultsImmediately after sorting, and before you do anything else:
Undo, If NecessaryIf anything looks incorrect, or out of order:
|
Sort 3 Columns - Sort CommandAnother way to sort multiple columns in Excel is with the Sort command on the Excel Ribbon. This command opens the Sort dialog box, where you can set up a multi-level sort. Plan Sorting OutcomeIn this example, I want to sort the sales order data by 3 columns, Cost, Item and Rep
The screen shot below shows the result that I want. For example: |
Named Table or Not?The next step is to important! Be sure to check your data, to see how it is set up:
Open the Sort Dialog BoxTo get started, follow these steps:
The Sort dialog box will open, ready for you to set the sort options. |
In the Sort Dialog BoxIn this example, the goal is to sort the sales order data by 1) Cost (Z-A), then 2) Item, and then 3) Rep.
When you first open the Sort dialog box:
Select First Level ColumnFollow the steps below, to set up the first sorting level, for the Cost column:
Note: After you select a column name, the default settings might change, for the Sort On option, or the Order option. See the next section for more information. Note: If the dropdown is showing Column letters instead of headings, add a check mark to My data has headers. (This option is automatically selected for a named Excel table, and cannot be turned off) |
Select Sort OptionsAfter you choose a column, you can leave the default settings for the sort options, or select different options. Option 1: Sort OnIn this example, the Cost column is selected, and the default setting for Sort On is Cell Values.
Option 2: OrderIn this example, the Cost column is selected, and the default setting for Order is Smallest to Largest.
|
Add More Sorting LevelsTo sort on multiple columns, you can add a level for each column that you want to sort.
In this example we are sorting by Cost, then by Item (second level), and then by Rep (third level). In the screen shot below, all 3 fields have been added in the Sort dialog box.
Apply the SortAfter you have selected all the Sort levels that you need, and their options, it's time to apply the sort settings.
|
Check the SortAfter you click OK, the data will be sorted in the order that you specified.
For this example, in the screen shot below, everything was sorted as expected:
|
Get the Sample WorkbookTo try the multi-column sorting techniques, download the Sort Multiple Columns sample workbook. The practice workbook is in xlsx file format, and is zipped. It does not contain any macros. |
More Tutorials |
Last updated: December 6, 2023 2:35 PM