SUM Range based on date
edwardpestian wrote:
SUMIF(A5:AD5,A1,A6:AD6) only returns the data for the date in A1.
Similiar to an HLOOKUP(A1,A5:AD5,A6:AD6,2)
However, the SUMPRODUCT function does work as expected.
Would someone be so kind as to explain to me the SUMPRODUCT function
below in plain English. I understand what is happening inside the
parenthesis (A5:AD5<=A1),A6:AD6). However, I'm not sure about the
leading --.
=SUMPRODUCT(--(A5:AD5<=A1),A6:AD6)
Thanks for the help.
ep
--
Hi Edward
The SUMPRODUCT Summs the product of the two arrays.
The return from the (A5:AD5<=A1) would be something like TRUE, TRUE,
FALSE
Summing of that would be difficult.. So the
--(A5:AD5<=A1) returns 1,1,0 and the summing can take place..
Regards,
Bondi
|