SUMIF?

D

DK

Greetings,

I'm attempting to sum the previous twelve Values from a list of end of month
Dates (column A, listed in ascending order) and Values (column B).

I would like to type an end of month Date into C1 and have the sum of the
previous 12 month Values appear in D1 but cannot determine the right
combination of functions to achieve this.

Thank you in advance for any advice.
 
B

Bob Phillips

=SUMPRODUCT(--($A$2:$A$20<=$C$1),--($A$2:$A$20>=DATE(YEAR($C$1),MONTH($C$1)-
12,1)),$B$2:$B$20)

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
D

DK

Bob,

That does help. Thanks!!!

Out of curiosity though, what does the "--" in the formula do exactly? I
noticed when I opened the arguement window is seems to change results from
TRUE to 1. Is that the only function?

Thanks again.
DK
 
Top