#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Charlie7805
 
Posts: n/a
Default countif & and

What am I doing wrong? I need to count the number of "Yes" in column W for
all entries with a 72 in column A

=countif(and($a$4:$a$300,72),$w$4:$w$300,"Yes"))
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Dav
 
Posts: n/a
Default countif & and


Your formula is somewhat strange! What is easiest is to use the
sumproduct function
=SUMPRODUCT(($A$4:$A$300=72)*($W$4:$W$300="Yes"))

Should work. When the condition proves to be true it returns a true
else a false

so when both conditions are true their product (true*true)=1
when only one condition is true (true*false)=0
when non conditions are true (false*false)=0

the sum of these products (as they are all 1) is the same as a count

regards

Dav


--
Dav
------------------------------------------------------------------------
Dav's Profile: http://www.excelforum.com/member.php...o&userid=27107
View this thread: http://www.excelforum.com/showthread...hreadid=514416

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
kaza-ki-sthan
 
Posts: n/a
Default countif & and

You need to have a dummy column say AA, which checks for the 72 and the
"Yes", AA67=IF(AND( A67=72,W67="Yes"),"Y","N").Hide the column AA, if you
want. The do a =COUNTIF($AA$4:$AA$300,"Y").

"Charlie7805" wrote:

What am I doing wrong? I need to count the number of "Yes" in column W for
all entries with a 72 in column A

=countif(and($a$4:$a$300,72),$w$4:$w$300,"Yes"))

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
Countif Formula /Sort Bug??? orcfodder Excel Discussion (Misc queries) 2 January 12th 06 10:04 AM
Countif, then multiply?? Gee-off Excel Worksheet Functions 4 December 7th 05 08:55 PM
COUNTIF or not to COUNTIF on a range in another sheet Ellie Excel Worksheet Functions 4 September 15th 05 10:06 PM
Combining IF and COUNTIF based on two columns maxtrixx Excel Discussion (Misc queries) 5 March 31st 05 06:21 PM
Countif - Countif maswinney Excel Worksheet Functions 3 November 15th 04 11:06 PM


All times are GMT +1. The time now is 03:01 AM.

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"