Docs tower · floor

How to alphabetize in Excel, without scrambling your rows

Learning how to alphabetize in excel takes one click. Learning it without silently destroying the relationship between a name and the row it belongs to takes one extra second of care, and Microsoft puts the whole of that care into the first word of its first step.

“Select a cell in the column you want to sort.”

Microsoft’s first step, read 22 August 2026. A cell — not the column. That one word is the difference between a sorted list and a scrambled one, and it is why the second result on Google for this question is somebody on Reddit asking how to sort alphabetically “so all the rows” stay together.

The distinction is this. If you click a single cell, Excel looks around it, works out the block of data it belongs to, and moves whole rows — so each name keeps its address, its total, its date. If you select the column by clicking its letter, you have told Excel that the column is the thing being sorted, and it will reorder that column while everything beside it stays where it was.

The result is a spreadsheet where every row is now wrong, nothing looks broken, and there is no error message. It is the most quietly destructive thing a spreadsheet does, and it is why this floor exists rather than the one-click instruction.

The three steps

  1. “Select a cell in the column you want to sort.”
  2. “On the Data tab, in the Sort & Filter group”, choose Sort A to Z for ascending or Sort Z to A for descending.
  3. Check the row that was next to your first entry is still next to it.

That third step is ours rather than Microsoft’s, and it takes two seconds: before sorting, note what is in the row next to your first entry. After sorting, find that entry and check its neighbour is the same. If it is not, undo immediately — the fix is free for as long as you have not saved and closed.

The two failures Microsoft documents, which are the two that actually happen

Both appear under “Potential Issues” on the same page, and both look like Excel sorting incorrectly when it is sorting exactly what it was given.

Both of those come from the same place, which is data that arrived from somewhere else. A download from a bank, an export from another system, a table copied out of a PDF — all of them produce columns where some values are text and some are numbers, and where invisible spaces are common. If a sort produces an order that makes no sense, the data is telling you something about itself before the sort is telling you anything about the order.

Two things that make sorting reliable from then on. Turn the range into a proper table, which makes the header a header and keeps rows attached whatever you do afterwards. And avoid merged cells entirely, because a merged block is not a row and sorting either refuses or misbehaves — that has its own floor in this tower.

Sorting by more than one thing. Alphabetical by surname and then by first name, or by department and then by name, is done through the full Sort dialog rather than the A-to-Z button, which handles one level. The principle is the same and so is the precaution: click one cell inside the data first.

Undo is the real safety net, and it is a short one. A sort can be undone with a keystroke while the file is open and cannot be undone at all once you have saved, closed and reopened. For a spreadsheet that matters, the two-second habit is to make a copy of the sheet before doing anything structural to it — sorting included.

The steps and both documented failures on this page are quoted from Microsoft’s own Excel documentation, read on 22 August 2026. The explanation of why selecting a whole column scrambles the rows, and the check afterwards, are ours.

Where to start

Four ways in.

“I just need A to Z.”
Click one cell first — then when a sort looks wrong
“The rows came apart.”
Undo now, then read when a sort looks wrong
“It sorted in a strange order.”
That is the data — see imported data
“It will not sort at all.”
Probably merged cells — the spreadsheet itself

When a sort looks wrong

Excel almost always sorted exactly what it was given. The question is what it was given.

Imported data

Numbers stored as text and invisible leading spaces are what a file brings with it from somewhere else.

PDF to ExcelWhat survives the conversion and what arrives as text pretending to be a number.Open this floor →
Spreadsheets as softwareThe point at which a spreadsheet has quietly become an application.Being built
Expenses and receiptsWhat to keep, in what form, and for how long.Being built

The spreadsheet itself

A clean header row and no merged cells make every other feature start working, sorting included.

The rest of Office

The same pattern each time: one word in the documented instruction carries the whole risk.

What this tower will not do

It will not hand you a one-click instruction and stop. The one click is fine; the selection you make before it decides whether your data survives.

It will not blame Excel for a strange order. Both common causes are documented by Microsoft as potential issues, and both come from the data rather than the sort.

And it will not suggest an add-in for something on the Data tab. What holds instead is simple: the steps and both documented failures are quoted from Microsoft’s own Excel documentation, with the date it was read.

Where this page got its facts

  1. Microsoft Support — Sort data in a range or table in Excel, including the instruction to select a cell in the column, and the potential issues with numbers stored as text and with leading spaces — support.microsoft.com, read 22 August 2026.

Written by Alberto Gulotta

Founder and editor of AI Tools Primer, writing from Palermo, Italy. Thirty-five years of taking computers apart, starting with a Commodore 64 — the long version is on the about page.

Something wrong on this page? Write to aitoolsprimer@gmail.com and it gets fixed.

Written on 22 August 2026.

Independence and limits

No affiliate links and no paid placements anywhere on this site. Nobody pays to appear here, and no company has seen this page before you did.

This is general information, not professional advice. Where a page touches money, health, safety or the law, it names its source and the date it was read — and your situation may still differ. See the privacy page and the cookie policy.