If =SUBTOTAL(9, range) is not adding up the way you expect, the usual reason is that the values are not real numbers. SUBTOTAL with function number 9 runs the SUM function, but it only sums cells that actually contain numbers, and it skips any cell already hidden by a filter, any cell in a hidden row, and any cell whose own formula returns SUBTOTAL (it ignores nested SUBTOTALs to prevent double counting). Text that looks like a number, numbers stored as text, errors in the range, or a range reference that got broken will all make the result look wrong or return 0. Below is the order to check things in, from the quickest fix to the more involved ones.

What You'll Need

  • A copy of Excel that supports SUBTOTAL (Excel 2007 or later, or Microsoft 365; the function exists in every current version on Windows, Mac and the web app).
  • The workbook with the problem open, and ideally a backup copy before you start changing data types.
  • The exact formula you are using (for example =SUBTOTAL(9,A2:A100)) so you can check it against the sheet.
  • Access to a blank cell for testing formulas, and the ability to insert a helper column if you need one.

Step-by-Step

  1. Check what the number 9 does. In SUBTOTAL, the first argument is a function number, not a cell. 9 means SUM and includes manually hidden rows in the calculation; 109 means SUM but excludes manually hidden rows as well as filtered rows. If someone hid rows by right-clicking, 9 will still count them and 109 will not. Decide which behaviour you actually want before changing anything.

  2. Confirm the range is the one you think it is. Click the cell with the formula and look at the colored box drawn around the source cells. If it highlights the wrong columns or stops short of the last row, edit the formula or drag the box. A very common case is a range that does not grow when new rows are added, so totals silently miss the newest entries.

  3. Test for numbers stored as text. Text values are ignored by SUM inside SUBTOTAL. Select the range, then look at the status bar at the bottom of the window. If you see a count of numbers lower than the number of entries, some cells are text. Alternatively put =ISNUMBER(A2) in a blank cell and copy it down; FALSE means that cell is not a real number. Cells that are text are often left-aligned and flagged with a small green triangle.

  4. Convert the text numbers back to real numbers. Select the cells, open the Data tab, and use Text to Columns with the default delimited settings and click Finish. Alternatively copy a blank cell, select the range, and use Paste Special with the Add operation. Both convert text to numbers in place. Then check the total again. Watch for values with apostrophes in front of them, non-breaking spaces copied from web pages, or letters such as a trailing "kg", all of which force text.

  5. Look for hidden rows and the right function number. Filters and manual hides are the second-biggest cause. Clear all filters from the Data tab, then compare =SUBTOTAL(9,range) with =SUBTOTAL(109,range). If they turn out identical, nothing was hidden and hiding is not your issue. If 9 is much larger than 109 and you wanted the visible-only total, switch to 109.

  6. Check for nested SUBTOTAL formulas. SUBTOTAL deliberately ignores any SUBTOTAL found inside its own range. If you copied a subtotal row into your data and then wrapped the whole column in another SUBTOTAL, the original subtotal rows contribute nothing. Remove the inner formulas or point the outer formula at raw data only.

  7. Scan for errors and zero-length strings. If any cell in the range contains #N/A, #DIV/0!, #VALUE!, #REF! or #NAME?, the total returns that error rather than a number. A formula returning "" (empty text) is also ignored, which can make a total look too low. Use Go To Special (Home tab > Find & Select > Go To Special > Formulas > Errors) to locate error cells quickly, then fix or exclude them.

  8. Recalculate the workbook. If the total simply will not refresh, press F9 on Windows or Command + = on Mac to recalculate, or check Formulas > Calculation Options and make sure it is set to Automatic. In a very large workbook, a manual calculation setting makes it look as if the formula is broken.

  9. Rebuild the formula cleanly. Delete the formula, then insert a fresh one by going to Home > AutoSum and choosing Subtotal from the dropdown, or type =SUBTOTAL(9, and let Excel highlight the range. This rules out a mistyped separator; regional settings sometimes expect a semicolon between arguments rather than a comma, which turns the formula into text or an error.

Common Mistakes

  • Using 9 when you meant 109. Nine includes manually hidden rows, so a total that seems too high after hiding rows is behaving exactly as designed.
  • Mixing a grand total with a SUBTOTAL range. If your range covers rows that already contain subtotals, those are ignored, so the grand total is smaller than expected. Use function 9 only on raw data.
  • Wrapping a column that contains a filter formula. Modern dynamic array helpers such as FILTER or UNIQUE can produce ranges that shift; make sure the SUBTOTAL references stay aligned with what you see.
  • Typing numbers with leading apostrophes. The cell displays the figure but stores it as text, so it is silently dropped from every SUM-based function.
  • Filling the formula across or down without absolute references. Copies of the formula can drift to a neighbouring column or miss the fixed row that should stay constant. Use $ on the parts that should not move.
  • Assuming the status bar count is the same as a SUM. It counts numeric cells only, and the selection on screen may not match the range in the formula.

Tips

  • Turn on Data > Filter before using 109 so the filtered rows are the only thing excluded; that is the classic "visible rows only" total.
  • Put the header row outside the range. Text in a header is ignored by SUM, but a range that includes it can look odd when other rounding or text appears.
  • Store a working total in a separate cell and label it clearly, so a copied subtotal row never ends up inside another subtotal range.
  • Use conditional formatting to highlight cells that are ISNUMBER(FALSE) so text-typed numbers become visible before they cause trouble.
  • Name the source range in Formulas > Name Manager. Totals then survive inserted rows and stay legible inside the formula.
  • Remember that labels, menus and button positions differ slightly by Excel version, operating system and region, so the exact wording of a command may not match yours.

Troubleshooting

Total shows 0. Nearly always text-typed numbers, a wrong range, or a filter that hides every numeric row. Run the ISNUMBER test down the column and check the range highlight.

Total shows a value larger than you expect. You are using 9 where 109 belongs, or the range includes rows that were hidden manually with right-click Hide rather than filtered out.

Formula displays as text. The cell is formatted as Text, or the separators do not match your regional settings. Format the cell as General and retype the formula rather than just retyping over it.

#NAME? error. The formula name is misspelled, or the file was saved for an older format where the function path is unavailable. Retry in the current Excel build.

#REF! in the range. Rows or columns referenced by the formula were deleted. Re-point the formula at the surviving data.

If that did not work, copy the data into a fresh sheet, paste with Values only, and total it there. If the figure is now correct, the problem was the original cell types or formatting; if it is still wrong, compare individual cells one by one against a manual sum in a calculator to spot which entries the formula is skipping.

Frequently Asked Questions

What is the difference between SUBTOTAL 9 and 109?

Both sum the range. 9 includes manually hidden rows; 109 excludes them as well as filtered-out rows. Use 109 when you want a total of only what is visible.

Why does SUBTOTAL ignore rows I did not hide?

They may have been hidden by a filter or by a row-height of zero, or they may contain formulas returning SUBTOTAL or text. Check the filter buttons and the ISNUMBER result.

Can SUBTOTAL add text that looks like a number?

No. It sums numeric values only. Convert text-typed numbers with Text to Columns or Paste Special Add first.

Does SUBTOTAL work with numbers in several sheets?

Yes, if you reference the ranges across sheets in one formula, but it cannot sum a whole sheet in a single argument like a 3D reference in some versions. Keep ranges explicit.

Why does the status bar sum differ from my SUBTOTAL?

The status bar sums whatever cells you select on screen, including text-typed numbers in some cases, while SUBTOTAL only adds real numbers and ignores hidden rows. Match the selection to the formula range and compare again.