Dear all,
I am new to SUMPRODUCT and am still getting used to all it's power, so for the simple example below, I'd prefer to use SUMIFS if I can, instead of SUMPRODUCT, but it doesn't appear to work.
Can anyone help me out as to why SUMPRODUCT seems to work but SUMIFS doesn't in the example below? To me, they're should both return the same result - (ie 15)
Criteria 1 (A1) = 8
Criteria 2 (B1) = 1
Criteria 3 (C1) = Dec-10
A B C D
8 1 20/12/2010 10
8 1 9/12/2010 5
8 1 5/12/2008 2
8 4 7/12/2010 4
9 1 13/10/2010 9
=SUMPRODUCT((A4:A8=A1)*(B4:B8=B1)*(MONTH(C4:C8)=MONTH(C1))*(YEAR(C4:C8)=YEAR(C1))*(D4:D8))
>> correctly gives 15
=SUMIFS(D4:D8,A4:A8,A1,B4:B8,B1,MONTH(C4:C8),MONTH(C1),YEAR(C4:C8),YEAR(C1))
>> doesn't work
I'm missing something obvious, aren't I?
I am new to SUMPRODUCT and am still getting used to all it's power, so for the simple example below, I'd prefer to use SUMIFS if I can, instead of SUMPRODUCT, but it doesn't appear to work.
Can anyone help me out as to why SUMPRODUCT seems to work but SUMIFS doesn't in the example below? To me, they're should both return the same result - (ie 15)
Criteria 1 (A1) = 8
Criteria 2 (B1) = 1
Criteria 3 (C1) = Dec-10
A B C D
8 1 20/12/2010 10
8 1 9/12/2010 5
8 1 5/12/2008 2
8 4 7/12/2010 4
9 1 13/10/2010 9
=SUMPRODUCT((A4:A8=A1)*(B4:B8=B1)*(MONTH(C4:C8)=MONTH(C1))*(YEAR(C4:C8)=YEAR(C1))*(D4:D8))
>> correctly gives 15
=SUMIFS(D4:D8,A4:A8,A1,B4:B8,B1,MONTH(C4:C8),MONTH(C1),YEAR(C4:C8),YEAR(C1))
>> doesn't work
I'm missing something obvious, aren't I?