How to Sort by Multiple Columns in Google Sheets (The Easiest Way)

Video sort google sheet by two columns

Structured data often contains multiple columns for identifying information that can be used to sort the data. These columns may include dates, locations, or customer groups. If you’re using Google Sheets, you’re in luck! It allows users to set multiple sort columns, making data organization a breeze. In this tutorial, we will learn how to sort by multiple columns in Google Sheets. Get ready to become a master of data sorting!

Sorting by Multiple Columns in Google Sheets

Step 1: Select the Data Range to Sort

Let’s say you have a dataset that includes the populations of the 34 largest European cities within their city limits. By selecting the entire range of your data, you can sort multiple columns at once by choosing the columns to sort and the order in which you want them sorted.

Data to be sorted

In our example of sorting in Google Sheets, we want to first sort by country (stored in column B) and then by population (stored in column C).

Step 2: Click on “Data” in the Main Menu, then “Sort Range” -> “Sort Range Options”

Sort Range Options

Step 3: Select your sorting options for the first column in the dialog box.

If your data has a header row, check the box that says “Data has header row.” The label will change to display the headers stored in the header row.

By default, Google Sheets only sorts by the first column. In our example, however, we want to sort by multiple columns, and our first criterion, the country name, is stored in column B. The city name is in column A, but we want to sort by country name first. Therefore, we clicked on the dropdown menu and selected “Country.”

Additionally, by default, the sort is done in ascending order, indicated by A -> Z in the box. To sort in descending order, click on the button next to Z -> A.

Step 4: Click on “Add Another Sort Column”

The same options will appear. In this case, we are sorting next by the official population, which we select from the dropdown list. However, we will sort the populations in descending order so that cities with the highest populations in each country appear first in the sorted data.

Step 5: Repeat Step 4 to Add Another Sort Column if Needed

In our example, we only need two columns to sort. After adding all the necessary columns, click on the “Sort” button.

Voila! Your table is now sorted according to your specified columns.

Returning to the Original Data in Google Sheets

Sometimes, you may only want to temporarily sort multiple columns in Google Sheets to find specific information. The easiest way to immediately undo the sort is to click the “Undo” button in the main menu or use the shortcut CTRL + Z. However, this option may not always be possible if you have made changes to the table after sorting the data by multiple columns.

An easy way to get back to your original data is to insert an additional column with a number for each row. Start by selecting a column, right-click, and insert a new column to the left. Then, add a number to this column to correspond to each row of the original data.

To do this quickly, type 1, 2, 3 in the first three cells, then select the cells and drag the formatting down the column by clicking and dragging the blue square in the bottom-right corner of the three selected cells.

Include this row when you sort the data, which will result in shuffling the numbers together when you sort by country and population. However, this numbered column makes it easy to return to the original data. Just follow the steps in the tutorial above and sort only by the numbered columns in ascending order.

Click the sort button, and voila! Your data will return to its original position.

Reminder: Make sure to sort in ascending order! Descending order will reverse the original order of your ranking, placing the last entry first.

Other Ways to Sort in Google Sheets

Google Sheets is a brilliant tool for manipulating and organizing your data. You can sort your data by date, number, color, alphabetically, or even automatically. Check out our main article on sorting in Google Sheets for everything you need to know to make the most out of Google Sheets.

Example Google Sheets Spreadsheet

Click here to access our example spreadsheet with all our sample data.

Use our insurance renewal reminder software to easily set up custom reminders from your spreadsheet in just a few clicks.

If you enjoyed this article, you might also like our articles on how to use the SORT function in Google Sheets or how to use sort columns in Google Sheets.

If you want to learn how to use the sort by number function in Google Sheets or how to link an email in Google Sheets, we suggest you check out our detailed guide.

Ready to take your data sorting skills to the next level? Visit Crawlan.com for more expert tips and tricks.

Related posts