Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Rolling year calculations | Excel Discussion (Misc queries) | |||
Rolling 12 week calculations | Excel Worksheet Functions | |||
rolling | Excel Worksheet Functions | |||
Rolling 3 mth Average | Excel Worksheet Functions | |||
Z Chart i.e. top rolling annual bottom rolling monthly middle cum. | Excel Worksheet Functions |