Calculations on a Filtered List in Excel

In: BlogDate: May 29, 2013By: Darren Andrews

Auto filter is a wonderful thing isn’t it? With a few clicks of the mouse little dropdowns appear letting you filter your data in a myriad different ways.

In this blog, learn how to create a dropdown filter in your Excel spreadsheets.

Hi, we are Happy

We are leading a movement to create happy, empowered and productive workplaces.

How can we help you and your people to find joy in at least 80% of your work?

More about Happy

 

But what if you want to find out the total or average of your filtered data? Unfortunately the SUM, AVERAGE, COUNT, COUNTA etc functions seem to let us down here.

Here’s my unfiltered data and the SUM function in action:

 

And here’s my filtered data:

 

Notice anything different? No? Exactly! We may want the SUM function to only sum the visible data but, as it was designed to do, it will sum ALL of the data, even the hidden rows.

So what’s the answer? The SUBTOTAL function!

The subtotal function can, if we ask it nicely, ignore any values hidden by the autofilter. It looks like this:

=SUBTOTAL(function_num,ref1,[ref2], . . . . ])

The function_num argument tells the subtotal function what sort of calculation you want it to do:


1 AVERAGE
2 COUNT
3 COUNTA
4 MAX
5 MIN
6 PRODUCT
7 STDEV
8 STDEVP
9 SUM
10 VAR
11 VARP

So here’s the same example as above using the subtotal function:

 

Related Blogs

Why not sign up to our newsletter?

Sign up to our monthly newsletter, full of tips, tricks and news to help you to be happier and more productive at work.

Sign up here

Improve your productivity in Excel with happy

Happy has high-quality, learner-focused Excel training courses for all skill levels, designed to improve your confidence and productivity and our online learning programme is just as interactive as our classroom sessions.

Here are our most popular options:

  • If you are new to Excel, take a look at our Introduction to Excel course. Our next public dates are 7th January, held online, and in the classroom at Happy on 30th January. 
  • If you are comfortable with using Excel and creating formulas, take a look at our Excel for Intermediate Users course. Learn at Happy on 17th December, or on 16th January, held online.
  • Wanting to analyse Excel data more effectively? We have an intensive full-day Excel for Advanced Users course. Our next online session is on 21st January, or join us in the classroom on 11th February.
  • For expert users, we have an Expert Excel Core Level 4 course, covering advanced formulas and functions such as XLOOKUP and dynamic array functions. Join us in the classroom on 22nd January, or online on 4th February.

Our learners tell us that they save an average of 32 minutes a day with our Excel training courses. How much time could you save with us?

Why learn online with Happy?

  • Interactive and engaging - just like our classroom sessions
  • Bitesize or full-day sessions - fit around your schedule
  • Learn from home - all you need is a quiet place to call from and an internet connection
  • IT Helpline - 2 years of free support after your course
  • No quibble money-back guarantee

Darren Andrews

Darren is one of Happy's Senior Trainers, able to train almost every IT course on our course programme. He worked for Happy for 12 years and has been an Associate Trainer since 2018.

More by Darren