Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Bruce
 
Posts: n/a
Default COUNTIF for 2 conditions

How do you countif for 2 conditions?

countif ( A1 = "Red" and "B1 = blue")

Bruce
  #2   Report Post  
abc
 
Posts: n/a
Default

Assume you have following data as a1:b6, fill c1:c6 with 1
Blue Red 1
Red Blue 1
Blue Blue 1
Orange Red 1
Blue Red 1
Red Black 1

in Cell A7 input following formula
=COUNT(IF((A1:A6="blue")*(B1:B6="red"),C11:C16)) and press
"Ctrl"+"Shift"+"Enter" for array calculation



"Bruce" ¦b¶l¥ó
¤¤¼¶¼g...
How do you countif for 2 conditions?

countif ( A1 = "Red" and "B1 = blue")

Bruce



  #3   Report Post  
Bob Phillips
 
Posts: n/a
Default

=SUMPRODUCT(--(A2:A100="Red"),--(B2:B100="Blue"))

--
HTH

Bob Phillips

"Bruce" wrote in message
...
How do you countif for 2 conditions?

countif ( A1 = "Red" and "B1 = blue")

Bruce



  #4   Report Post  
mangesh_yadav
 
Posts: n/a
Default


you could use a sumproduct

=SUMPRODUCT(--(A1:A10="red"),--(B1:B10="blue"))

Mangesh


--
mangesh_yadav
------------------------------------------------------------------------
mangesh_yadav's Profile: http://www.excelforum.com/member.php...o&userid=10470
View this thread: http://www.excelforum.com/showthread...hreadid=379268

  #5   Report Post  
NNNNN
 
Posts: n/a
Default

put "red"/"blue" in a cell (eg A1)
=countif(a2:a20,a1)

"Bruce" ...
How do you countif for 2 conditions?

countif ( A1 = "Red" and "B1 = blue")

Bruce





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 two conditions Penny Excel Discussion (Misc queries) 4 May 27th 05 01:59 AM
COUNTIF Statement with Multiple Conditions in Different Ranges KJA Excel Worksheet Functions 2 April 26th 05 05:14 PM
COUNTIF with two conditions Doodlemeyer Excel Worksheet Functions 2 March 20th 05 09:05 PM
How can I use COUNTIF to sum for two conditions? Jeff Excel Worksheet Functions 4 December 30th 04 05:25 AM
setting two conditions for countif Danny J Excel Worksheet Functions 5 December 6th 04 11:49 PM


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

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

About Us

"It's about Microsoft Excel"