COUNT IF

  • Thread starter Thread starter PAL
  • Start date Start date
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,""),""))
 
Anytime you must deal with two or more criteria, consider SUMPRODUCT():

=SUMPRODUCT(($F$2:$F$119="AAA")*($D$2:$D$119="N"))
 
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
 
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).
 
Back
Top