Using the Subtotal Function to Sum Filtered Data in Excel
Filtering data using the Auto Filter feature is very useful. However, when using the Sum function to add up values of an applied filter, the function adds both the visible and hidden cells. Therefore, the solution is to use the Subtotal function, which only calculates the visible cells in a range.