If the SUBTOTAL function returns 0, a wrong number or an error instead of the total you expect, the cause is almost always one of four things: the data is stored as text, rows are hidden or filtered in a way that changes which rows SUBTOTAL counts, the formula is pointing at the wrong range, or calculation is set to Manual. The quick fix for most cases is to convert the numbers to real numeric values with Text to Columns and switch calculation to Automatic. Below are the full checks, in the order that resolves the problem fastest.

What You'll Need

  • Excel for Windows, Excel for Mac or Excel for the web. The menu names are the same, but the ribbon sits in slightly different places on Mac and on the web, and labels can differ slightly by version and region.
  • A backup copy of the workbook if you are going to convert values or delete helper columns. Go to File and use Save a Copy before you start editing.
  • The cell range you expect to total. Knowing it in advance makes it easy to spot when the formula is pointed somewhere else.

Step-by-Step

  1. Check whether calculation is set to Manual. Look at the status bar at the bottom of the window. If it says Calculate or Manual, formulas are not refreshing. Press F9 to recalculate the whole workbook, or Shift+F9 to recalculate only the active sheet. To make it permanent, go to the Formulas tab, click Calculation Options and choose Automatic. On Excel for the web this setting is always automatic, so if you see it there, move on to the next step.
  2. Look for a green triangle in the corner of the number cells. If you see one, the values are stored as text. Select the cells, click the warning icon that appears and choose Convert to Number. For a whole column, select it, go to the Data tab and click Text to Columns, then click Finish without changing anything. SUBTOTAL ignores text, which is why the total comes back as 0 or too low.
  3. Check the range argument. Click the formula cell and look at the highlighted box on the sheet. If it covers only part of your data, or includes a blank row or an existing total row, rewrite it. In the formula bar, type =SUBTOTAL(9,B2:B50), where 9 means SUM and B2:B50 is your data range. Use 109 instead of 9 if you want the function to ignore manually hidden rows as well as filtered ones.
  4. Watch for circular references and self-reference. If the SUBTOTAL formula sits inside the range it totals, Excel reports a circular reference warning or returns 0. Place the total in a row below the data or a separate cell outside the range, and make sure the quoted range stops before the total row.
  5. Confirm the rows are filtered, not just hidden. SUBTOTAL with function number 9 excludes rows hidden by an AutoFilter, but a plain sum of visible rows is not what you get if you hid rows manually. Right-click the row numbers and check whether Unhide is available. If you want manual hides excluded too, switch the function number to 109.
  6. Check for zero-height rows and blank rows. A row set to a height of 0 is treated as hidden. Select all the rows around the data, right-click a row header and choose Row Height, then type a normal value such as 15 and click OK.
  7. Verify the function number matches what you want. 9 gives a sum, 1 gives an average, 2 a count of numeric cells, 3 a count of non-empty cells, 4 a maximum and 5 a minimum. If you pasted a formula from elsewhere, the number may have changed. The 100-series versions, 101 to 109, do the same job but also ignore manually hidden rows.
  8. Clear errors inside the range. SUBTOTAL cannot add a cell that contains an error such as #DIV/0! or #VALUE!. It will refuse to return a total. Use Go To Special to find them: press Ctrl+G, click Special, choose Formulas and tick Errors, then fix or delete each one. On Mac, use Edit and Go To and Special.
  9. Recalculate and re-check the result. Press F9, then compare the SUBTOTAL result with a plain SUM of the same range. If the two agree, the data is fine and the issue was a filter or a hide. If they still differ, revisit steps 2 and 5.

Common Mistakes

  • Typing numbers with a leading apostrophe or as entries imported from another system, which leaves them as text and invisible to SUBTOTAL.
  • Wrapping SUBTOTAL around a range that contains another SUBTOTAL. Nested subtotals double-count or cancel out. Keep one total row outside the data.
  • Using the plain SUM function when the point was to sum only filtered rows. SUM totals hidden rows, SUBTOTAL does not.
  • Deleting the Subtotal command's outline rows (the greyed groups on the left) without checking that your formulas do not depend on them.
  • Assuming SUBTOTAL ignores any row you cannot see. It ignores filtered rows and, with the 100-series numbers, manually hidden rows, but it does not ignore rows hidden by a group collapse in every case. Confirm with a plain SUM comparison.

Tips

  • Use the Subtotal button on the Data tab so Excel writes the formula for you. It inserts the correct function number and range automatically, which removes most manual errors.
  • Give your data range a name using the Name Box. A named range is easier to audit than a hard-coded cell reference and survives inserted rows.
  • Format numbers as Number or Currency rather than General. It will not fix text values, but it makes text cells stand out because they align to the left while numbers align to the right.
  • Keep a couple of rows of blank space between your data and any notes below it so a future range selection does not pick up text and return a low total.
  • Use the status bar as a quick sanity check. Select the column and see whether Sum, Count and Average appear there. If only Count appears and Sum is missing, the cells are text.

Troubleshooting

The total shows 0 and the status bar also shows no Sum. The values are text. Run the Text to Columns fix in step 2.

The total is correct with plain SUM but not with SUBTOTAL. A filter or a hidden row is active. Remove the filter or change the function number to the 100-series version if you want manual hides excluded as well.

The total updates only when you click into the cell. Calculation is on Manual. Switch it back to Automatic on the Formulas tab.

Excel shows a circular reference warning. Move the SUBTOTAL cell outside its own range, as described in step 4.

The formula returns #VALUE! or an error. Somewhere in the range a cell contains an error value or a stray character. Find the errors with Go To Special and repair them, then recalculate.

Nothing updates even after all of the above. Close the workbook and reopen it. For stubborn files, select the column, copy it, then paste it back with Paste Special and choose Values. This leaves only raw values, so the formula has nothing left to misread.

Frequently Asked Questions

Why does SUBTOTAL return 0 when SUM works?

SUBTOTAL ignores text and errors, and it also excludes filtered rows. If the range is entirely filtered out or the cells hold text, SUBTOTAL finds nothing to add and returns 0.

What is the difference between 9 and 109 in SUBTOTAL?

Both perform a sum. 9 ignores filtered rows, while 109 ignores filtered rows and rows you have hidden manually.

Does SUBTOTAL work on Excel for the web and Mac?

Yes. The function is the same on every platform. The Calculation Options setting is only found on the desktop app; the web version always calculates automatically.

Why is my SUBTOTAL result lower than the SUM of the column?

A filter or hidden rows are excluding data from the total. Clear the filter and compare again, or use 109 to match the behaviour you want.

Can I subtotal more than one column at once?

Yes. Use the Subtotal command on the Data tab and tick the columns you want, or copy a SUBTOTAL formula across a row so each column has its own range.

Why do my numbers still not add up after I convert them?

Some values may contain spaces, non-breaking spaces or currency symbols that survived the conversion. Look for them with Find and Replace, clear them out, then recalculate.