COUNT IF

P

PAL

I am trying to count the number of rows if two parameters are met. I am
using this formula as an array. I get "0" returned and I know it is wrong.
Please advise. Thanks.

=COUNT(IF($F$2:$F$119="AAA",IF($D$2:$D$119="N",$D$2:$D$119,""),""))
 
G

Gary''s Student

Anytime you must deal with two or more criteria, consider SUMPRODUCT():

=SUMPRODUCT(($F$2:$F$119="AAA")*($D$2:$D$119="N"))
 
J

John C

You should use SUMPRODUCT
=SUMPRODUCT(--($F$2:$F$119="AAA"),--($D$2:$D$119="N"))
 
M

Max

Try:
=SUMPRODUCT(($F$2:$F$119="AAA")*($D$2:$D$119="N"))

Or, with TRIM for improved robustness:
=SUMPRODUCT((TRIM($F$2:$F$119)="AAA")*(TRIM($D$2:$D$119)="N"))
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:20,000 Files:362 Subscribers:62
xdemechanik
 
T

T. Valko

Max, you're expertise is needed!

See the thread titled: Confusing Function by Chris C.

It's a few posts below this one (on CDO).
 

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

Top