+ Reply to Thread
Results 1 to 9 of 9

Calculate and compare rolling averages with daily data entry?

  1. #1
    Registered User
    Join Date
    10-10-2013
    Location
    MW
    MS-Off Ver
    2007
    Posts
    3

    Calculate and compare rolling averages with daily data entry?

    I have a sheet set up to track measurements, which are entered daily in E20:E384.

    I have set up a formula to calculate how today's measurement compares to measurements of 2 weeks ago (Cell AI2) and 4 weeks ago (Cell AI3).

    However, one data point vs. another data point makes for volatile comparisons, so I want to set up a rolling average which subtracts the 3-day-rolling-average of 2 weeks ago from the most recent 3-day-rolling-average. Also want to do the same for the vs. 4 weeks ago comparison. (Note: as for which 3 days, I would say the actual 2 weeks ago data point, then the data points before and after).

    I'm stuck though--can anybody suggest a formula? I suspect this would use OFFSET.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,446

    Re: Calculate and compare rolling averages with daily data entry?

    Suggest you post a sample workbook.

    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,936

    Re: Calculate and compare rolling averages with daily data entry?

    Hi, welcome fo the forum

    Agree it will be much easier to help if we can see a sample workbook (not a pic) of what you are working with.

    As a starter though, I dont know how you calc'd the 2-weeks-back value, but this can be done with a simple vlookup()...
    A
    B
    2
    11/10/2014
    aa1
    3
    11/11/2014
    aa2
    4
    11/12/2014
    aa3
    5
    11/13/2014
    aa4
    6
    11/14/2014
    aa5
    7
    11/15/2014
    aa6
    8
    11/16/2014
    aa7
    9
    11/17/2014
    aa8
    10
    11/18/2014
    aa9
    11
    11/19/2014
    aa10
    12
    11/20/2014
    aa11
    13
    11/21/2014
    aa12
    14
    11/22/2014
    aa13
    15
    11/23/2014
    aa14
    16
    11/24/2014
    aa15
    17
    11/25/2014
    aa16
    18
    11/26/2014
    aa17
    19
    11/27/2014
    aa18
    20
    11/28/2014
    aa19
    21
    11/29/2014
    aa20
    22
    11/30/2014
    aa21
    23
    12/1/2014
    aa22
    24
    12/2/2014
    aa23
    25
    12/3/2014
    aa24
    26
    27
    28
    12/1/2014
    aa22 compared to aa8

    B28=VLOOKUP(A28,$A$2:$B$25,2,0)&" compared to "&VLOOKUP(A28-14,$A$2:$B$25,2,0)

    OK, so I made a bit more than simple, but that gives you an idea how to do it
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Registered User
    Join Date
    11-30-2014
    Location
    Seattle, WA Area
    MS-Off Ver
    2013
    Posts
    3

    Re: Calculate and compare rolling averages with daily data entry?

    Hi,

    I am a beginner with Excel and I am looking to find an example as to how to build a single rolling average plot/chart that has a separate daily input score below that could be anywhere from +10 to -10 for example. I'd like the information on two plots that is fed from a table - but it could be all on one chart/plot, but only if it is not too cluttered.

    This blog topic seems to be what I am looking for. I sure hope that I can see an example, or have someone point me in a different direction with an URL.

    (My first post on this forum)

    Thank you,

    Karl

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,936

    Re: Calculate and compare rolling averages with daily data entry?

    Hi Karl, welcome to the forum

    Unfortunately your post does not comply with Rule 2 of our Forum RULES. Do not post a question in the thread of another member -- start your own thread.

    If you feel an existing thread is particularly relevant to your need, provide a link to the other thread in your new thread.

    Old threads are often only monitored by the original participants. New threads not only open you up to all possible participants again, they typically get faster response, too.

  6. #6
    Registered User
    Join Date
    10-10-2013
    Location
    MW
    MS-Off Ver
    2007
    Posts
    3

    Re: Calculate and compare rolling averages with daily data entry?

    Sorry for the delay, all--work and that. The sheet this came from is large and very elaborate, so I created a cell-for-cell copy, eliminating unnecessary data/formatting.

    Highlighted in yellow are the relevant bits. You can see the formulas I used to create an ongoing "last data point vs 2 weeks ago and vs 4 weeks ago".

    Again, I want to write a formula that gives me a 3-day average for more stable numbers.

    E.g., instead of calculating the change between November 19th and December 3rd, calculate the change between the average of November 18th, 19th and 20th, and the average of December 1st, 2nd and 3rd.

    2-4WkRolAvgCompar.xlsx

  7. #7
    Registered User
    Join Date
    11-30-2014
    Location
    Seattle, WA Area
    MS-Off Ver
    2013
    Posts
    3

    Re: Calculate and compare rolling averages with daily data entry?

    Hi,

    Just getting back to the forum today. Sorry to have side-stepped the rules here. I'll post a new thread.

    Thanks !

    Karl

  8. #8
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,936

    Re: Calculate and compare rolling averages with daily data entry?

    See if this is what you want?
    =AVERAGE(OFFSET(E20,COUNT(E20:E384)-1,0,-3))-AVERAGE(OFFSET(E20,COUNT(E20:E384)-15,0,-3))

    I just did it for the 2-week calc, but for the 4-week, change the -15 to -29 like you did before

  9. #9
    Registered User
    Join Date
    10-10-2013
    Location
    MW
    MS-Off Ver
    2007
    Posts
    3

    Re: Calculate and compare rolling averages with daily data entry?

    FDibbins--

    Sorry once again for the delay and the bump, but I wanted to thank you as your solution highlighted above DOES work well. Also wanted to let any future readers of the thread know that this will give you what you're looking for RE stable rolling averages.

    Cheers!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 3
    Last Post: 10-01-2013, 05:05 AM
  2. Calculate monthly, quarterly, and yearly averages from daily data
    By jhound in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-27-2013, 11:16 AM
  3. Formula to calculate daily averages
    By jmiller7 in forum Excel General
    Replies: 1
    Last Post: 01-19-2011, 12:13 PM
  4. How to calculate 2 Rolling Averages?
    By TBT in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-02-2008, 06:34 AM
  5. Calculate Discrete Averages, not rolling
    By bkopeikin in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-18-2007, 11:04 PM

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