Count if cetain text is in another column, same row.

  • Thread starter Thread starter bhammer
  • Start date Start date
B

bhammer

Excel 2003,

Simple, I hope. Column A has "X"s here and there (like checkmarks).
Some are blank. Column B has either "Bob" or "John". I want a cell to
total the number of X's for Bob, and another cell to total the X's for
John.
-Brad
 
Try this:

=SUMPRODUCT((A1:A100="X")*(B1:B100="Bob"))

=SUMPRODUCT((A1:A100="X")*(B1:B100="John"))

Adjust the ranges to suit your data.

Hope this helps.

Pete
 
Excel 2003,

Simple, I hope. Column A has "X"s here and there (like checkmarks).
Some are blank. Column B has either "Bob" or "John". I want a cell to
total the number of X's for Bob, and another cell to total the X's for
John.
-Brad

Try this:

=SUMPRODUCT((A:A="X")*(B:B="John"))

Hope this helps / Lars-Åke
 
Here is a formula for John...

=SUMPRODUCT((A1:A100="X")*(B1:B100="John"))

and for Bob...

=SUMPRODUCT((A1:A100="X")*(B1:B100="Bob"))

Rick
 
For Bob:
=SUMPRODUCT(--(A2:A100="X"),--(B2:B100="Bob"))

For John
=SUMPRODUCT(--(A2:A100="X"),--(B2:B100="John"))

HTH,
Paul
 
Back
Top