To put a list in alphabetical order in Excel, click any cell in the column you want to sort, go to the Data tab and click Sort A to Z. Excel sorts the whole table by that column and keeps each row together. That covers most lists. The sections below cover the Sort dialog for more control, sorting by more than one column, the SORT function and what to do when the order comes out wrong.
These steps work in Excel for Microsoft 365, Excel 2021, 2019 and 2016 on Windows, and in Excel for the web. Excel for Mac uses the same buttons on its Data tab.

Method 1: Sort A to Z with one click
- Click a single cell in the column you want to alphabetize, such as a name in the Name column. Don’t select the whole column.
- Open the Data tab.
- In the Sort & Filter group, click Sort A to Z (the A-over-Z button with a down arrow). Click Sort Z to A for reverse order.
Excel detects the edges of your data and a header row on its own, so the headings stay at the top and every row moves as a unit. The same buttons are on the Home tab under Sort & Filter.
If a Sort Warning box appears
Excel shows this when you selected a whole column or a range and there’s data next to it. Choose Expand the selection and click Sort. Picking “Continue with the current selection” sorts only that column, so names get separated from their phone numbers, emails and other details. If that happens, press Ctrl + Z right away to undo.
Method 2: Use the Sort dialog for more control
The Sort dialog lets you confirm the header row, choose the column by name and add more sort levels.
- Click any cell in your data.
- Go to Data > Sort.
- Check My data has headers if the first row holds column names.
- Under Sort by, choose the column. Leave Sort On set to Cell Values.
- Under Order, choose A to Z.
- Click OK.
The Options button in the same dialog has two useful settings: Case sensitive, which puts lowercase entries before uppercase ones, and Sort left to right, which alphabetizes columns across a row instead of rows down a column.
Sort by more than one column
To alphabetize by last name and then by first name, or by department and then by name, add levels in the Sort dialog:
- Open Data > Sort.
- Set the first column under Sort by.
- Click Add Level and pick the second column under Then by.
- Click OK.
Excel sorts by the first level, then uses the second level only to break ties. There’s a full walkthrough in how to sort by two columns in Excel.
If full names are in one cell and you want to sort by last name, split them first. See how to separate names into two columns in Excel, then sort on the new last-name column.
Method 3: Keep a sorted copy with the SORT function
In Excel for Microsoft 365, Excel 2021 and later, and Excel for the web, the SORT function returns a sorted copy of a range in another spot. The original stays as it is, and the copy updates when you change the source.
Click an empty cell and type =SORT(A2:C50). Excel spills the sorted rows into the cells below and to the right. The function’s full form is =SORT(array, sort_index, sort_order, by_col):
| Argument | What it does | Example |
|---|---|---|
array | The range to sort, without the header row | A2:C50 |
sort_index | Which column of the range to sort by (1 is the first) | 2 |
sort_order | 1 for A to Z, -1 for Z to A | -1 |
by_col | TRUE to sort columns instead of rows | FALSE |
So =SORT(A2:C50,2,1) sorts the range A to Z by its second column. Leave enough empty cells below the formula, or you’ll see a #SPILL! error.
Sort an Excel table or a filtered list
If your data is formatted as a table (how to create a table in Excel), each header has a drop-down arrow. Click the arrow on the column you want and choose Sort A to Z. You can add the same arrows to a plain range with Data > Filter or Ctrl + Shift + L.
Troubleshooting
The header row got sorted into the list
Excel didn’t recognize the first row as headings. Undo, then use Data > Sort and check My data has headers. Making the headings bold or a different format also helps Excel spot them.
Some names sort to the top out of order
Those cells usually start with a space or another hidden character. Use =TRIM(A2) in a helper column to clean them, copy the results, paste them back as values and sort again.
Numbers come out as 1, 10, 100, 2
The numbers are stored as text, so Excel sorts them character by character. Select the cells, click the warning icon and choose Convert to Number, then sort again.
“All the merged cells need to be the same size”
Excel can’t sort a range with merged cells of different sizes. Select the range, open Home > Merge & Center and click it to unmerge, then sort.
Only part of the list sorted
A blank row or column split the data, so Excel treated it as two ranges. Delete the empty row, or select the full range yourself before you sort.
Frequently asked questions
Does sorting change my data?
Sorting moves whole rows but doesn’t change any values. To return to the original order later, add a column numbered 1, 2, 3 before you sort, then sort by that column to put things back.
Can I sort by cell color?
Yes. In the Sort dialog, change Sort On to Cell Color or Font Color and choose which color goes on top.
How do I alphabetize a list in Word instead?
Word has its own Sort button on the Home tab. See how to alphabetize in Word.
Summary
- Click one cell in the column you want to sort.
- Go to Data > Sort A to Z.
- Use Data > Sort to set a header row or add a second level.
- Use
=SORT()for a sorted copy that updates itself.
Related: sort dates in ascending order in Excel.
Related: How to Rank in Excel Highest to Lowest.

Matt Jacobs has been working as an IT consultant for small businesses since receiving his Master’s degree in 2003. While he still does some consulting work, his primary focus now is on creating technology support content for SupportYourTech.com.
His work can be found on many websites and focuses on topics such as Microsoft Office, Apple devices, Android devices, Photoshop, and more.