Average over autofilter results


Q

QB

I found out instead of using the sum(), I should use the Subtotal() to get
the proper value of a summation over an autofilter result.

That said, I need to get the average of a column which has an autofilter
applied, which function should I use to do this?

Thank you,

QB
 
Ad

Advertisements

Q

QB

After some reading, I found out that the first input variable for the
SubTotal() control what type of value is returned (1- average, 9-sum). So
the one function does it all!

QB
 
L

Luke M

The same, SUBTOTAL. You just need to change the function number to either 1
or 101. The function number controls what type of operation you are
performing. Whereas
=SUBTOTAL(9,A:A)
means to sum,
=SUBTOTAL(1,A:A)
means to average.

See the XL help file for further details.
 
S

Sean Timmons

use function 101 in your subtotal for average not including hidden rows. So,
=SUBTOTAL(101,A2:A500)

If you type =SUBTOTAL(, thin click the Fx button in your address bar, you
can click the "Help on this function" hyperlink for more options.
 
Ad

Advertisements

S

Sean Timmons

Please keep in mind, option 1 is going to average hidden rows. 101 ignores
hidden rows.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top