ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   COUNT IF (https://www.excelbanter.com/excel-worksheet-functions/209172-count-if.html)

PAL

COUNT IF
 
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,""),""))

Gary''s Student

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

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

--
Gary''s Student - gsnu200812


"PAL" wrote:

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,""),""))


John C[_2_]

COUNT IF
 
You should use SUMPRODUCT
=SUMPRODUCT(--($F$2:$F$119="AAA"),--($D$2:$D$119="N"))
--
** John C **
Please remember if your question is answered, to mark it answered :). It
helps everyone.


"PAL" wrote:

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,""),""))


Max

COUNT IF
 
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
---
"PAL" wrote:
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,""),""))


T. Valko

COUNT IF
 
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).

--
Biff
Microsoft Excel MVP


"Max" wrote in message
...
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
---
"PAL" wrote:
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,""),""))





All times are GMT +1. The time now is 04:52 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com