Excel Training: Sorting Data

The "Sort" feature allows you to sort a range of cells (consisting of one or more columns) in alphabetical order, by value, etc.

The test data: lesson-9.xlsx


Quick Sort

To quickly sort data based on the first column, select the cell range containing the data and then click on "AZ" for an ascending alphabetical sort (from the "Data" tab):

excel sort data png

The data is then sorted based on the first column of the selection:

excel sort data rows
This feature sorts the rows of the selection, row by row, without "mixing up" the data (you can visualize this in this example using the colored lines).

Custom Sort

To perform a sort based on several columns or a column that is not necessarily the first, select the cell range to sort (in this case, you can directly select the entire columns) then click on "Sort" from the "Data" tab:

excel sort range data png

Feel free to select headers with your data as these will not be sorted with the other data (as long as the "My data has headers" box remains checked) and the dropdown list of columns will then display the name of the headers to help you:

excel sort window

To perform a sort by country, select "Country" from the dropdown list:

excel sort range data criteria

To sort in a second step by name (when the country is identical), click on "Add Level" to add sorting by name:

excel sort range data criteria 2

And validate to sort the data according to the defined parameters:

excel data png sort