Organizing large batches of data in tools such as Google Sheets and Microsoft Excel is essential. Unorganized datasheets can confuse users and lead to errors. As it is easy to read and understand, sorting columns in the correct order is one of the ways to organize data. In such cases, if you know how to sort multiple columns in Google Sheets, it is an added advantage.
How To Sort Multiple Columns In Google Sheets Easily
Since Google Sheet provides a direct option for sorting a single column, it’s always easy to do so. But what can we do to sort multiple columns in a spreadsheet? For instance, let’s say you are given a list of states and a few cities in those states. How can you custom sort the cities in ascending order while adhering to the ascending order of the states?
Fortunately, Google Sheets provides an easy solution to sort data. You can use the Data tab in Google Sheets to sort multiple columns in a breeze. You can also use a pivot table in Google Sheets to sort order and summarize data as per your needs. Let’s take a glance at how we can do this quickly.
How To Sort Multiple Columns In Google Sheets
1. Open Google Sheets and select the dataset.
2. Open the sort range dialog box.
3. Sort the columns in order.
4. View the results.
Note: You are now aware of the quick steps taken to sort columns in Google Sheets. Let’s check out the detailed steps supported with images.
How To Sort Multiple Columns In Google Sheets – Details With Images
You can use Google Sheets to sort multiple columns because the tool offers a built-in feature to do so.
Consider the similar example as discussed above. Here, the primary is to sort the states in ascending order and then sort their cities in ascending order.
To know how to sort multiple columns in Google Sheets, select the dataset in the entire sheet. Here, the selected input range will be A1:B11 from column A and column B.
Click on the Data tab from the menu bar. Once you see the sorting options, choose the Sort range option from the dropdown options. Doing this will open the Sort range dialog box.
Now comes the central part about how to sort multiple columns in Google Sheets. First and foremost, select the ‘Data has header row’ option checkbox. You need to choose this option if your data set has a header row. A column header allows users to have easy references for columns and identify them quickly.
Next, select ‘States’ in the Sort option and choose the A to Z option to arrange the column in ascending order. Make sure you choose the column you want to sort first in this field.
Then, click on ‘Add on another sort column’ to insert an additional column field and select ‘Cities’ this time. Google Sheets will sort the States column first and then sort the adjacent cities in ascending order.
Once you click on the Sort button to save the settings, the selected range of cells will be rearranged, as shown below. You can see that the states are arranged in ascending order in the first column. Other cities are also arranged in ascending order in the second column while adhering to the order of the States.
We have sorted two columns in this example, but you can command Google Sheets to sort multiple columns by repeating the third step. You can also use the QUERY function or opt for the Google Sheets FILTER function to summarize the data in multiple sheets.
How To Use The Sort Function To Sort Multiple Columns
The sort function can also be used to sort multiple columns, in the same manner, we saw previously. Be it column names, column references, column with dates, or any column list, the built-in sorting functionality works perfectly.
Before we move on with the multiple columns in-built sorting functionality method, let’s see how the Google Sheets’ sort function works.
=SORT(range, sort_column, is_ascending)
range – The defined range of selected cells
sort_column – The index number of the column you wish to sort by
is_ascending – The sorting order
You can also use is_descending to sort the columns in descending order.
Now, let’s focus back on the example. Here, we need to sort the custom list of the States column first and then arrange the cities in ascending order according to their respective states.
First, enter the SORT function in a cell as given below.
=SORT(A2:B11, 1, true, 2, true)
1 and 2 are the column indexes of the primary column that you want to sort. The ‘true’ value denotes that the selected columns should be arranged in ascending order. Use the ‘false’ value to organize the data in descending order.
Once you input the SORT function correctly, press Enter key to obtain the results.
Likewise, you can use the SORT formula to know how to sort multiple columns in Google Sheets. You can further use conditional formatting in Google Sheets to change the rows by color to represent them in different groups.
Sorting an individual column in a Google spreadsheet or MS Excel is an easy task. The tool provides a direct option to sort the datasheet using the Data tab. The real issue arises when you need to go beyond Google sheets auto-sorting and sort two or more columns in a particular order. Be it product names or duplicates, sorting is a crucial part of organizing large and complex data. Hence, users need to be aware of how to sort multiple columns in Google Sheets.
You can follow any of the methods given above in Google Sheets to sort multiple columns. Also, it’s not possible to do multi-level sorting on mobile devices using the first method. However, you can use the SORT function to arrange data in the Google Sheets mobile app.