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 initial data

 

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).

 

sort multiple columns initial data

 

  1. Click on any cell in the range you want to sort, and in the Ribbon, go to Home > Sort & Filter > Custom Sort.

 

sort multiple columns custom sort 1a

 

  1. 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.

 

multiple custom sort criteria 1

 

  1. 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.

 

multiple custom sort criteria 2

 

  1. 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.

 

multiple custom sort criteria 3

 

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 final data 1a

 

Sort Multiple Columns in Google Sheets

  1. Select the data range you want to sort, including the heading (B1:G17), and in the Menu, go to Data > Sort range.

 

google sheets sort range 1a

 

  1. 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.

 

google sheets sort criteria 1

 

  1. 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.

 

google sheets sort criteria 2

 

  1. In the final step, set Total Sales in the then by list, select Z →  A, and click Sort.

 

google sheets sort criteria

 

The final result is the same as in Excel: The data range is sorted by Product, Month, and Total Sales.

 

google sheets final data sorted 1a