Calculating a rolling sum in Excel 2007

Elle G

New Member
Joined
Nov 19, 2013
Messages
2
Hi,


I'm new to the Excel board, but I'm hoping you guys can help me out. I need to find a way to calculate employees' sales for the last 3 months on a rolling basis. I think I want a function that looks for the column that matches "current month," offsets by -2 columns, and then sums from that column to the current month. Every month I add a new column of data, and I've been manually updating the formula to sum the correct columns. (I do this calculation for the last 6 and 12 months, too, so once I have the 3 months formula working, I can modify it for them.)


I've spent the past few hours trying various combinations of match, index, hlookup, and offset to no avail. Maybe it's possible to start the offset from whatever column is to the left of "Total sales" because that will always be the latest month?


Thanks in advance for any help!


Sample data:


NameFeb 13Mar 13Apr 13May 13Jun 13Jul 13Aug 13Sep 13Oct 13Total salesSales last 3 months
George81268101158775?
Tom9759101286975?
Mark998101181091084?
Stewart7106910121191185?
Current monthOct 13

<tbody>
</tbody>
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
See if this works.
Note there are two commas after the -3 in the formula.
Excel Workbook
ABCDEFGHIJKLM
1Name13-Feb13-Mar13-Apr13-May13-Jun13-Jul13-Aug13-Sep13-OctTotal salesSales last 3 months
2George8126810115877520
3Tom975910128697523
4Mark99810118109108429
5Stewart710691012119118531
6
Sheet
 
Upvote 0
That is so much simpler than what I was trying to do, and it works perfectly! Thank you so much.

The actual data is really wide, so I ended up replacing the "total sales" column with a column that repeats the list of employees. I used the same offset formula and can now see the list of names right next to sales for last 3, 6, and 12 months. HURRAH. :)
 
Upvote 0
You're welcome. Thanks for the feedback and welcome to the forum.
 
Upvote 0

Forum statistics

Threads
1,215,235
Messages
6,123,792
Members
449,126
Latest member
Greeshma Ravi

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