The Excel sort shortcut for ascending order is Alt, then A, then S, then A: click any cell in the column you want to sort by and press the keys one after another. The whole table is sorted A to Z, or smallest to largest, keeping each row together. Alt, then A, then S, then D sorts Z to A.
To sort by more than one column, such as by city and then by name, open the Sort dialog with Alt, then A, then S, then S. Filter dropdowns offer sorting too, opened with Alt + Down on a header.
Quick facts
Sort A to Z
Alt, then A, then S, then ASort Z to A
Alt, then A, then S, then DSort dialog
Alt, then A, then S, then SHome tab sort A to Z
Alt, then H, then S, then SFilter dropdown
Alt + DownTurn on filters
Ctrl + Shift + L
Excel sort shortcut keys
| Keys | Sorts |
|---|---|
| Alt, then A, then S, then A | A to Z, smallest to largest, oldest to newest |
| Alt, then A, then S, then D | Z to A, largest to smallest, newest to oldest |
| Alt, then A, then S, then S | Opens the Sort dialog for several levels |
| Alt, then H, then S, then S | A to Z from the Home tab |
| Alt, then H, then S, then O | Z to A from the Home tab |
| Alt, then H, then S, then U | Custom Sort from the Home tab |
The Data tab keys (Alt, A) and Home tab keys (Alt, H) do the same thing; use whichever you remember.
Sort by several columns
- Click inside the table and press Alt, then A, then S, then S.
- Tick My data has headers if the first row holds titles.
- Choose the first column under Sort by, and the order.
- Click Add Level for the next column, such as Name within City.
- Press Enter to sort.
Levels are applied top to bottom. The same dialog sorts by cell colour, font colour or icon, and the Options button lets you sort left to right across columns instead of rows.
Sort shortcut Excel users rely on: filter dropdowns
Turn on filters with Ctrl + Shift + L, select a header cell, press Alt + Down to open its menu, then S for Sort A to Z or O for Sort Z to A. Filter buttons stay visible, so the next sort is quicker, and they show a small arrow on the sorted column. Filtering itself is explained in Excel filter shortcut.
Keep rows together and sort with a formula
Mixing up rows happens when only one column is selected and you choose Continue with the current selection. Click a single cell instead, so Excel detects the whole table. Converting the range to a table with Ctrl + T makes this automatic. In Excel 365, the SORT function returns a sorted copy without touching the original, for example =SORT(A2:C50,3,-1) sorts by the third column, largest first. The data can then feed a report that updates by itself.
When sorting goes wrong
| Problem | Fix |
|---|---|
| Numbers sort as 1, 10, 2 | They are stored as text; convert them to numbers |
| Header row moved into the data | Tick My data has headers |
| Only one column sorted | Press Ctrl + Z and sort again from a single cell |
| Merged cells error | Unmerge cells in the range first |
Frequently asked questions
What is the Excel sort shortcut?
How do I open the Sort dialog?
How do I sort by two columns?
Use the Sort dialog and click Add Level.
Why are my numbers sorting wrongly?
They are stored as text. Convert them to numbers first.
How do I undo a sort?
Is there a sort function in Excel?
Yes. =SORT returns a sorted copy in Excel 365.