# Excel | Subtotal – 11 Functions in One

By | 23. 5. 2020

SUBTOTAL is a little strange function. There are 11 mathematical functions hiding inside it. We can calculate sum, arithmetic mean, spread, minimum/maximum and another statistic values using SUBTOTAL function. What’s more, we can limit whether we want to calculate even with hidden values which were hidden manually. All under roof of one function.

## SUBTOTAL – From Mean to Dispersion

Even though this function offer a lot of possibilities, its syntax is very easy in general:

=SUBTOTAL(<type of calculation>;<range of cells>)

Thanks to the number which is the first argument of the function it is possible to select what calculation do we require. Following table shows overview of numeric codes and functions available.

 without hidden values with hidden values function 101 1 AVERAGE 102 2 COUNT 103 3 COUNT2 104 4 MAX 105 5 MIN 106 6 PRODUCT 107 7 STDEV 108 8 STDEVP 109 9 SUM 110 10 VAR 111 11 VARP

Hidden values => hidden rows or columns

You will find a description for each function in help section of Excel or in our articles. So for example if we want to find out minimal value for area B8 to C22, we need to enter =SUBTOTAL(105,B8:C22). Take a look at the example.

It is possible to get many statistic values thanks to SUBTOTAL function without need for any other function. We only change number (code) in the argument. If you want to exclude hidden values from the area selection, enter 102 instead of 2 (for finding number of values) for example. Look at the table above. What is meant by hidden values are cells which are hidden by Hidden rows selection.

You may find our article on statistic functions useful if you want to refresh your basic statistic functions and how to manage them in Excel

Rate this post
Category: Excel functions Tags: ,

## About Ing. Jan Zedníček - BI Developer, Finance controller

My name is Jan Zedníček and I work as a BI Developer at Kentico Software in Brno. Mostly you can see me there working in the office, but I also work partly as a freelancer. I have been working as a freelancer for many companies for more than 5 years, but Kentico is the matter of my heart. I used to work as a financial controller at companies like Aero Vodochody, banking and I also used to be a bond program manager in Unicapital Investment group. When I am not at work, I like playing volleyball, chess, doing a workout in the gym and I enjoy tasting of best quality rums. I am trying to summarize all my knowledge on this website not to forget them (because of the rum effect, you know =) and to put them forward to anyone. Don´t worry about asking for help or writing some comments.

This site uses Akismet to reduce spam. Learn how your comment data is processed.