
If any already existing SUBTOTAL formulas are present in the input range of another SUBTOTAL formula, then these values are neglected by subtotal function during the calculation so that double counting is avoided & it prevents the error of double counting.
If there are any subtotals present in the SUBTOTAL range, they will be neglected, i.e. A SUBTOTAL function is applicable only for the numeric value. Function _ num argument value should not be greater than 11 or less than 1, similarly should not be greater than 111 or less than 101 otherwise, it will give #VALUE! error. A SUBTOTAL function is used to ignore values in hidden rows. A SUBTOTAL function can be applied to find a sum of filtered values. Things to Remember about the SUBTOTAL Function It will find out the largest value in the specified range, i.e. In a cell, C16, a SUBTOTAL function is applied, i.e. To calculate the MAX value, Function number 4 or 104 is used in a subtotal function where It will find out the largest value in the specified range. It will find out the smallest value in the specified range, i.e. In a cell, C15, a SUBTOTAL function is applied, i.e. To calculate the MIN value, Function number 5 or 105 is used in a subtotal function where It will find out the smallest value in the specified range. It will give us the sum of all values in C4:C11, provided none are filtered & rows are hidden in that specified range. To calculate SUM value, Function number 9 or 109 is used in a subtotal function where It calculates the Sum of a specified range, i.e. In cell, C14, C15 & C16 SUBTOTAL function is applied. In the below-mentioned example, multiple subtotal functions are applied. It will find a sum of values in visible rows only the SUBTOTAL function neglects hidden rowsExample #3 – SUBTOTAL Function for normal valueĪs all of the cells in the range of quarterly sales figures are visible, none of them is filtered, or rows are hidden it includes all the values. Here, the SUBTOTAL function ignores manually rows hidden and calculates the correct result. We have to Use 109 as a function_num argument in the SUBTOTAL function to Sum up the data. In the excel sheet, row no 15, 16, 19, and 20 have been hidden using the row formatting option by highlighting these rows, right-clicking with the mouse, and selecting Hide.Ī subtotal function is used in cell C23 of the spreadsheet to calculate the sum of visible cells. (Below mentioned, e.g.)Įxample #2 – SUBTOTAL Function for manually Hidden Rows Here subtotal value changes dynamically according to the filter it will find a sum of values in visible rows only the SUBTOTAL function neglects hidden rows. The SUBTOTAL function ignores rows hidden by a filter and calculates the correct result. Use 109 as a function_num argument in SUBTOTAL function to Sum up the data. Let’s calculate specifically Q1 or Q2 or Q3 or Q4 sales data individually for filtered data. If I want the Correct SUM value of Q4 data only, then I need to use the SUBTOTAL function.īefore applying the SUBTOTAL function, Under the data toolbar, apply a filter for the header row. Let’s look out how the SUBTOTAL function works in Excel. Ref1, : One or more references to cells containing the values that the calculation is to be performed for subtotal. It estimates variance based on the entire population. It estimates variance in the specified range. It calculates the Sum of the specified range. It calculates Standard Deviation based on the entire population. It estimates Standard Deviation in the specified range. It calculates the product of cells in the specified range. It will find out the smallest value in the specified range. It will find out the largest value in the specified range. It will Counts non-empty cells in the specified range. It will Count the number of cells that contain numeric values. It calculates the Average of a specified range. It will find values only invisible rows that ignore hidden values in the calculation. Ignore hidden values When the function_num argument is between 101-111, the SUBTOTAL function will exclude or ignore the hidden values. Include hidden values When the function_num argument is between 1-11, the SUBTOTAL function will include the hidden values. It is a type of mathematical operation that you like to perform.Ī function_num argument is applied based on the below mentioned two criteria or methods. SUBTOTAL(function_num, ref1, ,…)Whereįunction_num or operation code: It indicates which function should be used to calculate the subtotals within a given list. The formula for the SUBTOTAL function is as follows: It performs a specified calculation for a given set of values. Returns a subtotal in a database or list, i.e., finding out the subtotal of a given range of cells. Excel functions, formula, charts, formatting creating excel dashboard & others