Excel SUBTOTAL function

The SUBTOTAL function is a more powerful version of the SUM function due to additional arguments built into the formula.

The SUBTOTAL function is built as below: –

=SUBTOTAL(arguments, range start : range end)

The following arguments can be applied:-


The main advantage of the SUBTOTAL() function over the SUM() function is that if we include other SUBTOTALS() in the list they are ignored in the totaling.

Excel Subtotal function

As can be seen above the SUBTOTAL excludes row 12 from the caluclation whereas the SUM function counts row 12.