get a rolling sum between current date - 30 days

D

dustin

thank you for the previous help in ths matter, but what im looking for is a
formula to calculate the SUM between TODAYS CURRENT DATE and the 30 previous
days. And each day the CURRENT DAY needs to change also adjusting the
previous 30 and changing the SUM. For example each days i enter hours in the
B column, the A column will have a date, well if today is august 3rd the
rolling 30 days sum should equal todays hours plus everything in between the
previous 30 days. If anyone has any ideas on this formula or anything similar
to it it would really help.
 
B

Bob Phillips

=SUM(INDEX(B:B,MATCH(TODAY(),A:A,0)):INDEX(B:B,MAX(1,MATCH(TODAY(),A:A,0)-30
)))

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 
M

MartinW

Hi Dustin,

Do you mean your B column just keeps growing down the sheet
one cell per day. If that is the case in cell C30 put

=SUM(B1:B30) and copy it down a few hundred cells.
As you copy it down the range will adjust automatically
to just the previous 30 cells in column B.

If you add the IF function like this
=IF(B30="","",SUM(B1:B30))

then column C will stay blank until an entry is
placed in column B

HTH
Martin
 

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