Group:  Microsoft Excel ยป microsoft.public.excel.datamap
Thread: Using count in AND statement

Geek News

Using count in AND statement
anamarie30 3/12/2007 1:58:03 PM
Hi,

I tried to make a formula that count if two statements are true. For example,
=COUNTIF(M!E2:E37,"P") This formula give me the correct number that is 7.
=COUNTIF(M!L2:L37,"Y") This formula give me the correct number that is
25.

Then, I tried to combined this 2 formulas for using a conditional statement
AND, because I want that the formula count when this 2 statements are true.
=AND((COUNTIF(M!E2:E37, "P")), (COUNTIF(M!L2:L37, "Y"))) Result: True

Then, I tried to make the count if this condition are True, but the count
give a wrong number. The formula that I tried is
=COUNT(AND((COUNTIF(M!E2:E37, "P")), (COUNTIF(M!L2:L37, "Y"))))

Thanks

RE: Using count in AND statement
Gary''s Student 3/17/2007 9:44:08 AM
=SUMPRODUCT(--(E2:E37="p"),--(L2:L37="y"))
--
Gary''s Student
gsnu200710


Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net