A usual Sum formula won't work in this case because the Excel SUM function adds all values in the specified range including the hidden (filtered out) rows.
Excel SUM is a math and trig function that adds values. The syntax of the SUM function is as follows: SUM (number1, [number2] ,…) The first argument is required, other numbers are optional, and you can supply up to 255 numbers in a single formula.
To fix this, go to the Formulas tab, click the dropdown arrow next to Calculate Options, and click Automatic.
Another way to sum filtered cells in Excel is to apply an AutoFilter to your data manually by clicking the Filter button on the Data tab. And then, write a Subtotal formula yourself.
In this case, use the Subtotal function instead, as demonstrated in How to sum only visible cells in Excel.
Similarly to totaling a column, you can sum a row in Excel by using the SUM function, or have AutoSum to insert the formula for you.
Another common reason for a Sum formula (or Excel AutoSum) not working are numbers formatted as text values. At first sight, they look like normal numbers, but Microsoft Excel perceives them as text strings and leaves them out of calculations.
Generally, the SUM function is used as part of bigger formulas used in complex calculations. Suppose we are given the following data:
To understand the uses of the SUM function, let’s consider a few examples:
SUM helps users perform a quick summation of specified cells in MS Excel. For example, we are given the cost of 100 items bought for an event. We can use the function to find out the total cost of the event.
The Excel SUM function returns the sum of values supplied. These values can be numbers, cell references, ranges, arrays, and constants, in any combination. SUM can handle up to 255 individual arguments.
LAMBDA functions do not require VBA, but are only... Sum through n months.