Addition to Formula
SUMIF and SUM add all cells in the range hidden or visible. However
SUBTOTAL sums only visible cells. This is particularly useful if you
have AutoFilter in place on your data.
Suppose Column A has product name and Column B has Sales Quantities;
Product name repeats in several rows.
Leave two blank rows where your data ends in Column B and write
SubTotal instead of Sum. For example =SUBTOTAL(9,B1:B10)
Build AutoFilter on Column A and filter on your Product name; some
cell may be hidden depending on filter selection.
You will find that Subtotal will only add visible cells, not all cells
in the range.
Aqib Rizvi
|