VIEW THIS AS

Auto mode follows the Route Engine until you choose a viewpoint.

YOU ARE HERE

ROUTE CHECK

CONNECTED TO

WHAT NEXT

Use the canonical route for this room, or HELP if you are unsure.

The Core Aim of Education | Why a Filtered Spreadsheet Total Can Still Include Hidden Rows

Three secondary students review open books and notes together in a classroom.

Did you know that a spreadsheet can show only three rows while its total still adds five? A student filters a class project table, checks the values on screen and thinks the calculator must be wrong. The arithmetic may be perfectly correct: the formula might simply be counting records that are not currently visible.

In Microsoft Excel, SUM adds the numeric cells in its referenced range even if some rows have been filtered out. SUBTOTAL can sum a filtered selection instead. Specifically, SUBTOTAL(9,range) excludes rows filtered out but includes manually hidden rows, while SUBTOTAL(109,range) excludes both filtered-out and manually hidden rows in a vertical range. Choose the formula by deciding what population the answer is supposed to represent.

  • Say what the total represents: all records, filter-matching records or presently visible records.
  • Understand that filtering and using Hide Row are separate actions; neither deletes the data.
  • Check the formula’s referenced range before blaming Excel for an unexpected result.
  • Use a small hand-calculated example before applying the idea to a large worksheet.
  • Preserve original records and label totals with the filter state and units.
  • Check the spreadsheet application’s own rules; these specific function numbers are for Excel.

The core question: does a hidden row still exist?

Imagine a class recording quantities of books returned by Blue and Red reading groups. The teacher might ask, ‘How many books did everyone return?’ The answer should include both groups, even if someone temporarily filters the screen to Blue. Alternatively, ‘How many did Blue return?’ calls for a Blue-only subtotal. A third question, ‘How many items are in the rows I can currently see?’ may require excluding rows that someone manually hid.

The displayed rows are a view of a dataset, not necessarily the entire dataset. A filter tests a condition, such as group = Blue. Hiding a row manually conceals it without saying that it failed the condition. Excel’s functions distinguish those cases because they answer different questions.

A diagnostic before formulas

On three slips write 12, 7 and 9. Cover the slip marked 7. Ask the learner for the sum of all slips: 12 + 7 + 9 = 28. Next ask for the sum of the two visible slips: 12 + 9 = 21. Neither answer is false. They answer different questions. Now uncover 7 and cover 9 instead; ask which total should change and why.

If the learner insists that a covered slip has disappeared from the dataset, revisit the distinction between hiding and deleting. If the learner insists that every total must remain 28, ask them to describe the visible subset. Understanding comes before memorising formula codes.

Fully worked invented workbook: five rows, three answers

This fictional classroom dataset has column A for group and column B for number of items. The units are whole items. Assume B2:B6 contains only valid numeric data and that there are no nested subtotals, imported text values or error cells.

  • Row 2: Blue, 12 items.
  • Row 3: Red, 7 items.
  • Row 4: Blue, 9 items.
  • Row 5: Red, 4 items.
  • Row 6: Blue, 8 items.

The full-range total is 12 + 7 + 9 + 4 + 8 = 40 items. Blue contributes 12 + 9 + 8 = 29. Red contributes 7 + 4 = 11. The reconciliation 29 + 11 = 40 independently checks that the two disjoint groups account for all records.

Stage A: all rows showing

With no filter or manual hiding, =SUM(B2:B6), =SUBTOTAL(9,B2:B6) and =SUBTOTAL(109,B2:B6) each return 40 items. That agreement does not mean the formulas have identical rules. It merely means there are no hidden rows to distinguish them in this state.

Stage B: filter to Blue

Apply a filter in column A showing only Blue. The displayed quantities become 12, 9 and 8. SUM(B2:B6) still returns 40, because its range still includes the Red values 7 and 4. Both SUBTOTAL(9,B2:B6) and SUBTOTAL(109,B2:B6) now return 29. They exclude the rows removed by the filter. Hand-check 12 + 9 + 8 = 29.

This is the first crucial observation: ’40 items in the referenced full range’ is not the same statement as ’29 items in Blue’. A worksheet should label those two figures rather than call both simply Total.

Stage C: manually hide a Blue row as well

Keep the Blue filter applied. Now separately hide row 4, whose Blue value is 9, using a manual Hide Row command. Only 12 and 8 are visible, so their total is 20.

SUM(B2:B6) remains 40. SUBTOTAL(9,B2:B6) remains 29, because function number 9 includes the manually hidden Blue row even though it excludes filtered-out Red rows. SUBTOTAL(109,B2:B6) returns 20 because number 109 excludes the manually hidden Blue row as well.

Reconcile all three: 40 includes every value; 29 includes the three Blue records; 20 includes only the two visible Blue records. The difference 29 − 20 = 9 exactly matches the manually hidden row. If your worksheet produces another result, check that the filter and manual hide were applied as described.

What Microsoft actually documents

Microsoft’s SUBTOTAL function reference specifies that function numbers 1–11 include manually hidden rows while 101–111 exclude them. Both groups exclude rows not included in a filter result. Code 9 or 109 selects SUM within SUBTOTAL. Microsoft also states that this function is intended for vertical ranges; hiding columns in horizontal ranges is not handled like hiding rows in a vertical list.

This explanation is for Excel, not a claim that every spreadsheet program uses identical syntax or behaviour. Check the actual program and version before transferring a rule into a school report.

Common mistakes and how to fix them

The first mistake is interpreting the visible display as the complete set of records. Show the learner how clearing the filter restores the Red rows. The second is confusing a filter with manual hiding: remove one action at a time and predict the formula result before looking at it. The third is assuming SUM is broken; it is usually answering the full-range question it was given.

Other problems can occur: a formula might omit new rows, a number may have been stored as text, a header may have been included, the referenced range may have moved, or an existing subtotal may be nested. Test each possibility instead of attributing every discrepancy to hidden rows. Record a formula’s purpose as well as its arithmetic.

Progressive practice

Guided: filter one colour

Create four imaginary rows: Blue 5, Red 8, Blue 3, Red 4. All-record total = 5 + 8 + 3 + 4 = 20; Blue subtotal = 5 + 3 = 8. Ask which answer should appear in SUM and SUBTOTAL(9) after filtering Blue. Explain both results in a complete sentence.

Supported: manual hiding alone

Return to the original five-row dataset, clear the filter, then manually hide the Red row with 7. All-record SUM = 40. SUBTOTAL(9) = 40, since this version includes manually hidden rows. SUBTOTAL(109) = 33, since it excludes the hidden 7. Calculate 40 − 7 = 33 by hand.

Independent: unfamiliar categories

Give a learner six invented numbers assigned to two groups. Ask them to compute a complete-range sum, a group-filter subtotal and a currently visible subtotal after hiding one group-matching record. They should label each result, show a hand-check and explain the difference between a filter and manual hiding without prompts.

Transfer: an attendance report

Suppose a club stores one row per session with a count of participants. Filtering to a month should allow a monthly subtotal. But the whole-year sum remains useful if the question is total attendances across all recorded sessions. Neither result automatically counts unique individuals: the same child may attend several sessions. Once again, a formula can only answer a well-defined question about the underlying records.

What parents and teachers can do

A parent can draw a mini-table on paper and ask, ‘What did we hide, and why would we still count it?’ Then let the child predict each result before checking Excel. A teacher can use a practice file with deliberately different SUM and SUBTOTAL outputs and ask students to diagnose the cause, not merely fix a cell.

Observable progress has four parts: the learner states the data population, predicts whether a value belongs in the sum, selects a formula for that population, and independently reconciles the calculation. Repeat these checks with both a filter and a manual hide. Correct answers without explanation may reflect copying rather than understanding.

Limits, privacy and honest interpretation

A filtered subtotal is not necessarily an unbiased result. If the source data omits some pupils or counts sessions instead of unique students, formula choice cannot correct that design. Likewise, reporting ’20 students’ from a sheet that actually records 20 attendance events would misidentify the unit. Use fictional classroom data for practice rather than publishing private pupil records.

In a shared workbook, filters can change after someone takes a screenshot. Where results matter, save a version or document the conditions used. Clear writing should specify whether the total means all records, records matching the filter, or rows remaining physically visible.

Frequently asked questions

Does Excel SUM exclude filtered-out rows?

No. SUM includes numerical values in its reference range even when a filter hides the rows.

Does SUBTOTAL(9) always equal SUBTOTAL(109)?

No. Both exclude filtered-out rows, but they differ for manually hidden rows in normal vertical ranges.

Do filters delete the underlying records?

No, normally filters change which rows are displayed. Deleting data is a different operation.

Why is the visible total sometimes smaller?

The visible subset contains fewer records. That smaller total is correct when the question concerns exactly that subset, not automatically when the question concerns the whole data range.

Can I trust a subtotal without checking the source data?

You can check the calculation, but validity also depends on the referenced cells, data types, completeness, and the meaning of each row. A good report checks both.

The enduring learning habit

A related lesson is why a spreadsheet can display rounded numbers while retaining different stored precision. For wider learning support visit the eduKate Education Hub, and see the Clementi Mathematics teaching reference for the diagnosis–explanation–guided practice–independent check approach.

The aim is not to memorise that 109 is bigger than 9. It is to ask what belongs in a meaningful total, explain why, and prove that the calculation matches the question.