Sort a single column alphabetically in Excel
To arrange text alphabetically in Excel, select the column you want to sort, then use the sort button on the Data tab. Excel will rearrange all rows in that column from A to Z (or Z to A) while keeping the data in each row together.
Here's how to do it step by step. First, click on any cell in the column you want to sort. You don't need to select the entire column — just click anywhere in it. Then go to the Data tab at the top of your screen. You'll see a button labeled Sort A to Z (the icon shows an A above a Z with a downward arrow). Click that button, and Excel sorts your column alphabetically.
If you want to sort Z to A instead, click the Sort Z to A button right next to it. Excel will reverse the order.
Key Takeaways
- Click any cell in the column you want to sort, then use the Data tab's Sort A to Z button to arrange text alphabetically.
- When you sort one column, Excel keeps all data in each row together so your information doesn't get scrambled.
- Use the Sort Z to A button if you want reverse alphabetical order instead.
- If you have headers (like "Name" or "City"), tell Excel to ignore the top row so it doesn't sort your headers into the data.
- The Sort dialog box lets you sort by multiple columns at once, which is useful when two entries start with the same letter.
Sort multiple columns at once
When you have data spread across several columns and you want to sort by more than one column, use the Sort dialog box instead of the quick sort buttons. This keeps all your related data in the same row while sorting by your primary column first, then by a second column if there are ties.
Select all the data you want to sort — click the top-left cell of your data and drag to the bottom-right cell, or click the top-left cell and then hold Shift and click the bottom-right cell. Then go to the Data tab and click Sort (not Sort A to Z — click the word "Sort" itself). A dialog box will open. In the "Sort by" dropdown, choose the column you want to sort first. If you want a second sort level, use the "Then by" dropdown to pick another column. Click OK when you're done.
Tell Excel to ignore your header row
If your data has a header row — a top row with labels like "Name," "Email," or "Phone" — you need to tell Excel not to sort that row into your data. When you open the Sort dialog box, look for a checkbox that says My data has headers. Check that box before you click OK. Excel will then keep your headers at the top and sort only the rows below them.
If you use the quick Sort A to Z button and your data has headers, Excel usually detects them automatically and leaves them alone. But if your headers get sorted into your data by mistake, undo the sort (press Ctrl+Z on Windows or Command+Z on Mac), select your data again, and use the Sort dialog box with the headers checkbox checked.
Sort numbers and dates correctly
Excel treats numbers and dates differently from text. When you sort a column that contains numbers, Excel arranges them by their actual value — so 2 comes before 10, not after it like it would in pure alphabetical order. This is usually what you want, but it's important to know the difference.
Dates work the same way. If you sort a column of dates, Excel arranges them chronologically (earliest to latest) rather than alphabetically. If your dates are formatted as text instead of actual dates, they may sort incorrectly. To check, look at how the dates are aligned in their cells — dates aligned to the right are real dates; dates aligned to the left are probably text and will sort wrong.
Fix a sort that went wrong
If you sorted your data and the result doesn't look right, undo the sort immediately by pressing Ctrl+Z (Windows) or Command+Z (Mac). This takes you back to how your data looked before the sort. You can undo multiple times if you need to go back several steps.
The most common mistake is sorting without selecting all your data. If you select only one column and sort it, the other columns stay in place and your rows get scrambled. Always select all the data you want to keep together before you sort. Another common problem is forgetting to check the "My data has headers" box, which sorts your header row into your data. If that happens, undo and try again with the headers box checked.
Sort by custom order instead of alphabetical
Sometimes you need to sort by a custom order that isn't alphabetical — for example, sorting months as January, February, March instead of alphabetically as April, August, December. Excel has a feature for this, but it requires a bit of setup.
First, create a helper column next to your data with numbers that represent your custom order. For months, you'd put 1 next to January, 2 next to February, and so on. Then select all your data and open the Sort dialog. Sort by your helper column (which will be in numerical order). Once the sort is done, you can delete the helper column. Your data will now be in your custom order.
Remove duplicate entries while sorting
If your data has duplicate rows and you want to remove them while sorting, Excel can do both at once. First, select all your data. Go to the Data tab and click Remove Duplicates (you may need to click a dropdown arrow to find it). Excel will show you which columns to check for duplicates — usually you want to check all of them. Click OK, and Excel removes exact duplicate rows. Then sort as normal using the steps above.
Be careful with this feature — it permanently deletes rows, so make sure you have a backup of your data first. If you're not sure whether you want to remove duplicates, copy your data to a new sheet and test it there.
Frequently Asked Questions
What happens to my other columns when I sort one column?
Excel keeps all data in each row together. When you sort one column, every other column in that row moves with it. This is why you need to select all your data before sorting — if you select only one column, the other columns stay in place and your rows get mixed up.
Can I sort by more than two columns?
Yes. Open the Sort dialog box (Data tab, then click Sort), and you'll see options for "Sort by," "Then by," and "Then by" again. You can add up to three sort levels in the standard dialog. If you need more, you can sort by one column, then sort again by another column while keeping the first sort in place.
How do I sort numbers that are stored as text?
Numbers stored as text sort alphabetically instead of numerically, so 10 comes before 2. To fix this, select the column, go to Data, and look for a "Text to Columns" option. Click it, then click Finish without changing anything — this converts text numbers to real numbers. Then sort normally.
What's the difference between Sort A to Z and the Sort dialog?
Sort A to Z is quick and sorts one column only. The Sort dialog lets you sort by multiple columns, set a secondary sort level for ties, and tell Excel to ignore headers. Use the quick button for simple single-column sorts; use the dialog for anything more complex.
Can I undo a sort after I've made other changes?
You can undo a sort only if you haven't made other changes since. If you sorted, then edited cells, then realized the sort was wrong, you can't undo back to before the sort without losing your edits. This is why it's good to check your sort result right away and undo immediately if something looks wrong.