ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Formula problem (https://www.excelbanter.com/excel-worksheet-functions/186566-formula-problem.html)

Joyce

Formula problem
 
I am having problems coming up with a formula
Here is my scenario

If A2:A5 = Apples and B2:B5 = Oranges, then count the number of oranges in
Column B

Bob Phillips

Formula problem
 
=SUMPRODUCT(--(A2:A5="Apples"),--(B2:B5="Oranges"))

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Joyce" wrote in message
...
I am having problems coming up with a formula
Here is my scenario

If A2:A5 = Apples and B2:B5 = Oranges, then count the number of oranges in
Column B




Gaurav[_3_]

Formula problem
 
There might be a better way but this one should also work.

=SUMPRODUCT(--(A1:A5="Apples"),--(B1:B5="Oranges")*(B1:B5="Oranges"))


"Joyce" wrote in message
...
I am having problems coming up with a formula
Here is my scenario

If A2:A5 = Apples and B2:B5 = Oranges, then count the number of oranges in
Column B





All times are GMT +1. The time now is 08:34 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com