To put Excel entries in alphabetical order, select a cell in the column and choose Home > Sort & Filter > Sort A to Z. Excel sorts the connected rows as well, so names stay with their related details. If by “filter A-Z” you mean show only certain entries, turn on filters and use the column’s drop-down; sorting and filtering are related but different actions.
The steps below are for Excel for Microsoft 365 on Windows. You can sort a simple list directly or use the header drop-down on a filtered range or table. Before you begin, check that your data has clear column headings and that the rows belong to one continuous table.
What You’ll Need
- An Excel workbook with the list you want to arrange or filter.
- A header row, such as Name, City, or Product, so Excel can identify each column. If the range has no headings, add them before applying a filter.
- A quick check that each record occupies one row and that there are no unrelated values directly beside the list. Excel may include neighboring cells when it detects the data to sort.
Step-by-Step
- Check the layout before sorting. Look across the rows and confirm that each row contains one complete record. For example, if column A contains a customer name and columns B and C contain that customer’s city and order total, all three columns should be sorted together. Remove completely blank rows inside the list if possible, because they can split a range into separate blocks. Keep a backup copy if the data is important or difficult to recreate.
- Click inside the list. Select one cell in the column you want to alphabetize. You usually do not need to highlight the entire column or select the whole table. Clicking inside a continuous data range lets Excel detect the related rows. Avoid selecting only the name cells when other columns on the same rows contain information that must stay aligned.
- Sort from the ribbon. On Windows, choose Home > Sort & Filter > Sort A to Z, or choose Data > Sort A to Z. The first option is ascending order: entries beginning with A appear before entries beginning with Z. If Excel asks whether to expand the selection, choose Expand the selection to keep each row’s details together, then click Sort. Choose Continue with the current selection only when you truly intend to reorder that one column independently.
- Use a filter drop-down if you want the column controls. Click a cell in the range, then choose Data > Filter. Excel adds a drop-down arrow to each header. Open the arrow on the column you want to arrange and choose Sort A to Z. The same menu can also hide rows that do not match a value or condition. In a formatted Excel table, the header arrows are generally already present; open the relevant arrow and choose the ascending sort command.
- Check the result across the entire row. Scan a few records near the top, middle, and bottom. Confirm that names are in the intended order and that details such as dates, amounts, or categories still belong to the right name. A-Z sorting does not remove records. If some rows disappear, a filter may be active; look for a filter icon in the header and clear the filter if you want every row visible.
- Sort by a particular column when the list has several fields. If clicking a cell sorts by the wrong field, open Data > Sort. In the Sort dialog, select the column name in Sort by, select Cell Values under Sort On, and choose A to Z under Order. Confirm that My data has headers is selected when the first row contains headings, then click OK. This dialog is useful when you need to specify the column explicitly rather than rely on the selected cell.
- Apply more than one sort level if needed. In the Sort dialog, choose Add Level to set a second field. For example, sort first by Department A to Z, then by Last Name A to Z. Excel groups rows by the first field and alphabetizes within each group using the next level. Set the most important grouping first, and review the level order before clicking OK.
On Excel for Mac, the equivalent commands are available from the Data tab and from the header drop-down in a filtered range or table; wording and ribbon placement can vary slightly by release. In Excel for the web, use the column’s header arrow and choose Sort A to Z, or use the Data tab. If you are working in a shared workbook, check that you have permission to change the sort and consider whether a personal sheet view is available before changing the view for other people.
Common Mistakes
- Sorting just one column. This is the most serious risk when the list contains related fields. If names move but phone numbers do not, the records no longer match. When Excel asks whether to expand the selection, choose that option unless you deliberately want to sort only the selected cells. If no prompt appears, undo immediately with Ctrl+Z on Windows and inspect whether the whole range moved together.
- Confusing a filter with a sort. Sort A to Z changes the order of visible records. A filter hides records that do not meet a condition; it does not alphabetize the remaining values by itself. A header arrow offers both types of controls, which is why the terms are often mixed up.
- Including the header in the sort. If Excel treats a heading such as Name as a regular value, the heading may move into the list. Use the Sort dialog and make sure My data has headers is checked, or create a proper table with a header row.
- Leaving blank rows or merged cells in the range. A blank row can make Excel detect only part of the data. Merged cells can also prevent a clean sort. Unmerge cells and fill or remove breaks in the data before sorting, while preserving any information you need.
- Expecting every value to be a plain word. Cells with leading spaces, inconsistent punctuation, numbers stored as text, or different spellings may appear in an unexpected position. A-Z means ascending sort order, but it does not clean or standardize the cell contents.
Tips
- Format the range as a table. Select a cell in the data and choose Home > Format as Table, then confirm the range and whether it has headers. Tables add header filters and usually expand as you add adjacent new records. Check that the selected range includes all columns belonging to the records before confirming.
- Use the header arrow when you want to sort and filter in one place. Choose Sort A to Z to alphabetize, or use the checkboxes and text-filter options to show a subset. To restore all rows, open the arrow and choose the option to clear the filter for that column, or use Data > Clear to clear filters from the range.
- Keep related values consistent. Use the same spelling and format for the same category, and remove unintended spaces at the start of text. When importing data, check whether numbers and dates are recognized as numbers and dates rather than stored as text. Consistent entries make the sort easier to interpret.
- Use a clear tie-breaker. If many people share a first name, sort by Last Name as a second level. If you want a stable, understandable order for repeated values, add a further level such as City or ID. Decide the desired hierarchy before applying the sort.
- Remember that ascending is not always alphabetical in the everyday sense. Excel sorts numbers and other data types according to their value and type. A column mixing names, numeric codes, blanks, and errors may not read like a simple dictionary list. If the result looks unusual, inspect the cell contents and use a consistent data type.
Troubleshooting
The rows separated from their details: Press Ctrl+Z on Windows immediately to undo the sort. Then select a cell in the complete range and sort again, choosing Expand the selection if prompted. On Mac, use Command+Z. If you have made further edits since the sort, undo may also reverse those edits, so use workbook version history or a saved copy if necessary.
The Sort A to Z command is unavailable: Check whether you are editing a cell, whether the sheet is protected, or whether multiple sheets are grouped. Press Esc to leave cell editing, ungroup sheets if needed, and check Review > Unprotect Sheet if you have permission to unprotect it. A protected worksheet may prevent sorting unless sorting is allowed in its protection settings.
Only part of the list moved: Look for blank rows, blank columns, or cells that break up the range. Undo, remove or account for the breaks, then select the full data range and sort again. The Sort dialog lets you verify the exact range and field before you confirm.
The order still looks wrong: Inspect a few cells for leading spaces, inconsistent spelling, punctuation, or values stored as text. You can edit or clean those entries and sort again. Also check whether a filter is hiding some records; use the header arrows or Data > Clear to reveal them. If the list contains accented characters or special symbols, their position may follow Excel’s sorting rules rather than the order you expected from a particular language’s dictionary.
The heading moved or is missing: Undo the operation, open Data > Sort, and check My data has headers. If the range does not have a header row, either add one and sort again or make sure Excel treats the first data row as a value.
Frequently Asked Questions
Does A to Z sort the whole worksheet?
No. Excel sorts the detected data range around the selected cell, not every unrelated cell on the worksheet. Keep all fields for each record in one continuous range, and verify the selection before confirming a sort.
How do I filter a column to show only certain names?
Choose Data > Filter, open the arrow in the relevant header, and select only the names you want displayed. You can also use the menu’s text-filter options to match a condition. This hides nonmatching rows; choose Sort A to Z separately if you also want alphabetical order.
Can I sort by last name when a cell contains a full name?
Excel sorts the text in each cell as written; it does not automatically identify the last name. If full names are stored together, split them into separate columns or create a helper column containing the last names, then sort by that column. Review names with middle names or compound surnames carefully before relying on a split.
Can I sort a list from Z to A instead?
Yes. Select a cell in the relevant column and choose Sort Z to A from Home > Sort & Filter, the Data tab, or the header drop-down. In the Sort dialog, set Order to Z to A.
Why do blank cells appear at the end after sorting A to Z?
Blank cells normally sort after populated values in an ascending text sort. If a cell that looks blank sorts unexpectedly, it may contain a space, a formula returning an empty string, or another hidden character rather than being truly empty.
Related
- How to Enable Paste Special in Excel
- Link Quantities in Excel: A Step-by-Step Guide
- How to Enable Freeze Panes in Excel
Try it: the Formula Explainer: paste any formula and see each function and reference in plain English.
More in Formulas & functions
- Generate Invoice Numbers in Excel With a Simple FormulaTo generate invoice numbers in Excel, enter ="INV-"&TEXT(ROW()-1,"0000") in cell A2 when row 1 is a header and…
- VLOOKUP Showing Formula? Causes and Fixes in ExcelIf VLOOKUP is showing as text instead of returning a result, first turn off Formulas > Show Formulas;…
- Excel Formula for the Lowest Value: MIN ExplainedThe Excel formula for the lowest value in a range is =MIN(A1:A10). Replace A1:A10 with the cells you…
- SUMIF in Excel: Meaning, Syntax, and How to Use ItIn Excel, SUMIF adds numbers only when their matching cells meet one condition; it is a conditional sum.…
- Excel FILTER Function for Duplicates: Find RepeatsWith IDs in A2:A100 and full records in A2:D100, enter =FILTER(A2:D100,COUNTIF(A2:A100,A2:A100)>1,"No duplicates") to return every row whose ID…
- Excel Calculation for Hours Worked: Formulas and TipsFor a shift with start time in A2, end time in B2, and unpaid break duration in C2,…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.