Articles with the tag:
Close
Changelog
Close
Articles with the tag:
Close
Try in the cloud
Try in the cloud

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:

Argument Description
function_num A 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/n Up 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
1 101 AVERAGE
2 102 COUNT
3 103 COUNTA
4 104 MAX
5 105 MIN
6 106 PRODUCT
7 107 STDEV
8 108 STDEVP
9 109 SUM
10 110 VAR
11 111 VARP

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

Return to previous page
Try now for free Try and make your decision No need to install anything
to see all the features in action