Adding values for prior date intervals

G

Guest

In cells d7:D36 I have dates. In cells e7:E37 i have corresponding point
values. I can use sumproduct to provide a value for the last month from
today. I'd like to be able to get a formula that would provide me with the
month before the last. Here is what I am using to calculate the last month
from todays date.

=SUMPRODUCT(($D$150:$D$269>=DATE(YEAR(TODAY()),MONTH(TODAY())-1,DAY(TODAY())))*(TODAY()>=$D$150:$D$269)*$N$150:$N$269)

I'd like to get the month before this one as well but I don't want to
combine the 2 months.
 
G

Guest

I apologize my cell ranges are actually D150:D269 and E150:E269. I tried this
formula which is the closest thing I can think of but I get a #value error.



SUMPRODUCT(($D$150:$D$269>=DATE(YEAR(TODAY()),MONTH(TODAY())-2,DAY(TODAY())))*(DATE(YEAR(TODAY()),MONTH(TODAY())-1,DAY(TODAY())))>=$D$150:$D$269)*$N$150:$N$269)
 

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

Top