FormulaCamp
Completed
← All functions
Math

SUBTOTAL

Total over visible rows only (respects filters). 9 is sum, 1 is average.

Syntax

SUBTOTAL(function_num, ref1, …)

Example: =SUBTOTAL(9,C2:C100)

Available in: All versions

Try it

A tiny spreadsheet with example data. Edit the formula or any number and see the result.

Formula in F2: =SUBTOTAL(9,C2:C7)

Example spreadsheet for SUBTOTAL
ABCDEF
1RegionProductUnitsPriceResult
2EastPen1202.5350
3WestPen802.5
4EastBook4512
5NorthBook6012
6WestLamp3025
7EastLamp1525
Result in F2: 350
Practice this in a lesson: Filter and SUBTOTAL

Practice

More in Math