Count Cells that meet Criteria

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

Guest

I want to count all the X's in Cells A5:A10 if there is a C in Cells B5:B10.
Can someone help? Thanks
 
=SUMPRODUCT(--(A5:A10="X"),--(B5:B10="C"))

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 
Bob,

why do we need "--" between the brackets? I did this formulae as

=SUMPRODUCT((A5:A10="X")*(B5:B10="C"))

and this too worked fine, but again I don't know why I need to use " *
" multiplication here.

Please do let me know both the things.

thanks

Shail
 
Back
Top