Thread: Formula problem
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Gaurav[_3_] Gaurav[_3_] is offline
external usenet poster
 
Posts: 127
Default 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