Sorting a data list
In Excel ranges of data can be sorted in different orders. This is an extremely useful feature that has many uses. Having your data sorted is also a precursor to using other features such as Subtotals and Vlookup.
You can sort all types of data. Text will be sorted alphabetically, numbers by size and dates and times chronologically.
When performing features like sorting the layout and structure of your data list is crucial. Headings should ideally be in the first row of your data (if arranged in columns) and there should not be any blank rows.
This tutorial assumes that your data list is arranged in columns. However the same procedures can be applied to sorting a data list arranged in rows.
Sorting by one column
- Select a cell in the column you want to sort by
- Click the Sort Ascending or Sort Descending buttons on the Standard toolbar
When sorting, there is no need to select the entire column or range. If you do select the entire column, the Sort Warning dialogue box will appear asking if you wish to expand your selection. This is recommended otherwise the cells will be sorted independently of surrounding data.
Also when selecting data you should exclude headings or they will be sorted along with your data.
The column and the data from surrounding columns are sorted as requested.
Sorting by multiple columns
Custom Sort is used to sort by more than one column. For example, we can sort the orders first by company alphabetically and then by date showing the newest orders first.
- Select a cell within the range of data you wish to sort
- Click Sort from the Data menu
- The Sort dialogue box appears. Any previous sorting will be listed
- Click the list arrows and select a column heading for each sort you wish to apply
- Click the Ascending or Descending option buttons for each sort selected
- Click Ok
Once again there is no need to select the range. As long as there are not any blank rows within the range, selecting a cell will be enough.
The data list is sorted in the order specified.