Need Rolling 12 Month Sum Across Two Sheets

dwgnome

Active Member
Joined
Dec 18, 2005
Messages
441
Looking for solution to compute the rolling twelve month sum but when part of the data is from the current sheet and one other sheet. It is the monthly totals at D35, F35, H35 etc that are used for the rolling 12-month totals.

Excel Workbook
BCDEFGHIJKLMN
1*Sheet 2***********
2DayJan 16*Feb 16*Mar 16*Apr 16*May 16*Jun 16*
311811.50.01815.60.01824.20.31832.20.01840.10.5**
33311815.60.2**1832.20.0******
34*************
35MONTH TOTAL4.1*8.3*8.3*7.4*0.5*0.0
36***********
37*****Current Year Total:28.6*Rolling 12-Mo Total:**
Sheet 2
Excel Workbook
BCDEFGHIJKLMNOPQRSTUVWXYZ
1*Sheet 1***********************
2DayJan 15*Feb 15*Mar 15*Apr 15*May 15*Jun 15*Jul 15*Aug 15*Sep 15*Oct 15*Nov 15*Dec 15*
311701.60.51707.60.01715.50.01724.30.41730.60.21739.20.21753.50.51768.10.11778.40.01783.50.31791.00.01801.10.2
33311707.60.3**1723.9***1739.00.0**1768.00.81778.40.0**1791.00.4**1811.50.1
34*************************
35MONTH TOTAL6.5*7.9*8.4*6.5*8.6*14.0*15.0*10.4*4.8*7.8*9.9*10.6
36***********************
37*****Current Year Total:110.4*Rolling 12-Mo Total:**************
38***********************
Sheet 1



The rolling 12 month sum should be the monthly sums from the last complete month before the current month back 12 months. Example: For this month (May), I would need to sum the month sums from May 2015 through April 2016.

The date headers Jan 2016 through Dec 2016 are at Sheet 2 and Sheet 1 (same but for 2015) cells C2, E2, G2 through Y2.
The monthly sums are at Sheet 1 and Sheet 2 cells D35, F35, H35 through Z35.


Excel 2010 and Windows 7
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
I put the current month into cell K37,
=SUMIFS(Sheet1!D35:Z35,Sheet1!C3:Y3,">"&DATE(YEAR(Sheet2!K37)-1,MONTH(Sheet2!K37),1))+SUMIFS(D35:Z35,C3:Y3,"<="&K37)
 
Upvote 0
Thank you konew1 for providing the solution. I had to modify it a bit as the cell K37 already was occupied with the words “12-month rolling sum”. So I assigned K40 the current date (month). Also, since I did not want to include the current month in the 12-month rolling sum, I removed the equal sign after the less than sign. To get a full 12 months, I added an equal sign after the greater than sign. The formula with slight edits I ended up using in my actual workbook looks like:

Code:
=SUMIFS('AS0904-2015'!D35:Z35,'AS0904-2015'!C2:Y2,">="&DATE(YEAR(L42)-1,MONTH(L42),1))+SUMIFS(D35:Z35,C2:Y2,"<"&DATE(YEAR(L42),MONTH(L42),1))

I also created a second 12-month rolling sum that automatically uses the most current date so the user does not have to enter a date in K40:


Code:
=SUMIFS('AS0904-2015'!D35:Z35,'AS0904-2015'!C2:Y2,">="&DATE(YEAR(TODAY())-1,MONTH(TODAY()),1))+SUMIFS(D35:Z35,C2:Y2,"<"&DATE(YEAR(TODAY()),MONTH(TODAY()),1))

Probably not as efficient as having a reference cell with =TODAY() in it to reduce the number of date calls in the formula.
 
Upvote 0

Forum statistics

Threads
1,223,214
Messages
6,170,772
Members
452,353
Latest member
strainu

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