+ Reply to Thread
Results 1 to 6 of 6

Create dynamic rolling 3 month data that increases in one month increments

  1. #1
    Registered User
    Join Date
    02-06-2013
    Location
    Hliafax, England
    MS-Off Ver
    Excel 2007
    Posts
    2

    Create dynamic rolling 3 month data that increases in one month increments

    Hi All, I have a very large data set of survey responses. We report the result as a rolling 3 month period that increases at a 1 month interval.

    For example:
    Jan - Mar
    Feb - Apr
    Mar - May
    Apr - Jun
    May - Jul and so on....

    At the moment I use a pivot table to get the monthly result. I then have to select the 3 month period I want and add it to a separate table, I then have a chart based on the table data. Is there a formula that I can add to the raw data that would automatically update the date ranges so I can plot a chart directly from the pivot table?

    PS: I've never used VBA before... Hope this makes sense!

  2. #2
    Valued Forum Contributor
    Join Date
    05-08-2015
    Location
    Uvalde, TX
    MS-Off Ver
    2010
    Posts
    720

    Re: Create dynamic rolling 3 month data that increases in one month increments

    Hi,

    From your description, what you are asking for sounds achievable. Unfortunately, there isn't a generic formula for such an unknown situation.
    You would need to upload a file so that the requested process could be evaluated and a solution provided.

    Recommend you upload a "working" copy of your file. Sanitized if need be.

    Cheers

  3. #3
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: Create dynamic rolling 3 month data that increases in one month increments

    Personally I avoid pivot tables wherever I can. I won't bore you with the details of why, it's just personal preference.

    You could set up your own 'table' then add a data validation drop down to select the first month (best if VBA is not an option) or even a SpinButton control to be able to jump up and down a month at the click of a button (if VBA is an option).

    Both approaches are simple to set up with a few formulas. The latter would require minimal VBA to make it work (about 6 lines in total).

    Perhaps if you could post some sample data so we can see the layout we can go from there.

    BSB

  4. #4
    Registered User
    Join Date
    01-08-2014
    Location
    Missouri
    MS-Off Ver
    365
    Posts
    87

    Re: Create dynamic rolling 3 month data that increases in one month increments

    Here's a suggestion, attached.

    It sums the report month + the two preceding months.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    02-06-2013
    Location
    Hliafax, England
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Create dynamic rolling 3 month data that increases in one month increments

    Hi All,

    Thanks for your suggestions so far... what I didn't mention that may complicate things is this needs to work out the NPS result, it's not as simple as just averaging
    3 months totals or adding them up.

    I have attached a dummy sample of raw data (raw data tab). An example of what someone internally has done for me (example tab) and a results tab where I have
    copied over the example formula from the original to try and get it work with the dummy data but it won't.... I have also added a copy of what the chart needs
    to look like. As you can see any given month will be in 3 different data points because it goes up one month at a time but each data point covers a 3 month period.
    The chart doesn't have an end data and will continue to grow over time. However, if having a start end data is the only way to make it work I would like to be able
    to see at least 12 months of data at any given time.

    I know the 'example' works and it's great but I want to take away the effort of having to drag the cells across every month. I just want to have to update the raw
    data and then refresh everything and have it all update on it's own.

    Attached will help you visual it hopefully - thanks again!
    Attached Files Attached Files

  6. #6
    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,926

    Re: Create dynamic rolling 3 month data that increases in one month increments

    I also would not use a PT for this.

    Try this formula in D8, copied down and across. No need for funcky date conversions ...
    =SUMIFS('Raw Data'!$D:$D,'Raw Data'!$B:$B,"<="&Results!D$2,'Raw Data'!B:B,">"&EOMONTH(D$2,-3),'Raw Data'!$A:$A,Results!$A8)
    Looking at your criteria data, Im not sure if you need to calc from the start of the shown month (formula above) or from the end of teh shown month. if the end, then...
    =SUMIFS('Raw Data'!$D:$D,'Raw Data'!$B:$B,"<="&EOMONTH(D$2,0),'Raw Data'!B:B,">"&EOMONTH(D$2,-3),'Raw Data'!$A:$A,Results!$A8)

    This same method can be used with AVERAGIFS if you need that too
    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

+ 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. [SOLVED] Turn Dynamic Horizontal Chart into 12-month rolling
    By robbrown in forum Excel General
    Replies: 7
    Last Post: 12-27-2015, 05:22 PM
  2. Automatic or dynamic rolling month
    By Akatecho in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-31-2014, 06:27 AM
  3. 3 month rolling - dynamic
    By Armitage2k in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-05-2014, 09:26 AM
  4. Create 12 month rolling chart
    By bberger1985 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-19-2013, 12:24 PM
  5. Rolling 12 Month Dynamic Calculation
    By bapswarrior in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-29-2013, 04:37 PM
  6. How to create a rolling 6 month average?
    By anley in forum Excel General
    Replies: 4
    Last Post: 12-08-2010, 11:34 PM

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