Excel sort and filter practice

Sorting and filtering go wrong when one column moves and the rest of the row stays put. This guide gives you the order to work in, the checks to run and a routine you can repeat on fresh data.

Pick a skill you can use in this work and start learning.

Start learning

Practice sorting and filtering now

On this page

Before you read the answers

  • Work out revenue for three orders before you sort.
  • Sort by region and confirm every order still carries its own revenue.
  • Cross-check a filtered total with SUMIFS.

All examples use original synthetic data. Source row numbers and column letters are shown so you can reproduce the formulas.

Prove a sort kept every record together

Work out revenue (units times unit price) for orders RS-101, RS-105 and RS-112 before you sort. After you sort by region, each order must still show the same revenue.

USD per unit and USD revenue. One fictional order per row, November 2026.

Regional sales practice: source 1
RowA · Order IDB · RegionC · ChannelD · UnitsE · Unit price (USD)F · Revenue: your formula
8RS-101EastDirect1842Blank task cell
9RS-102WestPartner1255Blank task cell
10RS-103NorthDirect2532Blank task cell
11RS-104EastPartner1648Blank task cell
12RS-105SouthDirect3029Blank task cell
13RS-106WestDirect1455Blank task cell
14RS-107NorthPartner2035Blank task cell
15RS-108EastDirect2242Blank task cell
16RS-109SouthPartner1531Blank task cell
17RS-110WestPartner1058Blank task cell
18RS-111NorthDirect2832Blank task cell
19RS-112SouthDirect2429Blank task cell
Worked solution and complete results

RS-101 revenue · F8

=D8*E8

Result: 756

RS-105 revenue · F12

=D12*E12

Result: 870

RS-112 revenue · F19

=D19*E19

Result: 696

A mistake to catch

Sorting the revenue column on its own, so the region names stay put while the amounts move.

Correction. Select the whole block or click one cell inside it and expand the selection, then check a known record across the row before adding a second sort level.

Read the result

If the counts match and each record still carries its own region and revenue, the sort moved rows rather than columns and the block can be trusted for the summary.

Why does sorting scramble the data, and how do you sort whole rows?

If you select one column and sort it, only that column moves. The names stay where they were and the amounts slide up or down beside them, so every record after the first is now wrong. The damage looks tidy, which is why it survives a quick check.

Excel offers to expand the selection when it detects data beside the column you sorted. Answer yes and the whole block moves together; answer no and you have sorted a column in isolation. The safer habit is to avoid the question: click one cell inside the block and let Excel detect the range, or select the entire block including the header row first.

Take a copy of the sheet before the first sort and put it on its own tab. If the sort goes wrong you delete the tab and start again rather than trying to reverse a partial move. Then practice the click: one cell inside the block, check the highlighted range covers every column, and only then open the sort options. Do that ten times on a scratch sheet and the habit stops needing thought.

  1. Copy the sheet to a new tab and name it clearly.
  2. Click one cell inside the data block, not in the header row.
  3. Confirm the highlighted range covers every column of every record.
  4. Sort, then pick one row you know by heart and follow it across.

How do you get the level order right in a multi level sort?

Sorting twice is not a multi level sort. If you sort by team and then sort by amount, the second sort reorders everything by amount and the team grouping disappears. Add the second and third level inside one sort operation so the levels are applied together, in the order you set.

The first level is the one you want grouped at the top. The next level is the tie breaker inside that group. Decide this before you open anything, because the dialog will not tell you which order makes sense for your report.

Check the option that says your data has headers. If you leave it unticked, the header row is treated as a record and can be sorted into the middle of the data. Two quieter traps: month and weekday names sort alphabetically rather than in calendar order, and sorting by cell color works on colors applied by hand or by a rule, but a hand applied color is not tied to the data, so it can end up on the wrong record after an edit.

  1. Write down the grouping you want, then the tie breaker inside it.
  2. Select the whole block and open the sort options once.
  3. Add each level in that order, header option ticked.
  4. Check that the first level is still grouped after the sort finishes.

Why do numbers sort as text, and what else breaks a sort?

A number stored as text sorts in a separate block from real numbers, so your amounts appear in two groups that look identical. The giveaway is alignment: text sits to the left of the cell by default, numbers to the right. Fix the values before sorting rather than after, and check the repair with ISNUMBER.

Leading and trailing spaces from an import split what should be one group into two. TRIM the column first, then sort, or you will spend the afternoon wondering why one supplier appears twice. Work through the clean-up in this order: TRIM the text columns, convert the numeric columns, then re-check alignment before you sort anything.

Merged cells block a sort outright, so unmerge and fill the values down before you try again. Blank rows inside the block cut the range short, which means the bottom of your data never moves and you may not notice. Clear any filter before sorting, and unhide rows first, so nothing is silently left out of the operation.

  1. Check alignment on the numeric columns before sorting.
  2. TRIM text columns that came from an import.
  3. Unmerge cells and fill the values down.
  4. Remove blank rows inside the block, then clear filters and unhide rows.

Does filtering delete rows, and how do you total what is visible?

Filtering hides rows; it does not delete them. The skipped row numbers down the left edge are the evidence: gaps mean hidden records, not missing ones. If you copy a filtered column and paste it elsewhere, use the option that pastes only visible cells, or the hidden rows come along and inflate whatever you build next.

A plain sum over a filtered column still includes the hidden rows, which is the most common reason a filtered report disagrees with the screen. Use SUBTOTAL with the function number that ignores hidden rows so the total follows the filter. Microsoft documents the function numbers on its SUBTOTAL reference page, and it is worth reading once before you rely on the setting.

Cross check the visible total independently: run SUMIFS or COUNTIFS on the unfiltered data with the same criteria. If the two disagree, either the filter is not what you think it is or the criteria are wrong, and both are worth finding before you present the figure. Build the criteria one condition at a time, checking the count after each addition, so a wrong criterion shows up on its own rather than buried in a long formula.

  1. Clear the filter and note the record count with COUNTA.
  2. Filter to the subset and read the skipped row numbers.
  3. Total the visible rows with SUBTOTAL rather than SUM.
  4. Cross check with SUMIFS or COUNTIFS on the full data.

Should you sort a table or a plain range?

Use a table when the block will grow and you want filters and formulas to follow it; use a plain range when the layout is fixed and you sort rarely. That single decision settles most of the arguments about why a column did not fill down or why a filter missed the newest rows.

A table grows when you type in the row below it, its filter and header formatting follow the data, and a formula in one cell fills down the column. A plain range does none of that: nothing changes unless you select it, so a forgotten row at the bottom is easy to miss.

Converting between the two is reversible, but structured references appear when you convert to a table and disappear when you convert back, so formulas that used them need checking. The total row is the classic own goal: if it sits inside the block you sort, the total gets sorted into the middle of the data. Keep totals outside the block you sort, or use the table's own total row. If you are unsure which reference style a formula is using, browse the lesson list and pick the references topic before you convert.

What is a repeatable sort and filter practice routine?

Run the same five steps every time, on data you have not seen before. The repetition is what builds the habit; a single careful sort teaches you less than three quick ones with a check after each.

Take a copy, note the record count, sort on one level, check a known record across the row, then add a second level and confirm the first is still grouped. Filter to a subset, cross check the total against a formula on the full data, then clear the filter. Undo everything and run it again from memory.

For the mechanics, the lessons index lists the graded exercises in order, and the downloads page explains the workbooks with source data, blank task cells and answer keys if you would rather work offline.

  1. Copy the sheet and count the records with COUNTA.
  2. Sort one level, then check a known record across the row.
  3. Add a second level and confirm the first level is still grouped.
  4. Filter, cross check the total, clear the filter.
  5. Undo and repeat from memory.

How do you check the result before you trust it?

Count the records before and after with COUNTA. A lost row shows up as a changed count immediately, which is far cheaper than finding it in a meeting. Then spot check the first and last record against the untouched copy, not a middle row: the last record is where a short range shows up.

Compare a filtered total with a SUMIFS or COUNTIFS over the whole dataset. Two independent routes to the same figure is the only real evidence that the filter did what you think. If the sorted list has to match a second list, do not compare two columns by eye: sort both lists on the same key, put them side by side, and use COUNTIF to flag any key from one list that does not appear in the other. Every key should be flagged or not flagged, never half checked.

Keep the untouched copy until the checks pass, then delete it. A copy kept for weeks becomes a second version of the truth, and nobody remembers which one is current.

  1. Count records before and after.
  2. Spot check the first and last record against the copy.
  3. Compare the filtered total with SUMIFS or COUNTIFS on the full data.
  4. Delete the copy only once every check passes.

Practice the skills in order

  1. Cell references Precise addresses are the foundation of every reliable formula.Preview this task
  2. Absolute references Lock a shared rate so copied formulas still refer to the same cell.Preview this task
  3. SUMIFS Reports rarely ask one question. Adding the second condition is where the range order trips people up.Preview this task

This guide covers the order to sort and filter in, the mistakes that scramble or hide records, and how to check the result. It does not cover cell styles, borders, fills, banded rows, number formats or conditional formatting, and it does not walk through the ribbon or dialog controls. Practice figures on this page come from the sample workbook.

Practice sorting and filtering

Continue in a downloadable workbook

Regional sales practice

Calculate row revenue and compare regional and channel totals from pivot-ready order records.

Regional sales practice: full Instructions sheet with task instructions, units, version notes and common mistakes
Instructions preview. View Practice · View AnswerKey
Download Regional sales practice (XLSX)

USD per unit and USD revenue. One fictional order per row, November 2026.

Bank version 2026-11-02. Includes Instructions, Practice, AnswerKey; 16 live answer formulas. All source records are invented for education.

The download is an additional practice task. Its Instructions sheet identifies the source coordinates; this page’s illustrative example may use different records.

  • Working answers use scalar Excel 2007+ functions. No macros, external links or dynamic-array dependency. Native Excel has not been launched for verification.

See all six workbooks and complete answer references.

Further reading