Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 20
Default Rolling Calculations

I have a spread sheet with three years of monthly data. I need to calculate
for a rolling twelve month total each month.
(i.e.)
sum data in columns for (Jan2006 - Dec2006),
sum data in columns for (Feb2006. - Jan2007),
sum data in columns for (Mar2006. - Feb2007, etc.)

--progressing the total along twelve months each new month. Any ideas
--
Motaad
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,124
Default Rolling Calculations

Put this one line formula in a columndrag to the right two columnsselect
the three formulas and drag to copy down 12 rows

=SUMPRODUCT((YEAR($A$1:$A$400)=COLUMN(A1)+2003)*(M ONTH($A$1:$A$400)=ROW(A1))*$B$1:$B$400)

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Motaad" wrote in message
...
I have a spread sheet with three years of monthly data. I need to
calculate
for a rolling twelve month total each month.
(i.e.)
sum data in columns for (Jan2006 - Dec2006),
sum data in columns for (Feb2006. - Jan2007),
sum data in columns for (Mar2006. - Feb2007, etc.)

--progressing the total along twelve months each new month. Any ideas
--
Motaad


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 733
Default Rolling Calculations

Motaad wrote...
I have a spread sheet with three years of monthly data. I need to
calculate for a rolling twelve month total each month.
(i.e.)
sum data in columns for (Jan2006 - Dec2006),
sum data in columns for (Feb2006. - Jan2007),
sum data in columns for (Mar2006. - Feb2007, etc.)

....

How are the months identified? Is the data grouped by year in fixed
size chunks, e.g., each month's data spans 20 rows? Is there another
column with dates?

If column A contained dates and column B the data you want to sum,
both spanned rows 1 to 10000, and if Jan2006 thru Dec2006 were the
first 12 month period to sum, then try the following.

D1:
=SUMIF(A$1:A$10000,"="&DATE(2006,ROWS(D$1:D1),1), B$1:B$10000)
-SUMIF(A$1:A$10000,"="&DATE(2007,ROWS(D$1:D1),1),B $1:B$10000)

Fill D1 down into D2:D36. Another alternative, shorter, more efficient
but also more complex, would be

D1:
=SUMPRODUCT(--(ABS(12*(2006-YEAR(A$1:A$10000))+5.5
-MONTH(A$1:A$10000)+ROWS(D$1:D1))<6),B$1:B$10000)

which you'd also fill down into D2:D36.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Rolling year calculations louiscourtney Excel Discussion (Misc queries) 9 July 12th 07 04:22 PM
Rolling 12 week calculations Throwme A Frigginbone Excel Worksheet Functions 2 January 9th 07 09:37 AM
rolling dustin Excel Worksheet Functions 2 August 3rd 06 10:17 PM
Rolling 3 mth Average dallin Excel Worksheet Functions 1 November 22nd 05 04:10 PM
Z Chart i.e. top rolling annual bottom rolling monthly middle cum. wat prin Excel Worksheet Functions 0 January 28th 05 03:43 PM


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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"