+ Reply to Thread
Results 1 to 5 of 5

Rolling 24-month Averaging

  1. #1
    Registered User
    Join Date
    04-30-2009
    Location
    Beaumont, TX
    MS-Off Ver
    Excel 2007
    Posts
    4

    Rolling 24-month Averaging

    One of our govt. agencies requires that I compute the 24-month rolling averages of the daily average input to a manufacturing process. In this instance, the agency is demanding the rolling average since 2003, so there are a fair number of data points involved. The process control computer can provide me the daily data (attached file contains 30 months of data), but cannot compute the 24-month rolling average and nothing in the Excel HELP feature helps!
    Thanks. 1brickshy
    Attached Files Attached Files
    Last edited by 1brickshy; 10-02-2009 at 04:02 PM.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Rolling 24-month Averaging

    Here's one idea:
    Attached Files Attached Files
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Rolling 24-month Averaging

    If as implied you are using XL2007 you could change JB's

    C7: =(SUMIF($A:$A,">"&C$4,$B:$B)-SUMIF($A:$A,">"&C$5,$B:$B)) / (COUNTIF($A:$A,">="&C$4)-COUNTIF($A:$A,">"&C$5))

    to

    C7: =AVERAGEIFS($B:$B,$A:$A,">"&C$4,$A:$A,"<="&C$5)
    (limit the ranges from entire columns if possible)

    note however AVERAGEIFS is not backwards compatible so if you intend or are obliged to run on earlier versions then

    a) stick with the original approach
    b) note that use of EOMONTH in month headers will require activation of Analysis ToolPak Add-In else revert to a standard DATE formula, eg:

    D5: =DATE(YEAR(C5),MONTH(C5)+2,0)

    etc...

  4. #4
    Registered User
    Join Date
    04-30-2009
    Location
    Beaumont, TX
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Rolling 24-month Averaging

    Problem solved. As always, thank you very much. 1brickshy

  5. #5
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Rolling 24-month Averaging

    If that takes care of your need, be sure to EDIT your original post, click Go Advanced and mark the PREFIX box [SOLVED].


    (Also, use the blue "scales" icon in our posts to leave Reputation Feedback, it is appreciated)

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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