Sort in Excel: A to Z, by number, by date, by two columns

By Srini Vanamala / September 29, 2026 / Sorting, Filtering & Lists
Sort in Excel: A to Z, by number, by date, by two columns

Sorting rearranges rows in order. The one rule: click inside the data before you sort, never select a single column, or the columns come apart.

Sort by one column

  1. Click any cell in the column you want to sort by.
  2. Data › A→Z (or Z→A). For numbers that is smallest to largest; for dates, oldest to newest.

Whole rows move together. Headings stay at the top.

Sort by two columns (city, then name inside each city)

  1. Click inside the data. Data › Sort.
  2. Sort by: City, A to Z.
  3. Click Add Level. Then by: Name, A to Z. OK.

Check it worked

Pick one row you remember — Ana, 100, Pune. After sorting, Ana’s row still says 100 and Pune. If it doesn’t, press Ctrl + Z at once.

Put it back in the original order

Before sorting, add a column with 1, 2, 3… (type 1 and 2, select both, drag down). Sort by that column to restore.

Common mistakes

“Sort Warning: expand the selection?” — you selected one column. Choose Expand the selection so rows stay together.

Numbers sort wrong (1, 10, 2). They are text. Select them, click the warning icon › Convert to Number, sort again.

Headings got sorted in. In the Sort dialog tick My data has headers.

← →
Srini Vanamala

20 years with spreadsheets and enterprise systems. Writes one short, plain-English Excel lesson a day. Got an Excel question? learnexceleasycom@gmail.com

Have a question about this lesson?

Ask anything — I read every comment. Your email is never shown.