How to sort by multiple columns in Google Sheets
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 should read it
- How to freeze, hide rows and columns in Google Sheets
- This is a very useful function in Google Sheets but not many people know it
- How to arrange alphabetical order in Google Sheets
- How to link data between spreadsheets in Google Sheets
- How to resize columns and rows in Google sheets
- How to perform simultaneous searches in multiple Google Sheets
- How to Sort Excel Columns Alphabetically
- How to add or delete rows and columns in Google Sheets
- How to count on multiple sheets of Google Sheets
- How to split first and last names into 2 columns in Excel
- How to Rename Columns in Google Sheets on PC or Mac
- How to multiply numbers in Google Sheets