Compute an Average by category

  • Thread starter Thread starter glen.e.mettler
  • Start date Start date
G

glen.e.mettler

Here is my formula
=IF(ISERROR(AVERAGE(IF(F5:F112<>0,F5:F112,""))),0,AVERAGE(IF(F5:F112<>0,F5:F112)))

It calculates an average that is not 0 and not an error - works just
fine.
Each of the rows is also a member of a category
ECP, ROM, REA etc

Is there a way I can calculate the average of each of them separately
by setting a filter?

Thus, if I filtered on ECP, then the average calculated would be only
for ECP.

Is that possible without a macro?

Glen
 
You can use subtotal function and a filter

=SUBTOTAL(1,range)


will average visible rows
 
That will average visible rows but it includes the 0 and empty cells in
the calculation.
How can I get it to ignore 0 and empty cells?

Glen
 
Why don't you filter that column as well, use custom and not equal to 0,
that will hide zeros
blanks are never included unless you use arrays and this wouldn't be that


--

Regards,

Peo Sjoblom

http://nwexcelsolutions.com
 

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

Similar Threads


Back
Top