How to sort by multiple columns in Google Sheets
When you are analyzing complex data sets in Google Sheets, you can take advantage of the built-in sorting feature to organize your data. You can sort in columns or for more complex data, you can sort in multiple columns.
To do this, you'll need to open your Google Sheets spreadsheet and select the data set you want to sort. You can do this manually, either through selecting cells with the mouse, or by selecting a cell in the data set and pressing Ctrl + A on your keyboard.
Once the data is selected, click Data> Sort Range from the Google Sheets menu.
Click Data> Sort Range
In the Sort Range options box , you can choose how you want to sort your data.
You can select columns to sort, as well as sort in ascending or descending order. Click Data Has Header Row to be able to select columns by header cell.
Click Data Has Header Row
By default, Google Sheets will provide only one column for sorting. To add multiple columns to sorting options, select the Add Another Sort Column button .
Select the Add Another Sort Column button
When you sort by multiple columns in Google Sheets, the sort will happen from top to bottom. For example, a sample spreadsheet with sales data for products, along with product name, date of sale, and price is displayed.
If you want to sort this data by name and then by quantity sold, you need to first select the product name column in column A (named ' Product ') and then the quantity sold in column C (named ' Price ').
Select the product name column in column A and the quantity sold in column C
You can sort this in ascending order, starting with the product name near the top of the alphabet at the top, then with the prices sorted by smallest quantity. Select ' AZ ' to sort this way or ' ZA ' to sort in descending order.
You can also combine these options. For this example, you can sort in ascending order for product names and in descending order for sales amount.
Options can be combined at will
Once the sorting options are set up, select the ' Sort ' button to sort the data. Data in the workbook will be rearranged according to the rules placed in the " Sort Range " option box .
Select the 'Sort' button to sort the data
For this example, the data above has been sorted with the product name and price in ascending order. This is clearly demonstrated with monitor and mouse products.
Priced at $ 100, the display would come second if the arrangement was made only on the ' Price ' column (column C). However, since the arrangement is done on column ' Product ' (column A) first, the soldout monitor is placed before the mouse.
The sort order will vary according to the selected column
You can undo any of these sorting by doing a different sort on your dataset, pressing the ' Undo ' button in the menu bar, or pressing Ctrl + Z on your keyboard.
You've just finished reading the article "How to sort by multiple columns in Google Sheets" edited by the TipsMake team. You can save how-to-sort-by-multiple-columns-in-google-sheets.pdf to your computer here to read later or print it out. We hope this article has provided you with many useful tech tips and tricks. You can search for similar articles on tips and guides. Thank you for reading and for following us regularly.
- This is a very useful function in Google Sheets but not many people know it
- How to convert columns to rows in Google Sheets and vice versa
- How to perform simultaneous searches in multiple Google Sheets
- Familiarize yourself with spreadsheets, rows, columns, and cells.
- How to link data between spreadsheets in Google Sheets
- How to count on multiple sheets of Google Sheets