Averaging results from a filtered column?!

russell henderson

New Member
Joined
Nov 17, 2016
Messages
3
So this should be the easiest thing in the world but it wasn't covered in the Excel training I did yet did come up in an interview as an exercise..

I have a spreadsheet containing a number of columns as a table. I need to filter one column (to select nationalities) and average the sum (of duration of stay).

So I did an autosum at the bottom of the duration of stay column then expected that when I filtered this by nationality - It would recalculate the average on the basis of what was displayed.

I ended up doing the averages on a calculator and feeling like an idiot.. so what am I missing?
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
You need SUBTOTAL function. The first argument is the kind of operation you need (AVERAGE, in your example).
 
Upvote 0
Hi Russel,

I think you can add this formula at the bottom row of your table: =SUBTOTAL(1;AH108:AH120) 'change AH108:AH120 to your range

Hope it helps! :)
 
Last edited:
Upvote 0
Following on this question, if I have zero's or blanks and I don't want those calculated in the average (Subtotal(101, range1, range2) what additional component can I add to not look at blank or zero cells? Appreciate the help!
 
Upvote 0

Forum statistics

Threads
1,214,832
Messages
6,121,845
Members
449,051
Latest member
excelquestion515

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top