View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
T. Valko T. Valko is offline
external usenet poster
 
Posts: 15,768
Default sumproduct with multiple variables

Based on your sample data this portion returns 0:

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

And this portion returns 5:

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

Combined, the result is 5.

So, I have no idea what this means:

= 1 + 5
= 6

--
Biff
Microsoft Excel MVP


"sam" wrote in message
...
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