CountIf for multiple columns

G

Guest

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.
 
G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top