View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
David Biddulph[_2_] David Biddulph[_2_] is offline
external usenet poster
 
Posts: 8,651
Default Sum if Critea 1 and critera 2 are met

And of course you can omit the double unary minus as you've used * to
multiply.

=SUMPRODUCT((A2:A100="Q4")*(C2:C100="prodA")*(F2:F 100)) or
=SUMPRODUCT(--(A2:A100="Q4"),--(C2:C100="prodA"),(F2:F100))
--
David Biddulph

"Gary''s Student" wrote in message
...
Any time you have multiple criteria, use SUMPRODUCT():

=SUMPRODUCT(--(A2:A100="Q4")*(C2:C100="prodA")*(F2:F100))

--
Gary''s Student - gsnu200859


"Nelson" wrote:

Good day,

I have a column A2:A100 that specifies Q1,2,3,4
I have a column C2:C100 that specifies Product (either A or B)
in column F2:F100 I have price paid

Now I want to create a query that says if A2:A100 = Q1 and C2:C100 =
product
A then add up all the matching prices from F2:F100

I was using this but I think I am missing something

=SUM(IF(((A2:A100)="Q4")*(MATCH(C2:C100,"prodA",0) ),F2::F100))

Any suggestions?

Thanks in advance

--
Nelson