• Home
  • SUBTOTAL function

SUBTOTAL function

The SUBTOTAL function is one of the math and trigonometry functions. The function is used to return a subtotal in a list or database.

Syntax

SUBTOTAL(function_num, ref1, [ref2], ...)

The SUBTOTAL function has the following arguments:

ArgumentDescription
function_numA numeric value that specifies which function to use for the subtotal. The possible values are listed in the table below. For the function_num arguments 1 to 11, the SUBTOTAL function includes values of the rows that have been hidden manually. For the function_num arguments 101 to 111, the SUBTOTAL function ignores values of the rows that have been hidden manually. Values hidden by the filter are always excluded.
ref1/2/nUp to 255 references to the cell range containing the values for which you want the subtotal.

The function_num argument can be one of the following:

function-number (includes hidden values)function-number (excludes hidden values)Function
1101AVERAGE
2102COUNT
3103COUNTA
4104MAX
5105MIN
6106PRODUCT
7107STDEV
8108STDEVP
9109SUM
10110VAR
11111VARP
Notes

How to apply the SUBTOTAL function.

Examples

The figure below displays the result returned by the SUBTOTAL function.

SUBTOTAL Function

The figure below displays the result returned by the SUBTOTAL function when several rows are hidden.

SUBTOTAL Function

Host ONLYOFFICE Docs on your own server or use it in the cloud

Article with the tag:
Browse all tags