# Rolling Sums question

#### gray67

##### New Member
Hi - this is my first post after having watched the video podcasts for a bit. Here's my situation.

I have a number of territories that represent a selling team. Each territory has 24 months of sales data associated with it. I need to build a formula that will allow me to dynamically calculate a Rolling 3 or Rolling 6 or Rolling 12 month sum or average. The raw data is arranged like so:

TERR 1 MONTH 24 SALES
TERR 1 MONTH 23 SALES
.
.
.
TERR 1 MONTH 1 SALES
TERR 2 MONTH 24 SALES
.
.
.

Month 24 is the oldest month while month 1 is the most recent month. Ideally, the formula would create rolling sums (or averages) of the required period and would automatically know when the territory ID changes so I can just copy/paste the thing down my spreadsheet.

I've tried to do this via pivot tables to minimal success. I figure I need to pivot it regardless just because any given territory may not have any sales in a particular month, and thus I would not have a row for that terr/month combination.

### Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
To further clarify - the net result of the formula for any given territory would be to take the 24 months of individual data and spit out 22 months of rolling data.

Replies
2
Views
103
Replies
3
Views
381
Replies
13
Views
421
Replies
4
Views
78
Replies
2
Views
300

1,206,762
Messages
6,074,792
Members
446,089
Latest member
Andrew123456789

### 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.

### Which adblocker are you using?

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

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