Sorting a list alphabetically in Excel is one of the most common data tasks. The short answer: select your data, go to the Data tab, and click the A→Z button (or use Sort for more control). This rearranges rows so that text values are in ascending (A to Z) or descending (Z to A) order. It works for a single column or an entire table, and it’s a core skill for cleaning up anything from contact lists to product inventories.

What You'll Need

  • A computer with Microsoft Excel installed (desktop version for Windows or Mac, or the Excel web app).
  • A spreadsheet containing the list you want to sort. The list can be in a single column or a table with headers.
  • Basic familiarity with selecting cells and using the ribbon menu.

Step-by-Step

These steps work in Excel 2016, 2019, 2021, and Microsoft 365. Menu labels can differ slightly by version, device, or region, but the core commands are the same.

  1. Open your Excel file and navigate to the worksheet that contains the list you want to sort.
  2. Select the data you want to sort. Click and drag to highlight the cells. If your list is in a single column, select that column’s cells (including the header if you have one). If your list is part of a larger table with multiple columns, select the entire range that includes all related columns—this keeps rows intact.
  3. Go to the Data tab on the ribbon (the top menu). Look for the “Sort & Filter” group. There you’ll see two buttons: “A→Z” (ascending) and “Z→A” (descending).
  4. Click the A→Z button to sort alphabetically from A to Z. Excel immediately reorders the selected rows based on the first column of your selection. If you selected multiple columns, Excel sorts by the leftmost column by default.
  5. If you need to sort by a different column (for example, you have a table with “Last Name” in column B but you selected columns A and B), use the Sort dialog box instead. Go to Data > Sort. In the dialog, choose the column you want to sort by from the “Sort by” dropdown, and select “A to Z” under “Order.” Click OK.
  6. To sort by multiple columns (e.g., first by Last Name, then by First Name), use the Sort dialog. Click Data > Sort. Under “Sort by,” pick the first column. Then click “Add Level” and pick the second column. Set each order to “A to Z” or “Z to A” as needed. Click OK.
  7. If your data has headers (like “Name” or “City”), make sure the “My data has headers” checkbox is checked in the Sort dialog. This prevents the header row from being sorted along with the data. When using the quick A→Z button, Excel usually detects headers automatically, but it’s safer to use the Sort dialog for tables with headers.
  8. For a single column without headers, you can also use the Home tab method: select the column, then go to Home > Editing > Sort & Filter and choose “Sort A to Z.” This works the same as the Data tab method.
  9. After sorting, double-check the results. Scroll through the list to confirm that rows are correctly aligned—especially if you sorted a table with multiple columns. If something looks off, press Ctrl+Z (or Cmd+Z on Mac) to undo and try again with a different selection.

Common Mistakes

  • Selecting only one column in a multi-column table. If you have a table with names in column A and phone numbers in column B, and you only select column A before clicking A→Z, Excel will sort column A independently, breaking the association between names and phone numbers. Always select the entire range of related data.
  • Forgetting to include the header row. If you select the header and sort, the header gets sorted into the data. Use the Sort dialog and check “My data has headers” to avoid this.
  • Sorting formulas incorrectly. If your list contains formulas that reference other cells, sorting can break those references. Excel usually adjusts relative references, but absolute references (like $A$1) may not change, causing errors. Convert formulas to values if you don’t need them to recalculate.
  • Not checking for hidden rows or columns. Hidden rows are not sorted—they stay in place, which can lead to a confusing result. Unhide all rows before sorting.
  • Assuming numbers and text sort the same. Excel sorts numbers numerically, but text that looks like numbers (e.g., “10” as text) sorts alphabetically, so “10” comes before “2” because “1” is less than “2”. To fix, convert text to numbers.

Tips

  • Use Excel Tables (Ctrl+T) for robust sorting. When you format your data as a table, Excel remembers the headers and keeps rows together automatically. Sorting a table is also faster and less error-prone.
  • Sort by more than one column using the Sort dialog. For example, sort by “Last Name” first, then by “First Name” to break ties.
  • Use custom sort orders if you need something other than A-Z, like sorting by month names (Jan, Feb, Mar) or by priority (High, Medium, Low). Go to Data > Sort, choose the column, then under “Order” select “Custom List.”
  • Sort from the right-click menu. Right-click on a selected column and choose “Sort” to see the A→Z and Z→A options without going to the ribbon.
  • Use the keyboard shortcut: Select your data, then press Alt+D+S to open the Sort dialog quickly (on Windows).
  • Freeze the header row before sorting if you have a large list. Go to View > Freeze Panes > Freeze Top Row so you can see the headers while scrolling.

Troubleshooting

If the sort doesn’t go as planned, here are the most common fixes:

  • Sort seems to only affect one column. This happens when you selected only that column. Undo (Ctrl+Z), then reselect the entire range of data before sorting again.
  • Header row got sorted into the data. Undo and use the Sort dialog. Check the “My data has headers” box. If you used the A→Z button, Excel sometimes misdetects headers—especially if the header looks like data. In that case, select the data range excluding the header, then sort.
  • Numbers are sorting as text. If your numbers are left-aligned (default for text) and sort like “1, 10, 2”, they’re stored as text. Select the column, go to Data > Text to Columns, and click Finish to convert them to numbers. Or multiply by 1 using Paste Special.
  • Blank cells cause issues. Excel sorts blank cells to the bottom (for ascending) or top (for descending). If you have blanks that you want to treat differently, consider filling them with a placeholder like “—”.
  • Sorting breaks a table’s formatting. If you have banded rows (alternating colors), sorting might mess up the formatting. This is rare, but if it happens, re-apply the table style from Table Design.
  • Sort options are grayed out. This usually means the worksheet is protected or the data is in a shared workbook. Unprotect the sheet under Review > Unprotect Sheet (you may need the password).

Frequently Asked Questions

How do I sort a list in Excel without messing up the rows?

Select the entire range of data (all columns that belong together), then sort. If you have a table, use the table’s sort arrows in the header row. If you only sort one column, rows will be rearranged independently, which breaks the data.

Can I sort by last name when the full name is in one column?

Yes. Use the Text to Columns feature to split the full name into first and last name columns, then sort by the last name column. Alternatively, use a formula to extract the last name, but splitting is simpler.

Why does Excel put numbers before letters when sorting?

Excel sorts numbers before text by default. If you have a mix of numbers and text in the same column, numbers will come first in ascending order. To change this, you’d need to convert numbers to text or use a custom sort.

How do I sort alphabetically in Excel on a Mac?

The steps are the same: select the data, go to the Data tab, and click A→Z or use Sort. The ribbon is slightly different but the commands are identical.

Can I sort in Excel online (web app)?

Yes, the Excel web app supports sorting. Select your data, go to the Data tab, and use the A→Z or Z→A buttons. The Sort dialog is also available, though some advanced options like custom lists are limited.

What is the fastest way to sort a column alphabetically?

Select the column (including header if you want to keep it), then press Alt+D+S on Windows to open the Sort dialog, check “My data has headers,” and click OK. Or simply click the A→Z button on the Data tab—it’s one click.