How to sort Google Sheets by two columns
When you sort a Google Sheet by two columns, you organize the data in the sheet according to two distinct columns in a specified manner. After the sheet has been sorted by two columns, the data will be grouped according to the first column you chose, and for each group of values in that column, the data will be additionally sorted based on the second column you specified.
In this tutorial, we will learn how to sort Google Sheets by two columns. In order to sort a Google Sheet by two columns in the most effective way, it is recommended to use the “Advanced range sorting options”. Another option available in Google Sheets is to utilize the built-in SORT function.
Method 1: Sorting Google Sheets by Two Columns with “Advanced range sorting options”
Step 1 – Select the Range or the Sheet Containing the Data
- Select the range or the sheet to be sorted.
Step 2 – Locate the Data Menu
- Locate the data menu in the menu bar.
Step 3 – Choose the “Advanced range sorting options”
- Choose the “Sort range” option in the data menu.
- Then perform a click on the “Advanced range sorting options”.
Step 4 – Check the “Data has header row” Checkbox
- Check the “Data has header row” checkbox.
Step 5 – Choose the First Column and the Type of Sorting
- Choose the first column from the list and choose the type of sorting.
Step 6 – Perform a Click on the “Add another sort column”
- Perform a click on the “Add another sort column” option.
Step 7 – Choose the Second Column and the Type of Sorting
- Choose the second column from the list and choose the type of sorting.
Step 8 – Perform a Click on the “Sort” Button
- Perform a click on the “Sort” button.
Method 2: Utilizing the SORT Function
Step 1 – Copy and Paste the Data Headers
- Copy and paste the data headers on the destination, where the sorted range will be pasted.
Step 2 – Choose the First Empty Cell
- Choose the first empty cell under the headers.
Step 3 – Utilize the SORT Function
- Utilize the SORT function in the empty cell.
- The structure of the SORT function will be:
SORT(A2:E10, 3, false, 4, false)
Where the first parameter i.e. A2:E10 is the range containing the data,
The second parameter 3 specifies that we are going to select Quantity column as the first sort column from our range of data.
The third parameter false specifies that the sorting will be done in descending order.
The fourth parameter i.e. 4 specifies the second sort column will be Price per Unit from our range of data.
The fifth parameter is false which again specifies that the sorting will be in descending order.
Step 4 – Strike the Enter Key
- Strike the Enter key.