Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
conditional COUNTIF | Excel Discussion (Misc queries) | |||
Use CountIF with conditional formulas | Excel Worksheet Functions | |||
Conditional Countif | Excel Worksheet Functions | |||
Conditional countif | Excel Worksheet Functions | |||
countif conditional | Excel Worksheet Functions |