Excel Sort by Name Not Responding? Fixes to Try

Formulas & functions · Updated November 21, 2026

If Excel’s sort by name appears not to respond, first select a cell in the full data range and choose Data > Sort A to Z; if prompted, choose Expand the selection so every row stays together. If that does not work, check for a partial selection, a misidentified header, hidden spaces, merged cells, filters, or sheet protection.

What “not responding” can mean

A name sort can seem broken in several different ways. Excel may leave the list unchanged, sort only one column, put names in an unexpected order, disable the sort commands, or display an error. These symptoms have different causes, so note exactly what happens before changing the data.

For example, if the names move but their phone numbers do not, Excel sorted only the name column. If nothing moves, the selected range may contain one name, the order may already be alphabetical, or the command may be unavailable because the sheet is protected. If the result looks almost alphabetical but some entries are out of place, spaces or inconsistent text are more likely than a failed sort.

The steps below are for Excel for Microsoft 365 on Windows. Excel for Mac has the same basic sorting options under the Data tab, although ribbon layout and some prompts can differ slightly. Excel for the web also supports sorting, but its menus and selection prompts may look different.

Sort the entire list, not just the name column

Excel needs to keep each record’s fields together. A row containing a name, email address, and department represents one record; sorting names alone can attach each person to someone else’s details. The safest approach is to let Excel identify the whole contiguous data range, or select the complete range yourself.

  1. Click a cell inside the list, rather than selecting only the cells containing names.
  2. Open Data and choose Sort A to Z in the Sort & Filter group. For reverse order, choose Sort Z to A.
  3. If Excel asks whether to expand the selection, choose Expand the selection, then select Sort.

If Excel does not show that prompt, inspect the result: confirm that the values in the other columns still belong to the same names. A completely blank row or column inside a list can cause Excel to treat adjoining blocks as separate regions. In that situation, select the full rectangular range, including all related columns, before sorting. Avoid including unrelated notes or totals below the list.

For more control, select a cell in the data and choose Data > Sort. In the Sort dialog, set Sort by to the name column, choose Cell Values under Sort On, and choose A to Z under Order. Add another level only when you want a secondary rule, such as sorting by last name and then by first name.

Check the header row and sort column

A header such as Name or Customer should remain at the top, not be sorted among the records. In the Sort dialog, make sure My data has headers is selected when the first row contains column labels. If that option is wrong, Excel can either move the header into the list or exclude the first real name from the sort.

Also verify the field shown beside Sort by. A wide worksheet can contain several columns with similar labels, and choosing the wrong one can produce a valid but irrelevant sort. If the list has no header row, do not tell Excel that it does. After sorting, check both the first and last few records and confirm that the labels remain in their intended positions.

If the sort command runs but the order seems unchanged, compare the names closely. A list that is already A to Z will not visibly move. You can test the command on a temporary copy of the list or use the Sort dialog to choose Z to A, then restore A to Z if needed.

Look for spaces and inconsistent name text

Names that look identical in the worksheet may contain different underlying characters. A leading space can place a name before the expected position, while a trailing space may make two entries appear different. Imported data can also include nonbreaking spaces, which are not always removed by simply pressing Backspace at the end of a cell. Punctuation, prefixes, and inconsistent spelling can affect the order too.

Inspect a surprising entry by clicking its cell and looking at the formula bar. If the text begins or ends with an unwanted space, edit the cell or clean the source data. For a large imported list, use a separate helper column to clean names and review the results before replacing the original values. Be careful with names containing meaningful spaces, apostrophes, hyphens, or accents: do not remove characters just to force a preferred order.

Excel sorts text according to its sorting rules and the workbook’s language and regional settings. A name such as “ van Dijk” may be ordered differently from “van Dijk” because of the initial space; a hyphenated surname or accented letter may also appear in a position that differs from a person’s preferred filing convention. If a specific organization’s rules matter, define those rules explicitly and check the result rather than assuming every locale sorts names identically.

Check filters, tables, and merged cells

Filters do not normally prevent sorting. In a filtered range or Excel table, sorting a column typically changes the order of the visible records while keeping each row intact. However, a filter can hide rows, making the result look incomplete. Clear the filter using the column’s filter menu or inspect whether any filter indicators are active before deciding that entries disappeared.

Tables are often a convenient way to manage lists because their headers and columns are recognized as part of one structured range. Click a cell in the table, then use Data > Sort or the arrow in the name column’s header. Check the table boundaries if newly added rows are not included; data typed outside the table may not be part of the sort.

Merged cells are a more likely obstacle. Excel can reject sorting when the range contains merged cells of inconsistent sizes, because merged areas do not behave like ordinary rectangular records. If an error mentions merged cells, select the affected range and use Home > Merge & Center to inspect the merge options. Unmerge cells where appropriate, then use alignment or formatting to make labels look centered without merging the data cells. Keep a copy first if the workbook’s layout is important.

Make sure the worksheet allows sorting

If sorting is unavailable or produces a protection message, check whether the worksheet is protected. On the Review tab, look for Unprotect Sheet. If protection is enabled, you may need the password or permission from the workbook owner. Do not try to bypass a password; ask the owner to allow sorting or provide an editable copy.

When protecting a sheet, the owner can choose which actions are allowed. A protected worksheet may allow users to select cells but not sort them, or may restrict sorting when the range includes locked cells. The exact restrictions depend on how protection was configured. If you manage the file, review the protection options and test sorting after changing them, while preserving any intended safeguards.

Workbook sharing or editing restrictions can also limit what you can change. If the workbook is read-only, opened in a restricted location, or controlled by an organization’s permissions, sorting may be blocked or may not save. Confirm that you have editing access and that the file is not open in a mode that prevents changes.

Consider formulas and linked data

Sorting does not convert formulas into fixed values. If names are produced by formulas, the displayed results may move with their rows, but formulas can recalculate or refer to other cells as the data changes. Before sorting a formula-driven report, check whether the worksheet is designed to be manually rearranged and whether other formulas depend on row positions.

Some Microsoft 365 workbooks use dynamic-array formulas to generate a sorted list. A spilled result is controlled by its formula, so manually sorting part of the displayed spill range is not the right way to change its order. Change the source data or the formula’s sorting logic instead. Similarly, a query or external-data report may be refreshed from its source and restore its original order; set the sort in the query or source process if the order must persist after refresh.

For a plain list of pasted names and related values, normal sorting is usually appropriate. For a report that updates automatically, identify where its data comes from before editing the displayed output. This distinction can explain why a sort appears to work and then seems to undo itself later.

A quick troubleshooting sequence

If the first attempt fails, work through these checks in order. Save a copy before making substantial changes to imported or shared data.

  • Click one cell in the list and use Data > Sort A to Z, choosing to expand the selection if asked.
  • Open Data > Sort and confirm the correct name field, sort order, and header setting.
  • Look for blank rows or columns that split the range, and verify that all related columns are included.
  • Check filters, table boundaries, hidden rows, merged cells, and worksheet protection.
  • Inspect out-of-place names for leading or trailing spaces, inconsistent spelling, or special characters.
  • If the list is generated by a formula, query, or external connection, change the source or its sort settings instead of rearranging a displayed result.

If Excel itself freezes or closes rather than simply refusing to sort, save the workbook if possible, close and reopen Excel, and try the operation on a copy of the workbook. If the problem happens only in one file, investigate that workbook’s structure and permissions. If it happens in multiple files, update or repair Office through the available Microsoft 365 support options, or contact your organization’s support team.

Frequently Asked Questions

Why does Excel sort only the names and not the other columns?
Excel may have sorted the current selection instead of expanding it to the related data. Undo immediately if the rows became mismatched, then select the complete data range and sort again. When prompted, choose Expand the selection.

Why is Sort A to Z greyed out in Excel?
Possible causes include worksheet protection, an active editing state, or a selection Excel cannot sort, such as an incompatible merged range. Press Enter or Esc to finish editing the cell, check Review > Unprotect Sheet, and inspect the selected range for merged cells.

How do I sort names by last name instead of first name?
A standard A-to-Z sort treats the cell contents as text beginning at the first character; it does not automatically identify first and last names. For consistent full names, create a separate last-name field using a method suited to the data, then sort the complete rows by that field. Names with middle names, compound surnames, or different naming conventions need human review rather than a simplistic split.

Why does a name sort put some entries in the wrong place?
Check for leading spaces, nonbreaking spaces, punctuation, spelling differences, or a locale-specific ordering expectation. Click an unexpected cell and inspect its full contents in the formula bar. Cleaning the source can help, but preserve meaningful parts of names and confirm the intended filing rules.

Will sorting a filtered Excel list delete hidden rows?
A normal sort changes record order; it does not delete rows. Filters can hide records from view, so clear or review the filters if entries appear to be missing. For important data, verify the row count and keep a backup before making extensive changes.

Why does my sorted list return to its old order after refresh?
The displayed list may be generated from a query, external data source, or formula. Refreshing can rebuild it using the source’s configured order. Set the sorting rule in that source or report, or sort the underlying data if that is appropriate for the workbook.

Related

Try it: the Formula Explainer: paste any formula and see each function and reference in plain English.

More in Formulas & functions

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.