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


SUMMARIZE DATA WITH DYNAMIC SUBTOTALS...

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.

DOWNLOAD EXCEL WORKBOOK

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  
1101AVERAGE
2102COUNT
3103COUNTA
4104MAX
5105MIN
6106PRODUCT
7107STDEV
8108STDEVP
9109SUM
10110VAR
11111VARP

HELPFUL RESOURCE:

hmb_logo_01Lg

 

 

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

email

Pin on Pinterest

Share on Facebook

Tweet about this on Twitter

Share on LinkedIn

Share on Google+

Related Posts

Advanced SUMPRODUCT Function: Conditional Sum Another great way that you can use the SUMPRODUCT function is to create a conditional sum criteria.For example, you may want to find out how much sales were made above the $3,000 transactional level.  See how easy it is with this quick SUMPRODUCT example.DOWNLOAD WORKBOOK...
Lock & Protect Formula Cells If you have a workbook with lots of formulas and you want to protect those formulas from being amended by other people who share your workbook, then you can!You need to follow these steps:1. Press the Go To Special shortcut CTRL+G2. Select the Constants box and press ...
Excel’s Subtotal Feature Excel´s Subtotal feature is a great way to automatically insert a Sum/Count/Average/Max/Min subtotal to your data set with a press of a button.This feature is located under the Excel Data tools menu: Data > Subtotal.  To insert this feature you need to follow these quick s...
Excel’s Fill Handle Tips This post was inspired by Mr.Excel's new book MrExcel XL: 40 Greatest Excel Tips of All Time and in particular the 3rd tip that I read called The Fill Handle Does Know 1,2,3...Excel knows to fill down/right when you are working with dates, days, months, years and even quarter...

DO YOU WANT TO GET BETTER AT EXCEL?
If so, join over 80,000 professionals who get career boosting, Free Excel lessons delivered on a weekly basis & receive our Free Excel Keyboard Shortcuts Template

Click here to subscribe

Leave a Comment

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