sumproduct including empty cells

R

Rene

This formula works except when a different column has data in it.
SUMPRODUCT(--(M2:M10="b"),--(C2:C10<100),--(C2:C10>50))/COUNTIF(M2:M10,"b")
c d m
75 b
200 b
25 b


It returns 33% instead of 50%
 
P

Pete_UK

So, are you saying that you want something like this:

=SUMPRODUCT(--(M2:M10="b"),--(C2:C10<100),--(C2:C10>50))/SUMPRODUCT(--
(M2:M10="b"),--(C2:C10<>""))

?

Hope this helps.

Pete
 
R

Rene

However, if column C is empty; ignore that row in the computation. Thanks
for your input.
 

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