#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 41
Default Conditional Countif

I am trying to check two conditions in one worksheet and if true report in
another. So for example in worksheet "ABC" I want to count !B1:!B20 if it
equals "apples" and !C1:!C20 if it equals "oranges". If both conditions are
true I want to return 1 to the answer in worksheet "XYZ".
Thanks
--
nancy
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,268
Default Conditional Countif

=SUMPRODUCT(--(B1:B20="apples"),--(C1:C20="oranges"))

replace the hardcoded values with cell references when you can put the
criteria
that way you don't need to edit the formula if you change the criteria


--
Regards,

Peo Sjoblom



"nancy" wrote in message
...
I am trying to check two conditions in one worksheet and if true report in
another. So for example in worksheet "ABC" I want to count !B1:!B20 if it
equals "apples" and !C1:!C20 if it equals "oranges". If both conditions
are
true I want to return 1 to the answer in worksheet "XYZ".
Thanks
--
nancy



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,939
Default Conditional Countif

I would be inclined to us a SumProduct like this...
=SUMPRODUCT(--($B$1:$B$20="Apples"), --($C$1:$C$20="Oranges"))
Check out this link for a further explanation...
http://www.xldynamic.com/source/xld.SUMPRODUCT.html
--
HTH...

Jim Thomlinson


"nancy" wrote:

I am trying to check two conditions in one worksheet and if true report in
another. So for example in worksheet "ABC" I want to count !B1:!B20 if it
equals "apples" and !C1:!C20 if it equals "oranges". If both conditions are
true I want to return 1 to the answer in worksheet "XYZ".
Thanks
--
nancy

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
conditional COUNTIF Richard Excel Discussion (Misc queries) 7 May 3rd 07 12:06 AM
Use CountIF with conditional formulas Chris Price Excel Worksheet Functions 4 July 27th 05 11:53 AM
Conditional Countif force530 Excel Worksheet Functions 7 July 1st 05 10:08 PM
Conditional countif force530 Excel Worksheet Functions 6 July 1st 05 06:09 PM
countif conditional Ken Excel Worksheet Functions 1 June 15th 05 06:05 PM


All times are GMT +1. The time now is 03:03 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"