X
X
The Best Tech Newsletter Anywhere

Join 350,000 subscribers and get a daily digest of news, geek trivia, and our feature articles.

How to Sort by Multiple Columns in Google Sheets

Google Sheets

When you’re analyzing complex data sets in Google Sheets, you can take advantage of its built-in sorting feature to organize the data. You can sort by individual columns or, for more complex data, you can sort by multiple columns.

To do this, you’ll need to open your Google Sheets spreadsheet and select the data set you wish to sort. You can do this manually by selecting the cells using your mouse, or by selecting one of the cells in your data set and pressing Ctrl+A on your keyboard.

RELATED: The Beginner's Guide to Google Sheets

Once your data is selected, click Data > Sort Range from the Google Sheets menu.

To sort data in Google Sheets, select your data set, then press Sort > Sort Range.

In the “Sort Range” option box, you can select how you wish to sort your data.

You can select the column to sort by, as well as whether to sort in ascending or descending order. Click the “Data Has Header Row” to be able to select columns by the header cell.

Click the "Data Has Header Row" checkbox to use column header labels during a sort in Google Sheets

By default, Google Sheets will only offer one column to sort by. To add multiple columns to your sort options, select the “Add Another Sort Column” button.

Press "Add Another Sort Column" to add an additional column to your Google Sheets sort.

When you sort by multiple columns in Google Sheets, the sort will take place in order from top to bottom. For instance, an example spreadsheet has product sales data with product names, sale dates, and prices shown.

If you wanted to sort this data by name and then by the amount sold, you’d want to select the product name column in column A (named “Product”) first and the amount sold in column C (named “Price”) second.

A Google Sheets sort options box with multiple columns added.

You could sort this in ascending order, starting with product names near the start of the alphabet at the top, then with prices sorted by the smallest amount. Select “A-Z” to sort this way or “Z-A” to sort in descending order instead.

You can mix and match these options, too. For this example, you could sort in ascending order for product names and descending order for sales amounts.

In the Google Sheets sorting options box, select "A-Z" for ascending order or "Z-A" for descending order.

Once your sorting options are set, select the “Sort” button to sort your data. The data in your spreadsheet will be rearranged following the rules set in the “Sort Range” options box.

An example data set in Google Sheets, sorted using the built-in sort tool.

For this example, the data above has been sorted with product names and prices both in ascending order. This is shown clearly with the monitor and mouse products.

Priced at $100, the monitor would come second if the sort was only performed on the “Price” column (column C). As the sort was performed on the “Product” column (column A) first, however, the sold monitor was placed ahead of the mouse.

Examples of sorted Google Sheets data using single and multiple-column sorts.

You can undo any of these sorts by performing another sort on your data set, by pressing the “Undo” button in the menu bar, or by pressing Ctrl+Z on your keyboard.

RELATED: All the Best Google Sheets Keyboard Shortcuts

Ben Stockton Ben Stockton
Ben Stockton is a freelance tech writer from the United Kingdom. In a past life, he was a UK college lecturer, training teens and adults. Since leaving the classroom, he's been a tech writer, writing how-to articles and tutorials for MakeUseOf, MakeTechEasier, and Cloudwards.net. He has a degree in History and a postgraduate qualification in Computing.
Read Full Bio »

The above article may contain affiliate links, which help support How-To Geek.
How-To Geek is where you turn when you want experts to explain technology. Since we launched in 2006, our articles have been read more than 1 billion times. Want to know more?

x

The Best Tech Newsletter Anywhere

Join 350,000 subscribers and get a daily digest of news, comics, trivia, reviews, and more.