average with mulitple ciriteria

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I want to get the average with two criteria. if the cells in column Z = B11
then I want the average value from column CA (BUT I only want the average of
cells greater than zero.)
 
You could use sumproduct to add the appropriate cells and to the count the
appropriate cells, then just divide the two:
=sumproduct(--(z1:z5000=b11),--(ca1:ca5000>0),(ca1:ca5000)) /
sumproduct(--(z1:z5000=b11),--(ca1:ca5000>0))
--Bruce
 
that worked a treat - thanks!

bpeltzer said:
You could use sumproduct to add the appropriate cells and to the count the
appropriate cells, then just divide the two:
=sumproduct(--(z1:z5000=b11),--(ca1:ca5000>0),(ca1:ca5000)) /
sumproduct(--(z1:z5000=b11),--(ca1:ca5000>0))
--Bruce
 

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

Back
Top