View Single Post
  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Teethless mama Teethless mama is offline
external usenet poster
 
Posts: 3,718
Default sumproduct with multiple variables

Try this:

=SUMPRODUCT((A1:A6={"A","C"})*(B1:B6={"B","D"})*C1 :C6)



"sam" wrote:

hi everyone,

here is my issue. i am using SUMPRODUCT for a couple of criteria and
returning the sum of another column. E.g.

A B 1
A C 2
B C 3
B E 4
C A 5
C D 5

=SUMPRODUCT((A1:A6="A")*(B1:B6="B"),C1:C6)+SUMPROD UCT((A1:A6="C")*(B1:B6="D"),C1:C6)
= 1 + 5
= 6

This all works fine but I was wondering if there was another option so i
would not have to use SUMPRODUCT multiple times. It is essential that A is
matched with B and that C is matched with D.

Thanks

Sam