This function calculates a subtotal of a list of numbers using a specified built-in function.
SUBTOTAL(functioncode, value1, value2,...)
The functioncode argument is the number that represents the built-in function to use for the subtotal, as given in this table.
Function Code (Include Hidden Values)
Function Code (Ignore Hidden Values)
Each additional argument can be a double-precision floating-point value, an integer value, or an array (cell range) of these. Up to 255 arguments can be included. You can use a single array (cell range) instead of a list of values. You can use multiple arrays (cell ranges) as well.
The SUBTOTAL function does not include other SUBTOTAL formula results that are in the same range. Setting the row height to zero also hides the values.
Accepts numeric data for all arguments. Returns numeric data.