+ Reply to Thread
Results 1 to 8 of 8

Excel graph with offset formula so it updates with data is add

  1. #1
    Forum Contributor
    Join Date
    05-08-2013
    Location
    FLORENCE, ALABAMA
    MS-Off Ver
    Excel 2010
    Posts
    116

    Excel graph with offset formula so it updates with data is add

    Dear Excel Experts:
    I have table that collects data for the weeks in a year (Tab MAIN DATA). I would like a trend graph what will up data when new data is add to the table. I was going to have these charts on a separate tab for each car #. I don't what the chart to show 0 when there is no data added yet. In addition, this data is collected on 12 items (car #s), so I would also like a pivot chart on the main data tab that you can have a slicer with the car # as the filter and it would show the chart with a trend line per car #. Is this possible? I have tried and tried to figure this out and haven't had any luck. Any help would be very much appreciated. Thank you I have added a spreadsheet for an example. Any help would be appreciated.
    Attached Files Attached Files

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Excel graph with offset formula so it updates with data is add

    Hi,

    Does the attached help.

    To be able to use a Pivot Table/Chart the data needs to be in a different layout. See sheet Data.
    I've also added the dynamic range name 'data' to the data set and a one line macro to the Pivot Table sheet activate event which refreshes the chart every time you select the sheet.
    Attached Files Attached Files
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Contributor
    Join Date
    05-08-2013
    Location
    FLORENCE, ALABAMA
    MS-Off Ver
    Excel 2010
    Posts
    116

    Re: Excel graph with offset formula so it updates with data is add

    Hello Richard,
    It's doing what I need on the pivot table, but how can I have new data is entered into the "Main Data" tab update automatically?

  4. #4
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Excel graph with offset formula so it updates with data is add

    Hi,

    You can't.

    New data should be entered in the new data layout sheet I gave you. That's the only way you can utilise a Pivot Table/Chart

  5. #5
    Forum Contributor
    Join Date
    05-08-2013
    Location
    FLORENCE, ALABAMA
    MS-Off Ver
    Excel 2010
    Posts
    116

    Re: Excel graph with offset formula so it updates with data is add

    So the data would have to be copied and paste every week. Maybe there's a macro what will copy the last column on the "Data" table then paste on the last data in column "C" in "DATA" tab. For example 5/2/16 Col W 1 thru 15 on Main Data Copy then paste on "Data" tab col C row 206 down to row 217. I would have the dates and car # already in A & B colm. Do you think that might work?

  6. #6
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Excel graph with offset formula so it updates with data is add

    Yes, if the original data can't be fed directly into the three column database without transformation then the smart way is as you suggest a pre-processing macro to take the data in its original format and convert it to the new.

  7. #7
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,926

    Re: Excel graph with offset formula so it updates with data is add

    I think this is what you want.

    First I unhid some of your stuff so I could actually see what was there. Column E threw me for a loop for a while.

    I made a data validation in Cell A17 to look up which car you want to plot.

    In Cell B18, I have the formula: =MATCH(A17,A3:A15,0) – this gives me the row, relative to the date row, on which the car is found.

    In Cell B19, I have another helper cell with the formula: =COUNTA(INDIRECT(B18+2&":"&B18+2))-5. The -5 is there because we don’t want to “count” the information in columns A:E. This gets a count of how much data there is on the row for the selected car.

    Then I have two named dynamic ranges:
    P_Date =OFFSET('MAIN DATA'!$F$2,0,0,1,'MAIN DATA'!$B$19)
    P_Values =OFFSET(P_Date,'MAIN DATA'!$B$18,0)

    I selected the existing chart and right clicked and selected Select Data and where you had the fixed data, I substituted these names.

    I also clicked in the chart title went up to the formula bar and then selected Cell A17 so the chart title reflects the Car selection.

    To get more information on named dynamic ranges and dynamic charting see these articles.
    http://www.utteraccess.com/wiki/inde...Dynamic_Ranges
    http://www.utteraccess.com/wiki/inde...namic_Charting
    Attached Files Attached Files
    One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.

    A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.

  8. #8
    Forum Contributor
    Join Date
    05-08-2013
    Location
    FLORENCE, ALABAMA
    MS-Off Ver
    Excel 2010
    Posts
    116

    Re: Excel graph with offset formula so it updates with data is add

    Dear dflak,
    Thank you so much!! This was exactly what I was looking for. I was making it too difficult. I knew I needed a dynamic ranges setup, but I thought I had to do a pivot to see the chart by car #. Excellent, excellent help! I will change the status as solved. Plus add to your reputation. You were so very helpful. Once again, Thank you so much!!

+ 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. Dynamic Graph/ Graph Data updates
    By JPSIMMON in forum Excel General
    Replies: 1
    Last Post: 04-14-2015, 03:11 PM
  2. Graph data updates
    By este994 in forum Excel General
    Replies: 1
    Last Post: 01-18-2012, 07:47 AM
  3. Replies: 3
    Last Post: 03-04-2011, 06:01 AM
  4. Data updates on a sheet but the graph does not.
    By speric07 in forum Excel General
    Replies: 2
    Last Post: 09-13-2006, 05:16 AM
  5. [SOLVED] How do I publish an Excel graph on the web such that it updates?
    By Mike BS DLP in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 03-08-2006, 11:15 AM
  6. Graph formats after updates
    By fcisp in forum Excel General
    Replies: 0
    Last Post: 06-24-2005, 11:05 AM
  7. [SOLVED] I have a live data feed that updates a cell all day. Can I graph?
    By windman in forum Excel General
    Replies: 1
    Last Post: 05-18-2005, 03:06 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