SUMIF?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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.
 
=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)
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top