Google Sheets Course: Sorting data
Simple Sorting
The Sort function allows you to sort your data in ascending or descending alphabetical order.
The test data: lesson-10.xlsx
To quickly sort data based on the first column, select the data range (from column A) and then click on "Sort range" > "Sort range by column A" in the Data menu:
The data is then sorted by row based on column A:
Custom Sorting
To apply a sort based on multiple columns, select the range of cells to sort (you can select entire columns this time) and then click on "Sort range" > "Advanced range sorting options" in the Data menu:
Start by checking "Data has header row" to avoid sorting the headers and display the headers in the dropdown list below:

The goal here is to sort by name, then (in case of identical names) sort by first name, and finally sort by company (if there were to be identical names and first names):

The data is then sorted according to the defined sorting criteria:



