CountIf for multiple columns

J

John English

I am trying to collect the number of letters in a column that also have a
letter in another column.

Here is what I am trying to do:
I would like to combine to combine the two formulas below
countif(C21:C206,"Y") and countif(G21:G206,"E")

In other words, I would like a target cell to sum the number of rows that
have a "Y" in Column C and a "E" in Column G. Is this possible?

Thank you for your help.
 
J

John English

Thank you sir that did the trick.

Dave Peterson said:
=sumproduct(--(c21:c206="y"),--(g21:g206="e"))

Adjust the ranges to match--but you can't use whole columns (except in xl2007).

=sumproduct() likes to work with numbers. The -- stuff changes trues and falses
to 1's and 0's.

Bob Phillips explains =sumproduct() in much more detail here:
http://www.xldynamic.com/source/xld.SUMPRODUCT.html

And J.E. McGimpsey has some notes at:
http://mcgimpsey.com/excel/formulae/doubleneg.html
 
Top