In this article we will show you exactly how to sort in Google Sheets. We cover how to sort data using the built in sort feature and by using the SORT function. Just follow the simple steps below:
Data tables usually contain a header row. For this example we include them in the range. We will set the first Column with label Name as the reference for sorting the range.
When you choose Sort range, you will also get the two options Sort range by column A (A to Z) and Sort range by column A (Z to A). You can select either of them if you don’t include the header row in the range.
However, since we will include the header row in our range, select Advanced range sorting options.
A box will appear where you can set sorting options. You have several options to tweak the way you sort the selected range.
If the range includes a header, tick the checkbox labeled Data has header row.
There is a header row in our example so we will tick this one. This will also change the list of columns to select as reference for sorting.
Next, you need to select which column to use as reference for sorting. Click the drop-down box and select the column.
Finally we set whether to sort in ascending or descending order.
For our example, we choose A->Z for ascending order. If you want to choose descending order, click Z->A. By default ascending order A->Z is selected.
Screencap:
The range is now sorted.
=SORT(Range, Column1, is_ascending1, Column2, is_ascending2)
Where
=SORT: Calls the feature in Google Sheets
Range: The range with data to sort
Column1: The column in the range that will serve as reference for sorting. The count starts at 1, from left to right.
Is_ascending1: Specifies whether the rows are arranged in ascending or descending order. There are two possible values:
TRUE: ascending order (A->Z)
FALSE: descending order (Z->A)
Column2, is_ascending2: These are optional and are only applied when sorting multiple columns
You can specify more than one criterion using the function. Google Sheets will sort the range using column1 first, then column2, and so on. Check the example below to learn how to use this function.
Make sure the adjacent cells to the data are blank.
We identify the inputs to the SORT function:
RANGE: A2:A15
Column: 1
Is_ascending: true
The formula becomes
=sort(A2:A14, 1, TRUE)
The sheet now looks like below:
The sorted list will be displayed in ascending order (A-Z).
Learn more about how to use the SORT function in Google Sheets here.
Now which of the two methods should you use in your Google Sheets? It really depends on what you need.
If you want to permanently change the data, use the Sort feature.
If you want to keep the original list, use the Sort function.
This is not the only Google Sheets Sort article that we have here. Just search “google sheets sort” here in Lido and you will see more!
If you enjoyed this article, you might also like our article on how to extract a domain from email in Google Sheets or our article on how to count cells with specific text in Google Sheets.