We all know the good old SUM() formula. It can sum up values in a range. But what if you want to sum up only filtered values in a range? SUM() doesn’t care if a value is filtered or not. It just sums up the numbers. But there are other formulas that can pay attention to the filters. Let’s learn about them.

Summarize filtered values using SUBTOTAL & AGGREGATE Formulas – video
You may watch this video on our YouTube channel too.
Download Example Workbook
Please click here to download the example workbook. Examine the formulas and play with filters to learn more.
More about Filters, SUBTOTAL & AGGREGATE
Learn more about these features & how they can make you awesome:
Basics:
- Introduction to SUBTOTAL Formula
- Introduction to Excel Slicers – Visual Filters
- Make dynamic charts with filters
Advanced Stuff:
- How to count & sum filtered tables,
- Count & sum with criteria on a filtered list
- Sum up top 3 filtered values using AGGREGATE
- Check if a table is filtered or not using formulas
- Case study – Christmas shopping list
What do you use SUBTOTAL for?
Do you use SUBTOTAL and AGGREGATE functions? What do you use them for? Please share your thoughts in the comments section.

















11 Responses to “MLB Pitching Stats Dashboard in Excel+VBA by our VBA Class Student”
Hey Dan,
Thanks a lot... this is too good 🙂
Awesome stuff Dan! very impressed..
Thanks guys.
Some nice ideas in there, thanks for sharing. I noticed the list with teams has a missing value though ('Arizona Diamondbacks'). Also when manipulating Pivot Tables with VBA you should be really careful not to try to select a value that isn't in the Pivot Table, if you do all hell breaks loose 🙂 That's not the case here but just some advise as I learned the hard way...
Ah.....ya caught me.
dnrTeamName drives both the charts and the drop down list. It refers to:
=OFFSET(PvtTeams!$A$6,0,0,COUNTA(PvtTeams!$A$6:$A$40),1)
If you change A6 to A5, it fixes that little issue.
A better question though, who actually cares about the Arizona Diamondbacks?
🙂
Excellent post. Thanks
Great job, Dan! Thanks a million!
[...] MLB Pitching Statistics Dashboard [...]
Gr8 work Dan
Hi,
I downloaded file, but looks like everything is in xml. Was there suppose to be excel file as well?
Thanks!
I'm late to the party, but seeing this file in action and studying the underlying data in this Excel file has been AWESOME. I have TONS of new ideas to implement in my work files now. THANK YOU Dan and Chandoo!