If your Excel SUBTOTAL function is not working, it is usually because your data is formatted as an official Excel Table, your calculation settings are set to Manual, or you are using the wrong function number for your specific goal. To fix this immediately, ensure your data is in a standard range (not a Table), check that Formulas > Calculation Options is set to Automatic, and verify that your function number (e.g., 9 for SUM, 109 for visible cells only) matches your intent.

What You'll Need

  • A computer with Microsoft Excel installed.
  • A dataset containing numerical values that you wish to aggregate.
  • Basic familiarity with the Excel ribbon and formula bar.

Step-by-Step

  1. Verify the Calculation Mode: One of the most common reasons a subtotal doesn't update is that Excel has switched to Manual Calculation mode. Go to the Formulas tab on the ribbon. Look for the Calculation group and click on Calculation Options. Ensure that Automatic is selected. If it was set to Manual, your subtotal will not change until you press F9 or save the workbook.
  2. Check for Table Formatting: The built-in "Subtotal" feature found under the Data tab does not work inside an official Excel Table (created via Ctrl+T or Insert > Table). If your data has the banded rows and filter dropdowns characteristic of a Table, you must convert it back to a range. Click anywhere inside the table, go to the Table Design tab, and select Convert to Range. Confirm the change when prompted. Now, the Data > Subtotal tool will be available.
  3. Audit the Function Number: The SUBTOTAL function requires a first argument (a number) to tell Excel which operation to perform. If you enter the wrong number, you will get an unexpected result or an error. For example, use 9 for SUM if you want to include hidden rows, or 109 if you want to ignore rows that have been manually hidden. Common function numbers include 1 (AVERAGE), 2 (COUNT), 3 (COUNTA), 4 (MAX), and 5 (MIN).
  4. Validate Data Types: Ensure the numbers you are trying to subtotal are actually stored as numbers and not as text. If you see a small green triangle in the corner of your cells, Excel thinks the number is text. To fix this, highlight the column, click the warning icon that appears, and select Convert to Number. The SUBTOTAL function ignores text values, so if your entire column is formatted as text, the result will be 0.
  5. Check for Hidden Rows vs. Filtered Rows: Understand the difference between the 1-11 range and the 101-111 range in the SUBTOTAL formula. If you use =SUBTOTAL(9, A1:A10), Excel will ignore rows hidden by a Filter, but it will still include rows that you hid manually (right-click > Hide). If you want to ignore both filtered and manually hidden rows, you must use =SUBTOTAL(109, A1:A10).
  6. Clear Existing Subtotals: If you are using the automatic Subtotal tool (Data > Subtotal) and it seems to be duplicating or failing, you must clear the previous ones first. Go to the Data tab, click Subtotal, and in the dialog box, click the Remove All button. Once the sheet is clean, re-apply the subtotals by selecting your data, ensuring it is sorted by the category you want to group, and clicking OK.

Common Mistakes

Many users mistake the SUM function for the SUBTOTAL function. While SUM adds everything in a range, SUBTOTAL is designed specifically to interact with filters. A common error is placing the SUBTOTAL formula inside the range being calculated, which creates a circular reference error. Always place your subtotal formula either above the data range or below it.

Another frequent mistake is forgetting to sort the data before using the automatic Subtotal tool. If your data is not sorted by the grouping column (e.g., sorting by "Region" before subtotalling by "Region"), Excel will create a new subtotal every time the value in that column changes. This results in dozens of fragmented subtotals rather than one clean total per category.

Users also often confuse the AGGREGATE function with SUBTOTAL. While SUBTOTAL is great for filtered lists, AGGREGATE is more powerful because it can ignore not only hidden rows but also error values (like #N/A or #VALUE!). If your subtotal is returning an error because one cell in your range is broken, switching to AGGREGATE is the correct path.

Tips

To make your subtotals more dynamic, consider using a Slicer in conjunction with a SUBTOTAL formula. While the automatic Subtotal tool is helpful for static reports, writing a manual =SUBTOTAL(109, range) formula at the top of your page allows you to filter your data using Slicers and see the total update instantly without rearranging your sheet layout.

For better readability, use the Outline levels that appear on the left side of the screen after using the automatic Subtotal tool. Clicking the small numbers (1, 2, or 3) allows you to collapse the detail and show only the grand total or the category totals, making it much easier to present data to stakeholders.

If you find yourself using subtotals frequently for complex data analysis, consider learning Pivot Tables. Pivot Tables provide the same functionality as subtotals but are more robust, easier to update, and do not require you to constantly convert tables back into ranges.

Troubleshooting

If the subtotal still isn't working after following the steps above, try these advanced checks:

Check for Circular References: Look at the bottom left of your Excel window. If it says "Circular References" followed by a cell address, your subtotal formula is likely trying to calculate itself. Move the formula to a cell outside the range it is referencing.

Verify Range References: Ensure your range is absolute if you are dragging the formula. Use $A$1:$A$100 instead of A1:A100 to prevent the range from shifting downward as you copy the formula to other cells.

Test with a Simple Range: Create a new sheet and enter five simple numbers. Apply =SUBTOTAL(9, range). If this works, the issue is with your specific dataset (likely data types or hidden characters) rather than the Excel installation itself.

Check for Protected Sheets: If you cannot enter the formula or the automatic tool is greyed out, check if the worksheet is protected. Go to the Review tab and check if it says Unprotect Sheet. If it does, the sheet is locked, and you will need the password to make changes.

Frequently Asked Questions

Why is my SUBTOTAL returning 0 even though there are numbers?

This usually happens because the numbers are formatted as text. Excel cannot perform math on text strings. Use the "Convert to Number" feature or the VALUE function to fix the data type.

What is the difference between function 9 and 109?

Function 9 ignores rows hidden by a filter but includes rows you hid manually. Function 109 ignores both filtered-out rows and manually hidden rows.

Can I use SUBTOTAL inside an Excel Table?

The automatic "Subtotal" tool in the Data tab cannot be used in a Table. However, you can manually write a SUBTOTAL formula in a cell outside the table or use the "Total Row" feature built into the Table Design tab.

Why does the Subtotal tool create so many small groups?

This occurs because your data is not sorted. The tool creates a subtotal every time the value in the "At each change in" column changes. Sort your data by that column first.

Does SUBTOTAL work with the SUMIF function?

No, SUBTOTAL and SUMIF are different functions. SUBTOTAL is designed to react to hidden/filtered rows, whereas SUMIF is designed to sum based on specific criteria. If you need both, you may need to use a helper column or the SUMPRODUCT function.