#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
PAL PAL is offline
external usenet poster
 
Posts: 200
Default 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,""),""))
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default 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,""),""))

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,358
Default 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,""),""))

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default 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,""),""))

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default 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,""),""))



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Count Employee Work Time - Don't Double-count Overlapping Apts. J Excel Worksheet Functions 0 April 27th 07 05:52 AM
Excel 2000, count, sort a list & count totals? sunslight Excel Worksheet Functions 1 April 9th 07 05:46 PM
Count Intervals of 2 Consecutive Values in same Row and Return Count across Row Sam via OfficeKB.com Excel Worksheet Functions 6 November 29th 05 03:27 PM
Count Intervals of 1 Numeric value in a Row and Return Count down Column Sam via OfficeKB.com Excel Worksheet Functions 8 October 4th 05 04:37 PM
Count Intervals of Filtered TEXT values in Column and Return Count across a Row Sam via OfficeKB.com Excel Worksheet Functions 9 July 31st 05 03:37 AM


All times are GMT +1. The time now is 03:52 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"