countif for multiple variables

  • Thread starter Thread starter dwiener
  • Start date Start date
D

dwiener

I have two columns with text variables. I need a formula
to count the events where specified conditions for column
1 and column 2 are met. For instance, if column one is
race and column 2 is choice, I need a formula to count the
number of times when race is caucasian and choice is red.
I have not been able to get a formula to work. Help would
be most appreciated.
 
Hi
try
=SUMPRODUCT((A1:A100="caucasian")*(B1:B100="red"))

or as alternative syntax:
=SUMPRODUCT(--(A1:A100="caucasian"),--(B1:B100="red"))
 
Back
Top