View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Gary''s Student Gary''s Student is offline
external usenet poster
 
Posts: 11,058
Default Sumif a set of corresponding values

=SUMPRODUCT(--(A1:A5="apple"),--(B1:B5="Y"),C1:C5)

--
Gary''s Student - gsnu200777


"raphiel2063" wrote:

I want to sum up a column of data if the value of two columns is what I want.

E.g.
Y/N Qty
Apple N 1
Banana Y 0
Apple Y 0
Apple Y 6
Banana N 3

I would like to be able to look up apples and Y and sum up the corresponding
column. In the above example the answer would be 6. If it was Bananas and Y
then it would be 0.

Anybody able to help?