+ Reply to Thread
Results 1 to 13 of 13

Last 12 month's average

  1. #1
    Registered User
    Join Date
    02-18-2013
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    17

    Last 12 month's average

    Hello,

    I am trying to create a formula at the end of a row that will give an average for the past 12 months data.

    Simple enough I thought, however I am having difficulty in making the formula change each time I add a new month.

    I would like to add an extra month column to the sheet and have the average include only the new month and the previous 11 without having to manually change it.

    Attached is a document showing some of the data which will hopefully help in resolving my problem. I am using Excel 2013

    Any help would be great, thanks
    Attached Files Attached Files

  2. #2
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Last 12 month's average

    In M3 and filled down, try

    =AVERAGE(OFFSET(M3,0,-12,1,12))

  3. #3
    Forum Expert Kevin UK's Avatar
    Join Date
    12-07-2010
    Location
    Radstock, Somerset
    MS-Off Ver
    365
    Posts
    1,922

    Re: Last 12 month's average

    Hi simonlblea

    Try the Index & Match (Non volatile)
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Or
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    If you need to exclude zero values when averaging.
    Last edited by Kevin UK; 03-26-2013 at 08:55 AM.
    Regards Kevin


    Merged Cells (They are the work of the devil!!!)

  4. #4
    Registered User
    Join Date
    02-18-2013
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    17

    Re: Last 12 month's average

    Brilliant, thank you Jonmo1. That has done the trick nicely!

  5. #5
    Registered User
    Join Date
    02-18-2013
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    17

    Re: Last 12 month's average

    And thank you Kevin, that also works!

    Two options for one post. Brillskills.

  6. #6
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Last 12 month's average

    Quote Originally Posted by Kevin UK View Post
    Hi simonlblea

    Try the Index & Match (Non volatile)
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Or
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    If you need to exclude zero values when averaging.
    Wouldn't this always include A3, so it becomes 13 cells when inserting 1 column.
    Then 14 after another column is inserted, then 15 etc..

  7. #7
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Last 12 month's average

    Quote Originally Posted by simonlblea View Post
    Brilliant, thank you Jonmo1. That has done the trick nicely!
    Great, glad to help out.

  8. #8
    Forum Expert Kevin UK's Avatar
    Join Date
    12-07-2010
    Location
    Radstock, Somerset
    MS-Off Ver
    365
    Posts
    1,922

    Re: Last 12 month's average

    @ Jonmo1

    I never noticed that bit about "keep it at 12 months! (Age thing again)
    May be!
    =AVERAGE(INDEX(3:3,MATCH("Rolling average",$1:$1,0)-12):INDEX(3:3,MATCH("Rolling average",1:1,0)-1))

  9. #9
    Registered User
    Join Date
    02-18-2013
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    17

    Re: Last 12 month's average

    Hi all,

    Jonmo's solution works brilliantly on my spreadsheet however now I am trying to make some simple line charts and of course they are not updating when I add a new column!

    Any thoughts on how to solve this?

  10. #10
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Last 12 month's average

    Make a Named Range, say MyData or whatver.
    The Refers to for that range is
    =OFFSET(M3,0,-12,1,12)

    Then for the chart, use that named range

  11. #11
    Registered User
    Join Date
    02-18-2013
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    17

    Re: Last 12 month's average

    Thank you, would I need to do anything differently to get the dates to update as well. Have tried creating a named range for those, however when I enter the name on the 'Select Data' button it just comes up as 'Roling_average' (see attached)
    Attached Files Attached Files

  12. #12
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Last 12 month's average

    Make 2 named ranges (one for the dates and one for the values) like the hard coded ranges you put inthe 2nd chart.

    Also need to use the $ to lock the cell reference.

    MyDates : =AVERAGE(OFFSET($M$1,0,-12,1,12))
    MyVals: =AVERAGE(OFFSET($M$3,0,-12,1,12))

    Then modify the chart to use those names instead of the hard coded ranges.

  13. #13
    Registered User
    Join Date
    02-18-2013
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    17

    Re: Last 12 month's average

    Sorry for taking ages to reply. Everything is working now as I wanted it. Thank you for your help.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1