ExcelReady
CourseFunction guidesBlog
Start freeStart learning for free
ExcelReady

Be Excel-ready before the interview. Hands-on practice in your browser, with instant feedback.

Learn

  • Course
  • Function guides
  • Blog

Product

  • Certificate

Company

  • Editorial policy
  • Contact
  • Terms
  • Privacy

© 2026 ExcelReady. All rights reserved.

  1. Blog
  2. Data tools
  3. How to Sort Data in Excel by One or More Columns

How to Sort Data in Excel by One or More Columns

By ExcelReady Team·Updated October 30, 2026·6 min read

The short answer

To sort data in Excel by one column, click any cell in that column and choose Data > Sort A to Z or Sort Z to A. To sort by several columns, choose Data > Sort, pick the first column, then click Add Level for the next one. Click a single cell first so Excel keeps each row together.

Key takeaways

  • Click one cell in the column, not the whole column, so Excel sorts entire rows together.
  • Use Data > Sort and Add Level to sort by more than one column, such as Region then Sales.
  • Tick My data has headers so the header row stays at the top.
  • Numbers or dates stored as text sort in the wrong order; fix them before sorting.
  • The SORT function gives a sorted copy and leaves the original data unchanged.
On this page+
  1. How to sort data in Excel by one column
  2. How to sort by multiple columns
  3. Sort by a custom order or by color
  4. Why does Excel sort my data wrong?
  5. Sort with a formula: the SORT function
  6. Sorting vs filtering
  7. Sorting in office tasks and job tests
  8. Practise it

To sort data in Excel, click one cell in the column you want to order by, then choose Data > Sort A to Z or Sort Z to A. To sort by more than one column, such as Region and then Sales, use the Sort dialog and add a level for each column. This guide covers both, plus the mistakes that scramble rows and the SORT function for a live, sorted copy.

How to sort data in Excel by one column#

A one-column sort takes one click. Excel works out where your list starts and ends and moves whole rows together.

Here is a small sales list:

ABC
1RepRegionSales
2PriyaNorth48,200
3TomSouth39,150
4AnaWest61,400
5KenjiNorth52,800
6LeilaEast33,700

To put the biggest sales first:

  1. Click any cell in the Sales column, such as C3. Don't select the whole column.
  2. On the Data tab, click Sort Z to A (the button with Z above A). For numbers, Excel's menus call this Sort Largest to Smallest.

Ana's row (61,400) moves to the top, and her name and region move with her. The header row stays put because Excel detects it.

You'll find the same buttons under Home > Sort & Filter. On Windows, you can also use the ribbon keys: press Alt, then A, S, A for A to Z, or Alt, A, S, D for Z to A.

What the sort orders mean#

Data typeAscending (A to Z)Descending (Z to A)
TextA to ZZ to A
NumbersSmallest to largestLargest to smallest
DatesOldest to newestNewest to oldest

Blank cells always go to the bottom, whichever direction you choose.

How to sort by multiple columns#

Use the Sort dialog when one column isn't enough. A common request is "group by region, and within each region put the biggest sales first".

  1. Click any cell in the list.
  2. Go to Data > Sort. (Windows ribbon keys: Alt, A, S, S.)
  3. Check that My data has headers is ticked.
  4. In Sort by, choose Region. Leave Sort On as Cell Values and Order as A to Z.
  5. Click Add Level. In Then by, choose Sales and set Order to Largest to Smallest.
  6. Click OK.

The East rows come first, then North, South and West. Inside North, Kenji (52,800) sits above Priya (48,200). The second level only matters for rows that tie on the first level.

You can add more levels the same way, use Delete Level to remove one, and use the arrow buttons to change which level runs first.

Sort by a custom order or by color#

Alphabetical isn't always the order you want. Months, weekdays and labels like Low, Medium, High need a custom order.

  • Months and weekdays: in the Sort dialog, open Order, choose Custom List…, and pick the built-in January, February, March list (or the short Jan, Feb, Mar version).
  • Your own order: in the same Custom List box, type your entries, such as High, Medium, Low, click Add, then OK.
  • By color: set Sort On to Cell Color or Font Color, then pick the color to put on top. This works well after you highlight duplicates with conditional formatting.

To sort columns instead of rows, click Options… in the Sort dialog and choose Sort left to right.

Why does Excel sort my data wrong?#

Most sorting problems come from the data, not the button. Check these before you sort:

  1. You selected one column only. Excel shows a Sort Warning. Choose Expand the selection. If you choose Continue with the current selection, only that column moves and every row is scrambled.
  2. Blank rows or columns in the middle. Excel treats a fully blank row or column as the edge of the list, so part of your data isn't sorted. Delete the gaps, or select the whole list before sorting.
  3. Numbers stored as text. Text numbers sort like words, so 100 comes before 25. Look for green triangles and convert them first.
  4. Dates stored as text. Text dates sort by their first characters, not by date. They often sit on the left of the cell, while real dates sit on the right.
  5. Merged cells. Excel refuses to sort a range where merged cells are different sizes. Unmerge them first.
  6. The header got sorted into the data. Tick My data has headers.

If something goes wrong, press Ctrl+Z (⌘Z on a Mac) at once. A good habit for important lists: add an ID column numbered 1, 2, 3 before you sort, so you can always sort by ID to get the original order back.

Sort with a formula: the SORT function#

The SORT function returns a sorted copy and leaves the original list as it is. It needs Excel 2021, Excel 2024 or Microsoft 365.

Excel formula
=SORT(A2:C8,3,-1)
  • A2:C8 is the data to sort (no headers).
  • 3 sorts by the third column of that range, Sales.
  • -1 means descending, largest first. Use 1 for ascending.

Type it in one cell and the sorted list spills into the cells below and to the right. When a sale changes, the sorted copy updates by itself, which the Sort button can't do. To sort by two columns with a formula, use SORTBY, covered in our guide to SORT and SORTBY.

You can also sort a filtered result in one step. Put a FILTER function inside SORT:

Excel formula
=SORT(FILTER(A2:C8,B2:B8="North"),3,-1)

This lists only the North reps, best seller first.

Sorting vs filtering#

Sorting changes the order of rows; filtering hides rows you don't need. They work well together: filter to one region, then sort by sales. Our guide to filtering data in Excel covers the filter buttons and the Ctrl+Shift+L shortcut that turns them on (⌘⇧F on a Mac).

If your list is an Excel table, the sort buttons are already on every header. Click the arrow next to a header and choose Sort A to Z or Sort Largest to Smallest.

Sorting in office tasks and job tests#

Sorting is one of the first things people check in a practical test. A typical task asks you to rank sales reps, list the oldest open tickets first, or group expenses by category. It's also everyday work in admin roles, as covered in Excel skills for admin and office jobs. Pair it with a drop-down list to keep categories consistent, and your sorts and filters will group everything correctly.

Practise it#

Try the exercise on this page to sort a sales list with a formula. Then practise the SORT function in a live spreadsheet, and practise filtering a table to combine sorting and filtering on real data.

Try it yourself

This is a live spreadsheet. Type the formula in the green cell and press Enter.

Your manager wants the best sellers first, without changing the original list. In E2, use SORT to sort A2:C8 by its 3rd column (Sales), largest first.

fx
ABCDEF
1
Rep
Region
Sales
2
Priya
North
48200
3
Tom
South
39150
4
Ana
West
61400
5
Kenji
North
52800
6
Leila
East
33700
7
Marco
South
57250
8
Grace
East
44900
9
10
11

Tip: SORT(range, column number inside the range, -1 for largest first).

Practise this in a lesson

LessonSORT: order data with a formulaSort a table by any column, ascending or descending, and combine SORT with FILTER and UNIQUE.LessonFilter a tableTurn on filter buttons with Ctrl+Shift+L, filter by one or several values and by a number condition, total and count only the visible rows with SUBTOTAL, then clear the filters.Function guideFILTERReturn every row that matches a condition with Excel's FILTER. Multiple criteria, empty results and #SPILL! explained, with live practice.

Frequently asked questions

How do I sort in Excel without mixing up the rows?

+

Click a single cell inside the column you want to sort by, not the column letter. Excel then selects the whole list and moves each row as one unit. If you see a Sort Warning, choose Expand the selection.

How do I sort by two columns in Excel?

+

Go to Data > Sort, choose the first column in Sort by, then click Add Level and choose the second column. Excel sorts by the first level and uses the second to order rows that tie.

Why is Excel sorting my numbers wrong?

+

The numbers are probably stored as text, so Excel sorts them like words: 100 comes before 25. Convert them to real numbers, then sort again.

Can I undo a sort in Excel?

+

Yes, press Ctrl+Z (⌘Z on a Mac) straight away. To get the original order back later, add a column numbered 1, 2, 3 before you sort, then sort by that column.

How do I sort by month name instead of alphabetically?

+

In the Sort dialog, open the Order list and choose Custom List, then pick the January, February, March list. Excel then sorts in calendar order.

Sources

  • Sort data in a range or table - Microsoft Support
  • SORT function - Microsoft Support

Written and checked by the ExcelReady Team. First published October 30, 2026. The practice exercise runs in the same formula engine as our lessons. Found a mistake? Read our editorial policy or email hello@excelready.app.

On this page

  1. How to sort data in Excel by one column
  2. How to sort by multiple columns
  3. Sort by a custom order or by color
  4. Why does Excel sort my data wrong?
  5. Sort with a formula: the SORT function
  6. Sorting vs filtering
  7. Sorting in office tasks and job tests
  8. Practise it

Keep reading

Data tools· 5 min read

Create a Drop-Down List in Excel

To create a drop-down list in Excel, select the cells, go to Data > Data Validation, set Allow to List, and in Source either type the items separated by commas (Open,Closed) or select a range that holds them. Click OK. Each cell now shows an arrow, and Excel rejects entries that aren't on the list.

Data tools· 6 min read

Find and Highlight Duplicates in Excel

To highlight duplicates in Excel, select the cells, go to Home > Conditional Formatting > Highlight Cells Rules > Duplicate Values, and click OK. Every value that appears more than once turns red. To flag or count repeats with a formula instead, use COUNTIF: =COUNTIF($A$2:$A$9,A2)>1 is TRUE for a duplicate.

Tests & careers· 5 min read

Excel Skills for Admin and Office Jobs

The core Excel skills for admin jobs are entering and editing data quickly, moving and selecting with the keyboard, totals with SUM, counts with COUNTIF, sorting and filtering lists, and clear formatting for currency, dates and headers. Add SUMIF and a simple lookup and you can handle most trackers, logs and reports an office uses.

Don't just read about Excel. Do it.

Practise real formulas in a live spreadsheet with instant feedback. The first lessons are free, with no download.

Start learning for free