Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Learn Sorting | Organizing Data Like a Pro
Excel Adventure

bookSorting

Swipe to show menu

Sorting in Excel lets you quickly organize data so you can find information faster and spot trends or outliers with ease. You can reorder rows based on text, numbers, dates, or even colors, making your worksheet more useful for analysis.

Note
Note

Sorting permanently reorders rows. Once you sort and save, the original order is gone.

Excel automatically applies the correct sort logic based on the column's data type. The same A→Z button behaves differently depending on what the column contains:

Type

Sort options

Details

Text columns

A → Z
Z → A

Alphabetical order. Case-insensitive by default — "apple" and "Apple" sort together.

Number columns

Smallest → Largest
Largest → Smallest

Numeric order. If the column is formatted as Text, numbers sort as strings — "10" comes before "9".

Date columns

Oldest → Newest
Newest → Oldest

Sorts by the underlying serial number — not the displayed text. Format doesn't affect order.

Note
Note

If a number column was formatted as Text (common after importing CSV files), sorting produces string order: 1, 10, 100, 2, 20, 3 — not numeric order. Fix the column format first, then sort. A quick check: numbers stored as text are left-aligned in their cells.

Custom Sort

Opened via Data → Sort or Home → Sort & Filter → Custom Sort. Supports multiple levels, custom sort orders, sort by color or icon, and header detection confirmation.

Alphabetical order doesn't always reflect business logic. Sorting a Status column alphabetically puts "Paid" before "Pending" — but operationally you might want pending items at the top. Custom sort orders let you define exactly what sequence Excel should follow.

Sorting by a custom list (Windows):

  1. Click any cell inside the table → Data → Sort to open the Sort dialog;
  2. In the Sort By dropdown, choose the column (e.g. Status);
  3. In the Order dropdown, choose Custom List;
  4. Type your desired sequence one item per line (e.g. Pending → Paid → Cancelled) and click Add;
  5. Click OK twice — Excel reorders rows following your defined sequence, not alphabetical order.

Sorting by a custom list (Mac):

  1. First, create your custom list: go to Excel menu → Preferences → Custom Lists. Type your sequence one item per line (e.g. Pending → Paid → Cancelled) and click Add, then OK.
  2. Click any cell inside the table → Data → Sort to open the Sort dialog; 3, In the Sort By dropdown, choose the column (e.g. Status).
  3. In the Order dropdown, choose Custom List — your previously saved list will appear here;
  4. Select your list and click OK twice — Excel reorders the rows following your defined sequence.
carousel-imgcarousel-imgcarousel-img
question mark

After sorting the dataset by any column, what happens to the relationship between columns (e.g., Client, Item, Total Value)?

Select the correct answer

Everything was clear?

How can we improve it?

Thanks for your feedback!

Section 1. Chapter 6

Ask AI

expand

Ask AI

ChatGPT

Ask anything or try one of the suggested questions to begin our chat

Section 1. Chapter 6
some-alt