Summarize Data With Dynamic Subtotals

What does it do?

It returns a Subtotal in a list or database

Formula breakdown:

=SUBTOTAL(function_num, ref1)

What it means:

=SUBTOTAL(function number 1-11 includes manually-hidden rows & 101-111 excludes them, your list or range of data)

***Go to the bottom of this post to see what each value stands for


The Subtotal function can become dynamic when we combine it with a drop down list.

This is a great trick and one that can be used when creating an Excel Dashboard that summarizes key data metrics on one page.


STEP 1:  We need to list the Subtotal summary functions in our Excel worksheet

Subtotal Summary Names

STEP 2: In the ribbon select Developer > Insert > Form Controls > Combo Box

Excel Form Controls Combo Box

STEP 3: With your mouse select the region where you want to insert the Combo Box

STEP 4: Right Click on the Combo Box and select Format Control…

Excel Format Control

STEP 5: For the Input Range, you need to select the range with the Subtotal summary names from STEP 1

STEP 6: For the Cell Link, you need to select a cell where you want to show the output and press OK

(The Cell Link increments by 1 depending on the order of the list and the name chosen.  We will use this value as our first argument in the SUBTOTAL function)

STEP 7: Enter the Subtotal function and for the first argument function_num we will reference the Cell Link from STEP 6

Excel Subtotal 1st argument

STEP 8: For the second argument, select the data range

Excel Subtotal 2nd argument

So you can see as you choose a summary name from the drop down list, it gives us a value for the Cell Link which is equals to the function_num for that summary name!

Subtotal Dynamically

***Values for the SUBTOTAL function_num:

Includes hidden values     Ignores hidden values     Function  
2 102 COUNT
3 103 COUNTA
4 104 MAX
5 105 MIN
7 107 STDEV
8 108 STDEVP
9 109 SUM
10 110 VAR
11 111 VARP





If you like this Excel tip, please share itEmail this to someone


Pin on Pinterest


Share on Facebook


Tweet about this on Twitter


Share on LinkedIn


Share on Google+


Related Posts

Go To Blanks The Go To Special tool within Excel is a must for any serious Excel user as it has an array of useful spreadsheet formatting and clean up tools. One that I use all the time is the Go To Special > Blanks.  This allows you to delete multiple blank rows/column within seconds. ...
Replace Excel Formatting with Another Formatting Imagine this, you have a table full of bold text.  The bold text could also be all over your worksheet in random cells. Then you decide that the bold text does not suit your expected design and prefer red colored text instead. What would you do? Changing all of the forma...
VLOOKUP Function: Introduction What does it do? Searches for a value in the first column of a table array and returns a value in the same row from another column (to the right) in the table array. Formula breakdown: =VLOOKUP(lookup_value, table_array, col_index_num, ) What it means: =VLOOKUP(thi...
Jump To A Cell Reference Within An Excel Formula When writing, editing or auditing Excel formulas you will come across a scenario where you want to view and access the referenced cells within a formula argument. This is helpful if you want to check how the formula works or to make any changes to the formula. There is ...

If so, join over 75,000 professionals who get career boosting, Free Excel lessons delivered on a weekly basis!

Click here to subscribe

Leave a Comment

Your email address will not be published. Required fields are marked *