Home life · Updated
How to Sort Excel Alphabetically: Step-by-Step Guide
Quick answer To sort Excel by alphabetical order, select your data, go to the Data tab, and click A→Z (or use Sort & Filter). This arranges rows by the chosen column's text values.
What You’ll Need
- Microsoft Excel (2013 or later, including Microsoft 365)
- A spreadsheet with data in columns and rows
- A column containing text you want to sort alphabetically (e.g., names, cities, products)
Step-by-Step
- Open your Excel file – Launch Excel and open the workbook containing the data you want to sort. Make sure the data is in a table or a contiguous range (no blank rows or columns in the middle).
- Select the data range – Click and drag to highlight all the cells you want to sort, including the column headers. If your data is a formal Excel Table (created with Ctrl+T), just click anywhere inside it.
- Go to the Data tab – In the top ribbon, click the “Data” tab. You’ll see sorting options on the left side. (If you’re using Excel for Mac, the tab is also called “Data”.)
- Click the A→Z button – In the “Sort & Filter” group, click the button that shows an “A” on top of a “Z” with a downward arrow. This sorts alphabetically from A to Z (ascending). If you want Z to A, click the Z→A button instead.
- Confirm the sort warning (if shown) – If Excel detects that your selection doesn’t include all adjacent columns, it will ask: “Sort by” and show options. Choose “Expand the selection” to keep related rows together, then click “Sort.”
- Check the result – Your rows should now be reordered alphabetically based on the first column of your selection. If you sorted by a different column, make sure that column was the leftmost in your selection or you used the Sort dialog.
- Save your work – Press Ctrl+S (or Cmd+S on Mac) to save the sorted file. If you want to keep the original order, use File > Save As to create a new copy.
Common Mistakes
- Sorting only one column – If you select just a single column and sort, the rest of your data will not move with it, breaking the row relationships. Always select the full range of columns.
- Blank rows or columns – Excel may treat blank rows as separate blocks, causing the sort to only apply to part of your data. Remove or fill blank rows before sorting.
- Hidden rows or columns – Hidden rows are excluded from sorting, which can produce unexpected results. Unhide all rows/columns before sorting.
- Numbers stored as text – If your column contains numbers formatted as text (e.g., “10”, “9”), they will sort alphabetically (e.g., “10” before “9”). Convert them to numbers first.
- Forgetting to include headers – If you include the header row in the sort, Excel may sort the header alphabetically along with the data. Use the “My data has headers” checkbox in the Sort dialog to avoid this.
Tips
- Use the Sort dialog for multiple columns – For sorting by last name then first name, go to Data > Sort, add levels, and choose the columns in order.
- Sort with a custom list – If you want a specific order (e.g., months, weekdays), use Data > Sort > Order > Custom List.
- Use Excel Tables – Convert your data to a Table (Ctrl+T) so that sorting automatically includes all columns and keeps formatting consistent.
- Keyboard shortcut – On Windows, select the data and press Alt+A+S+A for A→Z sort. On Mac, use Cmd+Shift+R then A.
- Undo if needed – If the sort goes wrong, press Ctrl+Z immediately to revert.
Troubleshooting
Sort doesn’t move all columns together – This usually happens when you selected only one column. Undo (Ctrl+Z), then select the entire data range including all columns before sorting again.
Header row gets sorted into the data – In the Sort dialog, check the “My data has headers” box. If you’re using the A→Z button, Excel usually detects headers automatically, but if not, select the data starting from the first data row, not the header.
Sort order seems wrong (e.g., “A1” before “A10”) – This is normal for text sorting. If you want numeric sorting, ensure the cells are formatted as numbers (right-click > Format Cells > Number) and then sort.
Data is in multiple sheets or workbooks – Sorting works only within one sheet. If your data spans sheets, combine them into one sheet first or sort each sheet separately.
Sort button is grayed out – This happens if the sheet is protected or the workbook is shared. Check Review > Protect Sheet, and unprotect if needed. Also, ensure you have selected cells.
Blank cells appear at the top – Excel sorts blank cells to the bottom by default, but if they appear at top, check for spaces or non-printing characters. Use TRIM function to clean data.
Frequently Asked Questions
How do I sort by alphabetical order in Excel without mixing up rows?
Select the entire data range (all columns and rows) before sorting. Excel will keep rows intact. If you accidentally select only one column, use the Sort dialog and choose “Expand the selection.”
Can I sort alphabetically in Excel on a Mac?
Yes. The process is the same: select data, go to the Data tab, and click the A→Z button. The ribbon layout is similar to Windows.
How do I sort by last name when the column has full names?
You need to split the name into first and last name columns using Text to Columns (Data > Text to Columns, delimited by space). Then sort by the last name column.
Why does Excel sort numbers like 1, 10, 2 instead of 1, 2, 10?
Because the cells are formatted as text. Select the column, go to Data > Text to Columns, and click Finish (or use the error indicator to convert to number). Then sort again.
Can I sort alphabetically in Excel Online or Google Sheets?
Yes. In Excel Online, use the Data tab and A→Z. In Google Sheets, select data, right-click, and choose “Sort sheet by column A→Z” (or use Data > Sort range).
How do I sort a column alphabetically but keep the header row at the top?
In the Sort dialog, check “My data has headers.” If using the A→Z button, Excel usually recognizes the header. If not, select data starting from the first data row, then sort.
Related
- How to Fix a Leaking Toilet Cistern
- How to Phone Zimbabwe from South Africa
- How to Shrink Screen: 5 Easy Ways
Sources: Microsoft Support. Menus and buttons can differ slightly by version. Spotted something out of date? Tell us.