To sort an Excel list alphabetically by its first column, click a cell in that column and choose Data > Sort A to Z. If the column has related information beside it, sort the entire table or choose Expand the selection when Excel asks; otherwise, names and their associated data can become mismatched.
Sort a list by its first column
In Excel for Microsoft 365 on Windows, the quickest method works when your data is a continuous block of rows and columns. Click one cell in the first column you want to use as the sorting key, then select Data > Sort A to Z. Excel sorts the records in the surrounding data area by that column, in ascending order. For text, ascending order is A to Z.
You can also use the command on the Home tab: Home > Sort & Filter > Sort A to Z. The Data tab is a convenient place to start because it also contains the full Sort dialog, which is useful when you need more control.
- Check that each row represents one complete record, such as a person and their department.
- Click a cell in the first column of those records.
- Choose Data > Sort A to Z.
- If Excel displays a sorting warning, choose Expand the selection to keep each row together, then confirm the sort.
For example, if column A contains employee names and column B contains departments, sorting by column A should move each department along with its employee. The sort changes the order of rows in the selected data; it does not merely rearrange the visible values in column A.
Why you should sort the whole data range
A spreadsheet row usually holds a related set of values. Sorting only the first column while leaving neighboring columns in place can attach the wrong details to each name. Imagine A2:A4 contains “Mina,” “Alex,” and “Jordan,” while B2:B4 contains their respective phone extensions. Sorting just A2:A4 would put the names in order but leave the extensions where they were. The sheet would look tidy but contain incorrect pairings.
When Excel asks whether to expand the selection, choose Expand the selection if the adjacent columns belong to the same records. Choose Continue with the current selection only when you genuinely intend to rearrange that one column independently, with no row-by-row relationship to other data.
Excel often detects a contiguous block automatically, but do not rely on that when the layout has blank rows or columns, separate notes, or other irregularities. For important data, select the complete range first, including all relevant columns, and then sort. A quick check after sorting—confirming a few names still match their original details—is a sensible safeguard.
Handle headers and the Sort dialog
If the first row contains labels such as “Name” and “Department,” make sure Excel recognizes it as a header rather than sorting it among the records. A structured Excel table treats its header row separately. For a normal range, click inside the data and open Data > Sort. In the Sort dialog, check My data has headers if the range includes column labels.
The dialog is useful when you want to confirm exactly which column Excel will use. Set Sort by to the first-column heading, Sort On to Cell Values, and Order to A to Z. If the header box is not checked, the dialog may show a column reference instead of a heading. Confirm the selected range and settings before choosing OK.
To reverse the order, choose Z to A. For text, that puts later letters before earlier ones; for dates and numbers, the corresponding descending order is newest to oldest or largest to smallest. The label on the command reflects the data type, so an ascending sort is not always literally an alphabetic comparison.
Sort an Excel table
Excel tables are a reliable choice for lists that grow over time. To make one, select the data and choose Insert > Table, confirming whether the range has headers. Once the list is a table, click the filter arrow in the first column’s header and select Sort A to Z. Excel sorts the table’s data rows together and leaves the header in place.
You can use the Data tab’s sort command while a cell in the table is selected as well. The header filter is especially clear when the table has several columns, since it shows which field’s sort menu you opened. When new rows are added to the table, they become part of its structured range, making later sorts easier to apply to the complete list.
A table does not change what “alphabetically” means. It simply helps define the related data as one unit. If the worksheet has totals, explanatory text, or a second list next to the table, keep those outside the table unless they belong to the same records.
Use a formula to show a sorted copy
If you want to retain the original order and display an alphabetized copy elsewhere, use Excel’s SORT function. It returns a sorted result in another part of the worksheet rather than rearranging the source cells. In Microsoft 365 or Excel 2021 and later, enter the formula in an empty cell where enough space is available for the result to spill.
With names in A2:A5 and departments in B2:B5, where each row is one record, enter =SORT(A2:B5,1,1) in an empty cell outside the source range. The first argument is the full range to return, the second says to sort by its first column, and the final 1 means ascending order. If the example rows are Maya—Sales, Ari—Design, Zoe—Finance, and Ben—Support, the result is Ari—Design, Ben—Support, Maya—Sales, Zoe—Finance.
Keep the formula’s output area clear; a value or another formula in the way can cause a spill error. Include the related columns in the first argument if you need them to move with each name. To sort just the names, use a one-column source range instead. The formula result is a view of sorted data, not a replacement for sorting the original records.
Common sorting problems
If the order looks wrong, first check whether the cells contain consistent data. Leading spaces, nonprinting characters, and inconsistent spelling can make two entries that look alike behave differently. For example, a name with an accidental space before its first letter may sort separately from the same name without that space. Correct the underlying values before sorting rather than repeatedly applying the sort command.
Other common causes include:
- A blank row or column splits the list. Excel may treat separated blocks as different regions. Select the full intended range before sorting, or convert the list to a table.
- Only one column moved. Undo immediately with Ctrl+Z on Windows or Command+Z on Mac, then sort the full range or expand the selection.
- The header was sorted as data. Open the Sort dialog and check My data has headers, or use a table’s header menu.
- Some entries contain numbers or dates. Excel sorts values according to their recognized type, so a mixed column may not follow the letter-by-letter order you expected.
- Merged cells are in the range. Merged layouts can prevent a normal sort. Unmerge cells where appropriate and make sure each record occupies a consistent row.
Undo is useful immediately after an incorrect sort, but it is not a substitute for a backup when changing a valuable workbook. Sorting is reversible in many ordinary cases, yet later edits can make it harder to reconstruct the previous order.
Sort by more than one column
Sorting by the first column is often enough, but duplicate values may need a second key. In the Sort dialog, set the first level to the first column, then choose Add Level to define another column and its order. For a contact list, you might sort first by last name A to Z, then by first name A to Z so that people sharing a last name appear in a predictable order.
Order matters: Excel applies the primary sort first and uses later levels to order records that tie on earlier levels. If the first-column values are unique, a second level will not visibly change their order. You can edit or remove levels in the Sort dialog before applying the sort.
Excel also supports custom sort orders, such as sorting weekdays in weekday order rather than alphabetically. Those are different from a basic A-to-Z sort. If a list uses a particular sequence—such as Low, Medium, High—choose a custom list in the Sort dialog instead of expecting alphabetical order to produce the intended grouping.
Frequently Asked Questions
How do I sort the first column without moving the header?
For a table, use the first column’s header filter and choose Sort A to Z. For a regular range, open Data > Sort and check My data has headers so the label stays above the sorted records.
Will sorting the first column rearrange the other columns too?
It should when Excel sorts the complete contiguous data range or you choose Expand the selection. If you choose to continue with only the current selection, adjacent values may not move, which can break the relationships between cells in each row.
Can I alphabetize only one column?
Yes, if the values in that column are independent and do not correspond row by row to other data. Select the column’s data cells and sort that selection. If other columns describe the same records, sort the full set of columns instead.
Why is Excel not sorting names exactly as expected?
Check for leading spaces, hidden characters, inconsistent entries, or values stored as a different type. Also confirm that you chose the intended column and that the range includes all the rows. Cleaning inconsistent source values is often necessary for a dependable order.
Can I sort alphabetically without changing the original list?
Yes. In Microsoft 365 or Excel 2021 and later, use SORT in an empty area to return a sorted copy. Include all columns that belong together in the formula’s range, and leave enough empty cells for the result to spill.
Is the Windows keyboard shortcut available on Mac?
On Windows, the ribbon key-tip sequence Alt, A, S, A can invoke Sort A to Z in Excel; press the keys in sequence. It is not the same on Mac, so use Data > Sort Ascending there. Ribbon layouts can vary, but the Data tab provides the sorting commands.
Related
- Excel Sum Above: How to Add Cells Above Your Total
- Excel Max Rows per Sheet: Limits and Workarounds
- Excel Max Value in a Column: Find the Largest Number
Try it: the Formula Explainer: paste any formula and see each function and reference in plain English.
More in Formulas & functions
- INDEX MATCH With Two MATCH Functions: Practical ExamplesYes: the standard two-way lookup uses INDEX with one MATCH to find a row and a second MATCH…
- Excel Page Break Formula: What Works and What Doesn’tNo Excel worksheet formula can insert a print page break or tell Excel exactly where a printed page…
- Excel Formula for an Entire Column: How to Use ItTo calculate values from an entire column, use a whole-column reference such as A:A inside a function. To…
- Excel Day Count Formula: Calculate Days Between DatesTo count calendar days between two dates in Excel, subtract the earlier date from the later one: with…
- Find Month and Year From a Date in Excel with FormulasTo find a month and year from a date in Excel, enter =MONTH(A2) for the month number and…
- Excel Named Range vs Table: How to Choose the Right ToolAn Excel named range gives a cell or formula a memorable name; an Excel table organizes related records…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.