The SUBTOTAL function is one of the math and trigonometry functions. The function is used to return a subtotal in a list or database.
The SUBTOTAL function syntax is:
function-number is a numeric value that specifies which function to use for the subtotal. The possible values are listed in the table below. For the function-number arguments 1 to 11, the SUBTOTAL function includes values of the rows that have been hidden manually. For the function-number 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.
argument-list is a reference to the cell range containing the values for which you want the subtotal.
To apply the SUBTOTAL function,
- select the cell where you wish to display the result,
- click the Insert Function icon situated at the top toolbar,
or right-click within a selected cell and select the Insert Function option from the menu,
or click the icon situated at the formula bar,
- select the Math and trigonometry function group from the list,
- click the SUBTOTAL function,
- enter the required arguments separating them by comma,
- press the Enter button.
The result will be displayed in the selected cell.
The figure below displays the result returned by the SUBTOTAL function when several rows are hidden.
Return to previous page