Excel Blog - Calculations on a Filtered List
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.
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?
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:
So here’s the same example as above using the subtotal function:
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.
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.
Testimonials from happy Customers
Trusted Customer8 days ago
The course well thought out, relevant , easy to follow and the tutor was very experienced.
Emma Clegg9 days ago
Very helpful and detailed
Trusted Customer9 days ago
Very useful course. Great tuition from instructor. Good pace of learning.
Elena Gatti9 days ago
Kevin was very attentive to how I learnt
Trusted Customer13 days ago
Service was very good, food was nice
Catherine Thomas15 days ago
Environment was relaxed and friendly. Course content was self explanatory and not too compacted in the time available.
Wendy Wilderspin16 days ago
Good service from applying to completing training event
Trusted Customer16 days ago
The trainer was very knowledgeable and made the course enjoyable. I also liked the relaxed atmosphere at Happy
Elena Gatti16 days ago
It was very useful.
Trusted Customer17 days ago
A lot of information to support previous knowledge.
Adebayo Ademefun23 days ago
i enjoyed the training and the trainer is a joy to work with. She is an excellent trainer
Jane Whittaker25 days ago
I've had 3 courses with Happy - Word, Powerpoint and Excel, they've all been excellent. The tutors are knowledgeable, friendly and helpful. I recommend Happy all the time...