Count # of Occurences
Question:
A B Apple Orange Apple Pear Apple Orange I will like a formula to count the number of occurrences if column A=Apple AND column B=Orange. Please help. Thank you. |
Count # of Occurences
Sweepea
How about =SUMPRODUCT(--($A$1:$A$3="Apple"),--($B$1:$B$3="Orange")) -- HTH Nick Hodge Microsoft MVP - Excel Southampton, England DTHIS www.nickhodge.co.uk "Sweepea" wrote in message ... Question: A B Apple Orange Apple Pear Apple Orange I will like a formula to count the number of occurrences if column A=Apple AND column B=Orange. Please help. Thank you. |
Count # of Occurences
Try this:
=SUMPRODUCT(--(A1:A10="apple"),--(B1:B10="orange")) Or ,use cells to hold the criteria: D1 = apple E1 = orange =SUMPRODUCT(--(A1:A10=D1),--(B1:B10=E1)) Biff "Sweepea" wrote in message ... Question: A B Apple Orange Apple Pear Apple Orange I will like a formula to count the number of occurrences if column A=Apple AND column B=Orange. Please help. Thank you. |
Count # of Occurences
Hi Nick,
It didn't count. It returned zero. Any thoughts? "Nick Hodge" wrote: Sweepea How about =SUMPRODUCT(--($A$1:$A$3="Apple"),--($B$1:$B$3="Orange")) -- HTH Nick Hodge Microsoft MVP - Excel Southampton, England DTHIS www.nickhodge.co.uk "Sweepea" wrote in message ... Question: A B Apple Orange Apple Pear Apple Orange I will like a formula to count the number of occurrences if column A=Apple AND column B=Orange. Please help. Thank you. |
Count # of Occurences
Did you change the references to suit your actual ones?
-- HTH Nick Hodge Microsoft MVP - Excel Southampton, England DTHIS www.nickhodge.co.uk "Sweepea" wrote in message ... Hi Nick, It didn't count. It returned zero. Any thoughts? "Nick Hodge" wrote: Sweepea How about =SUMPRODUCT(--($A$1:$A$3="Apple"),--($B$1:$B$3="Orange")) -- HTH Nick Hodge Microsoft MVP - Excel Southampton, England DTHIS www.nickhodge.co.uk "Sweepea" wrote in message ... Question: A B Apple Orange Apple Pear Apple Orange I will like a formula to count the number of occurrences if column A=Apple AND column B=Orange. Please help. Thank you. |
Count # of Occurences
It works now. Thank you very much!!
"T. Valko" wrote: Try this: =SUMPRODUCT(--(A1:A10="apple"),--(B1:B10="orange")) Or ,use cells to hold the criteria: D1 = apple E1 = orange =SUMPRODUCT(--(A1:A10=D1),--(B1:B10=E1)) Biff "Sweepea" wrote in message ... Question: A B Apple Orange Apple Pear Apple Orange I will like a formula to count the number of occurrences if column A=Apple AND column B=Orange. Please help. Thank you. |
Count # of Occurences
You're welcome. Thanks for the feedback!
Biff "Sweepea" wrote in message ... It works now. Thank you very much!! "T. Valko" wrote: Try this: =SUMPRODUCT(--(A1:A10="apple"),--(B1:B10="orange")) Or ,use cells to hold the criteria: D1 = apple E1 = orange =SUMPRODUCT(--(A1:A10=D1),--(B1:B10=E1)) Biff "Sweepea" wrote in message ... Question: A B Apple Orange Apple Pear Apple Orange I will like a formula to count the number of occurrences if column A=Apple AND column B=Orange. Please help. Thank you. |
All times are GMT +1. The time now is 08:20 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com