Method 1: The A-Z / Z-A Sort Buttons
This is the approach most people learn first, and it handles probably 80% of sorting situations. It takes two clicks and works in every version of Excel.
- Click any cell in the column you want to sort by. You don't need to select the whole column - just one cell is enough for Excel to figure out the range.
- Go to the Data tab on the ribbon.
- Click the A→Z button (Sort Ascending) for alphabetical order, or the Z→A button (Sort Descending) for reverse.
Excel automatically detects your data region - it looks for the contiguous block of non-empty cells surrounding your selection and sorts all of it together. So if you have names in column A, emails in column B, and phone numbers in column C, clicking one cell in column A and hitting A→Z will rearrange all three columns so the rows stay matched up.
The one thing to watch for: if your data doesn't have headers in row 1, Excel might sort your header row into the data. You'll see "Smith, John" suddenly appear between "Singh" and "Taylor." If that happens, undo with Ctrl+Z and use Method 2 instead, where you can explicitly tell Excel about headers.
Method 2: Custom Sort (Multi-Level)
Custom Sort is what you need when a simple A-Z sort isn't enough. Maybe you want to sort by department first, then by last name within each department. Or sort by state, then by city within each state. This is where the Sort dialog box earns its keep.
- Click anywhere inside your data.
- Go to Data > Sort (or press Alt + A + S + S as a keyboard shortcut).
- In the Sort dialog, set your first sort level - pick the column, choose "Cell Values" for Sort On, and select "A to Z" for Order.
- Click "Add Level" to add a second sort criterion.
- Repeat for as many levels as you need, then click OK.
The "My data has headers" checkbox at the top right of the dialog is important. When checked, Excel uses your header row labels in the Column dropdown (so you see "Last Name" instead of "Column A"), and it won't sort the header into your data. Make sure it's checked if your first row contains labels.
You can also sort by cell color, font color, or cell icon if you're using conditional formatting. Pick these from the "Sort On" dropdown. It's a niche feature, but handy when you've color-coded priority levels and want to group them together.
Method 3: The SORT Function (Excel 365 and 2021+)
If you're on a recent version of Excel, the SORT function is a genuine improvement over the older methods. Instead of rearranging your source data, it outputs a sorted copy to a new location - and it updates automatically when the source data changes. Microsoft calls this a "dynamic array" function because the results spill into neighboring cells on their own.
The basic syntax:
=SORT(array, [sort_index], [sort_order], [by_col])
Here's what each part does:
- array - The range of cells to sort (e.g.,
A2:A50 for one column, or A2:D50 for multiple columns) - sort_index - Which column to sort by, as a number.
1 means the first column of your array. This is optional and defaults to 1. - sort_order -
1 for ascending (A→Z), -1 for descending (Z→A). Defaults to 1. - by_col -
TRUE to sort left-to-right across columns instead of top-to-bottom down rows. Almost always leave this as FALSE (the default).
The simplest version just needs a range:
=SORT(A2:A30)
That gives you an alphabetized copy of whatever's in A2:A30. To sort a multi-column table by the second column in descending order:
=SORT(A2:D30, 2, -1)
You can combine SORT with other functions for more targeted results. Want an alphabetized list of only unique names?
=SORT(UNIQUE(A2:A100))
Or filter first, then sort. This pulls out only the items in column A where column B says "Active," then alphabetizes them:
=SORT(FILTER(A2:A100, B2:B100="Active"))
One limitation: SORT doesn't exist in Excel 2019 or earlier. If you share a workbook with someone on an older version, they'll see a #NAME? error where your sorted results should be. Check Microsoft's sorting documentation for compatibility details across versions.
Method 4: AutoFilter Sort
AutoFilter puts dropdown arrows in your column headers, and those dropdowns include sort options. It's quick to access and works well when you're already filtering data and want to sort the visible results.
- Click any cell in your data range.
- Go to Data > Filter (or press Ctrl+Shift+L) to toggle AutoFilter on.
- Click the dropdown arrow in the header of the column you want to sort.
- Choose "Sort A to Z" or "Sort Z to A" from the top of the dropdown menu.
What makes this different from the basic A→Z buttons: if you've filtered out some rows (say, you're only showing entries from 2025), the sort applies only to the visible rows. Hidden rows stay where they are. This is useful when you want to alphabetize a subset without reorganizing your entire dataset.
AutoFilter is also nice because the dropdown stays available. You can re-sort at any time without going back to the Data tab - just click the dropdown arrow again.
Method 5: Convert to a Table
Excel Tables (the formal kind, created with Ctrl+T) come with built-in sort functionality that's always just one click away. If you're working with data you'll sort repeatedly, converting it to a Table saves time.
- Click any cell in your data.
- Press Ctrl+T (or go to Insert > Table).
- Confirm the range and check "My table has headers," then click OK.
- Your data now has dropdown arrows in every header cell - click any one and choose "Sort A to Z."
Tables have other benefits too: they automatically expand when you add new rows, formulas in calculated columns fill down automatically, and structured references make your formulas more readable. But even if you only care about sorting, the always-available dropdown arrows are a nice convenience.
Sorting Partial Selections
Sometimes you need to sort just a piece of your data - not the whole sheet. Select the specific range you want to sort before clicking the A→Z button. Excel will ask whether to expand the selection. Choose "Continue with the current selection" to sort only what you highlighted.
Be careful with this. If you sort column A independently without including columns B, C, and D, the data in those other columns stays put. Your rows will be mismatched. Only sort a partial selection if the data truly is independent - like a standalone list that isn't connected to anything else on the sheet.
Handling Common Excel Sorting Problems
A few situations trip people up when sorting alphabetically in Excel:
- Numbers stored as text - If you see numbers left-aligned in their cells, Excel is treating them as text. Alphabetical sort puts "10" before "2" because it compares character by character. Fix this by selecting the cells, clicking the yellow warning triangle, and choosing "Convert to Number."
- Leading spaces - Extra spaces before text cause sorting errors. Use
=TRIM(A2) to clean them up, or do a Find & Replace (Ctrl+H) searching for a space at the start of cell values. - Merged cells - Excel can't sort ranges that contain merged cells. You'll get an error message. Unmerge the cells first (Home > Merge & Center to toggle it off), sort, then re-merge if you need to.
- Hidden rows - If rows are hidden (not filtered, but manually hidden), sorting includes them. The hidden rows get repositioned along with everything else, which can cause confusion when you unhide them later. Unhide all rows before sorting to avoid surprises.
- Formulas vs. values - Sorting works on the displayed value, not the underlying formula. If a cell shows "Apple" because of a VLOOKUP, it sorts under A - which is usually what you want. But if the VLOOKUP references move during the sort, your formulas might break. Use absolute references (
$A$2:$D$100) in lookups that reference sorted data.
When to Use Each Method
| Method | Best For | Keeps Original? | Excel Version |
| A-Z / Z-A Buttons | Quick one-time sort | No | All versions |
| Custom Sort | Multi-column sorting | No | All versions |
| SORT Function | Dynamic sorted copies | Yes | 365 / 2021+ |
| AutoFilter | Sorting filtered subsets | No | All versions |
| Table Sort | Frequent re-sorting | No | 2007+ |
Keyboard Shortcuts for Sorting in Excel
If you sort data frequently, these shortcuts save time:
| Shortcut | Action |
| Alt + A + S + A | Sort Ascending (A→Z) |
| Alt + A + S + D | Sort Descending (Z→A) |
| Alt + A + S + S | Open Custom Sort dialog |
| Ctrl + Shift + L | Toggle AutoFilter on/off |
| Ctrl + T | Convert range to Table |
Frequently Asked Questions