ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   How would I track a rolling set of 30 cells? (https://www.excelbanter.com/excel-worksheet-functions/132255-how-would-i-track-rolling-set-30-cells.html)

CJ Barnes

How would I track a rolling set of 30 cells?
 
I am trying to have a cell show me a sum for the past 30 days, updated daily.
The group of the 30 cells I'm summing will need to adjust down one cell
daily.

JE McGimpsey

How would I track a rolling set of 30 cells?
 
One way:

Assume headings in row 1, then data in rows 2:xx, one row per day, date
in column A, numeric data in column B:

=SUM(OFFSET(B2,MAX(0, COUNTA(B:B)-31), 0, 30,1))




In article ,
CJ Barnes <CJ wrote:

I am trying to have a cell show me a sum for the past 30 days, updated daily.
The group of the 30 cells I'm summing will need to adjust down one cell
daily.


MartinW

How would I track a rolling set of 30 cells?
 
Hi CJ

Another way assuming your data is in A1 to A30
then in B30

=IF(A30="","",SUM(A1:A30))
and drag it down as far as you need. The cell references
will update as you drag drown.
i.e. B31 will show =IF(A31="","",SUM(A2:A31)) etc.

The B column will stay blank until you put a value into A

HTH
Martin



Teethless mama

How would I track a rolling set of 30 cells?
 
=SUMPRODUCT(--(A2:A100=TODAY()-30),B2:B100)


"CJ Barnes" wrote:

I am trying to have a cell show me a sum for the past 30 days, updated daily.
The group of the 30 cells I'm summing will need to adjust down one cell
daily.



All times are GMT +1. The time now is 03:03 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com