PDA

View Full Version : Solved: Counting Multiple Cell Values



jimoo
01-12-2006, 09:59 AM
I am trying to count all E2:E79 cell values with a "Y" and all F2:F79 cells with a Value of 3

This give me the number of "Y" in the first match
=COUNTIF(F2:F79,"Y")

This gives me the number of "3"
COUNTIF(E2:E79,"3")

But what I want is the then of "Y" with a Value of "3"

I don't see any way to do that with COUNTIF(). Am I missing something or do I need a script to spin through and count. If I need a script, any code snippet you have would be helpful.

:banghead:

Bob Phillips
01-12-2006, 10:01 AM
I am trying to count all E2:E79 cell values with a "Y" and all F2:F79 cells with a Value of 3

This give me the number of "Y" in the first match
=COUNTIF(F2:F79,"Y")

This gives me the number of "3"
COUNTIF(E2:E79,"3")

But what I want is the then of "Y" with a Value of "3"

I don't see any way to do that with COUNTIF(). Am I missing something or do I need a script to spin through and count. If I need a script, any code snippet you have would be helpful.

=SUMPRODUCT(--(F2:F79="Y"),--(E2:E79="3"))

if E2:E79 are numbers compare against 3 not "3"

jimoo
01-12-2006, 08:07 PM
Worked perfectly - Thank You