To ensure that the correct data is selected, highlight the range before starting the sort.

If the same range will be sorted repeatedly, the best approach is togive it a Name.

Sort Key and Sort Order in Excel

Sorting requires the use of asort keyand a sort order.

Illustration of a person sorting data in a funnel in Excel

Lifewire / Adrian Mangel

Then choose how you want the data sorted.

For text data, the options are Sort A to Z and Sort Z to A.

For numeric data, the options are Sort Smallest to Largest and Sort Largest to Smallest.

Screenshot of Excel showing Quick Sort option

In multi-column sorts, the sort keys are identified by selecting the column headings in the Sortdialog box.

The data is first sorted by name and then by age.

This row contains data that is different from the data in subsequent rows.

A screenshot showing how to sort on multiple columns in Excel

Excel uses formatting to determine whether a row contains column headings.

Excel uses this difference to make a determination on whether the first row is a heading row.

Available sort orders available for dates include:

Quick Sort vs.

A screenshot showing the result of a multiple column sort in Excel

These lists allow sorting by days or months chronologically rather than in alphabetical order.

The result is the reordering of entire rows or records of data.

One reason for sorting by row is to match the column order between different tables of data.

A screenshot showing data that can be sorted by date in Excel

Once the sort is done,the added row of numbers can easily be deleted.

For example, to use font color to reorder the columns:

A screenshot showing the result of data sorted by date

A screenshot of Excel showing sorting by month

A screenshot showing how to use sort to rearrange columns in Excel

A screenshot showing the result of sorting data by columns in Excel

A screenshot showing to use a font color to sort data in Excel