How to Sort Multiple Columns in Excel & Google Sheets
This tutorial demonstrates how to sort multiple columns at once in Excel and Google Sheets.
Sort Multiple Columns
Say you have the following data set, and you want to sort it by Product, Month, and Total Sales (Columns C, D, and G).
- Click on any cell in the range you want to sort, and in the Ribbon, go to Home > Sort & Filter > Custom Sort.
- In the Sort window, choose Product in the Sort by drop-down list. Leave the Order as A to Z, as you want to sort products in ascending order.
Then click Add Level to add the second column for sorting.
- For the second sort level, select Month in the Then by drop-down list, leaving the Order as Oldest to Newest.
Then go to Add Level again, for the third sort column.
- For the third level, in the Then by list, select Total Sales. The Order should be Largest to Smallest, as you want to sort in descending order, then click OK.
As a result, you get data sorted first by Product, then by Month (from oldest to newest), and finally by Total Sales (from largest to smallest).
Sort Multiple Columns in Google Sheets
- Select the data range you want to sort, including the heading (B1:G17), and in the Menu, go to Data > Sort range.
- In the pop-up window, select Data has header row. In the Sort by list, choose Product, leaving the default order (A → Z). Then click Add another sort column.
- In the new row, under then by, choose Month, and click Add another sort column. Leave the default (A → Z) here too, as you want to sort months from oldest to newest.
Note that Google Sheets uses “A → Z” for any type of value, instead of “oldest to newest” for dates or “smallest to largest” for numbers.
- In the final step, set Total Sales in the then by list, select Z → A, and click Sort.
The final result is the same as in Excel: The data range is sorted by Product, Month, and Total Sales.