Rolling totals for a 365 day period

SMF28374

New Member
Joined
Jan 31, 2011
Messages
6
I have a project that requires that I have a spreadsheet to track participation per day over a rolling 365 day period. In essence, an individual cannot exceed 90 days total participation over a 365 day period.

I built a spread sheet with the individual month on a row and individual days in columns with a total number of days in a given month to the right of the last day (ie Jan 31, Sep 30, etc.).

As an example, a person's participation on March 3-7 of a given year would "go away" the following March 3-7.

I tried inserting an image of what I have, but i cannot get it to show properly.

Any help would be greatly appreciated.

Steve
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
Possibly something like the below?
Excel Workbook
ABC
1numbersDateRolling
2201/01/20102
3302/02/20105
4403/03/20109
5207/06/201011
6310/11/201014
7431/12/201018
8601/01/201124
9202/02/201124
10103/03/201122
11307/06/201121
12510/11/201124
13201/01/201219
14317/01/201216
Sheet4


Then apply an if statement for whatever you want to do when the total > 90 (Strictly speaking the above rolls back a year, for 365 days then
=SUMIFS($A$2:$A$14,$B$2:$B$14,"<="&B2,$B$2:$B$14,">="&DATE(YEAR(B2),MONTH(B2),DAY(B2)-365))
)
 
Last edited:
Upvote 0
Thanks for the response and I will give this a try. I think this is close, but to make sure, let me try and clarify my requirement. Assume that an individual participates for 5 days in Jan 2010 (1/9 thru 1/13). As the year moves along, the dates of participation keep accumulating in the rolling total. Futher assume that, for this example, the individual never reaches the 90 maximum. When 1/9/2011 rolls around, the 1/9/210 day goes away unless there is participation for that day.

For each succeeding day, the rolling total would go up, down, or stay the same based upon participation for any given day.

Graphically, I would hope to have a chart showing year "X" displayed horizontally with months on the vertical in the first column and each day of the month on the horizontal across the first row. I would then have a mark for each day of participation in each corresponding cell and totals for the month at the right of each individual month and the rolling total the next column over. I would then have the following year in the same format under year "X" and would give me a format to "plug in" anticipated participation to verify that the 90 days will not be exceeded.

Sorry for the long winded narrative, but I can't seem to figure out how to place a graphic in my postings for clarity.

Again thank you so much for the assistance and I will give you feed back once I give this a try.

Steve
 
Upvote 0
OK. I used your suggestion and it works fine for the rolling totals at each month end.

In looking at this more closely, I think I need to approach this as a running 365 day period to attain my desired result. In using my example in the previous post, on 1/9/2011 the individual participates. I "look back" to the 1/9/2010 cell to see if a value is present and, in this case, I am replacing the 2010 day with the 2011 day and the running total would stay the same and not increment. Following this scenario, my daily running total would then increment, decrement or stay the same based on subsequent "look backs" as days progress and alert me when the 90 day limit is or would be reached based on participation.

Does this make sense???

Thanks again for the assistance.

Steve
 
Upvote 0
I think I need to approach this as a running 365 day period to attain my desired result
The formula for 365 is in the previous post
Strictly speaking the above rolls back a year, for 365 days then
=SUMIFS($A$2:$A$14,$B$2:$B$14,"<="&B2,$B$2:$B$14,">="&DATE(YEAR(B2),MONTH(B2),DAY(B2)-365))

and it does state that you need to add an If statement to do whatever action you want when if the 90 days is hit

Then apply an if statement for whatever you want to do when the total > 90
You just hadn't stated what you wanted to happen if the total hit 90.
For instance you could do something like...

Excel Workbook
ABC
1numbersDateRolling
21001/01/201010
32002/02/201030
41003/03/201040
52007/06/201060
61010/11/201070
72031/12/2010Over 90
81001/01/2011Over 90
92002/02/2011Over 90
101003/03/2011Over 90
112007/06/2011Over 90
121010/11/2011Over 90
132001/01/2012Over 90
141002/06/201260
Sheet1


Please note that my dates are in UK format dd/mm/yyyy
 
Upvote 0

Forum statistics

Threads
1,223,950
Messages
6,175,582
Members
452,653
Latest member
craigje92

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top