View Single Post
  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bernd P Bernd P is offline
external usenet poster
 
Posts: 806
Default SUMIF or SUMPRODUCT?

Hello Biff,

I referred to OR criteria, not the same cells. If, for example, you
would need a logical OR on M1:M100 (Y indicating male persons) and on
B1:B100 (Y indicating blonde hair) and if you need to count persons
who are male OR blonde then you don't want to double count blonde AND
male persons.

So =SUMPRODUCT(("Y"=B1:B100)+("Y"=M1:M100)) would be wrong but
=SUMPRODUCT(SIGN(("Y"=B1:B100)+("Y"=M1:M100))) would be ok.

Regards,
Bernd