# Summarize only filtered values using SUBTOTAL & AGGREGATE formulas

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.

Basics:

### 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.

Hello Awesome...

My name is Chandoo. Thanks for dropping by. My mission is to make you awesome in Excel & your work. I live in Wellington, New Zealand. When I am not F9ing my formulas, I cycle, cook or play lego with my kids. Know more about me.

Thank you and see you around.

### Related articles:

 Written by Chandoo Tags: advanced excel, aggregate(), awesome august, data filters, downloads, large, Learn Excel, Microsoft Excel Formulas, screencasts, SUBTOTAL, videos Home: Chandoo.org Main Page ? Doubt: Ask an Excel Question

### 4 Responses to “Summarize only filtered values using SUBTOTAL & AGGREGATE formulas”

1. Heather says:

Thanks Chandoo - once again you have inspired me to look at a different function for something I do regularly.

I have used the Subtotal function for years, but had completely ignored Aggregate - and this showed me that I really need to look at this function more closely.

I use Subtotal for filtering purposes, but also to provide subtotals of my numbers and know that they can be ignored when I use a Subtotal at the very bottom to sum the entire column.

2. Kiev says:

Thanks, Chandoo, I am very happy to know this new function - aggregate, it make such a compensate for the subtotal...great...

3. MF says:

I use SUBTOTAL(103,Ref) to determine whether a row is hidden or not.

4. prasha99 says:

superb! its a great help.

 « Dynamic Print Areas How to use GETPIVOTDATA with Excel Pivot Tables »

### Get FREE Excel & Power-BI Newsletter

One email per week with Excel and Power BI goodness. Join 100,000+ others and get it free.