SUBTOTAL Function in Excel
In this blog post we will learn to about SUBTOTAL function in excel. SUBTOTAL function will return subtotal from the list or database.
Once we click on “Math & Trig” function category, we can see list of various Math & Trig functions available in excel. SUBTOTAL function is highlighted in blue in below image.
Once we click on SUBTOTAL option as highlighted above, we will get the function argument dialog box as shown in below image.
For this select a cell where we want to apply SUBTOTAL function. In this case we have selected cell E2.
Now apply SUBTOTAL function in cell “E2” to calculate the “Average” for numbers listed in reference 1 and reference 2 as shown in below image.
Now apply SUBTOTAL function in cell “E3” to calculate the “count” of numbers listed in reference 1 and reference 2 as shown in below image.
Where to find SUBTOTAL function on Excel Screen:
SUBTOTAL function can be found under “Math & Trig” function category under “Formulas” tab and under “Function Library” group as shown in below image:
Syntax of SUBTOTAL Function:
The Syntax of SUBTOTAL function is as below:
=SUBTOTAL(function_num,ref1, ref2, …)
Arguments of SUBTOTAL Function:
SUBTOTAL function takes arguments as listed below:
function_num: In this argument we have to enter 1 to 11. Each number represents different function as
listed below:
1: AVERAGE
2: COUNT
3: COUNTA
4: MAX
5: MIN
6: PRODUCT
7: STDEV.S
8: STDEV.P
9: SUM
10: VAR.S
11: VAR.P
ref1: This is reference or cell range for which you want to calculate SUBTOTAL.
We can add 1 to 254 ranges or references under SUBTOTAL.
Example of SUBTOTAL Function:
Let’s take an example to learn how we can use SUBTOTAL function. We have created dummy data:
Brown Highlighted Cells: In these cells we have entered few random numbers. This numbers are divided into 02 reference lists. Reference 1 and Reference 2.
Blue Highlighted Cells: In these cells we will calculate the output of SUBTOTAL function based on reference 1 and reference 2.
We will calculate the values for all the 11 functions using SUBTOTAL in these blue highlighted cells:
Once we press enter button on our keyboard then we can see the output of SUBTOTAL function.
Comments
Post a Comment