+ Reply to Thread
Results 1 to 14 of 14

Automatically adjust displayed portion of fixed data series on chart

  1. #1
    Registered User
    Join Date
    11-24-2008
    Location
    North Carolina
    Posts
    41

    Automatically adjust displayed portion of fixed data series on chart

    Hi there. So I have a large series of data (in the screenshot it extends out past the screenshot to column BP). I'd like the graph to only ever show ~10 columns of data, with the latest data point reflected in the second-to-last column. So if the graph looks how it does in the screenshot on day one, then on day two, once I entered data for 10-Apr, the displayed columns in the graph would shift to show from 2-Apr to 10-Apr. I realize I can change the series, but I'm curious if there is a way to leave the series untouched, but have the range displayed in the chart adjust automatically based on either the date or the data available in the series... Not sure if this makes sense...?

    2020-04-10_11-14-27.jpg

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,436

    Re: Automatically adjust displayed portion of fixed data series on chart

    You can do that with named ranges.

    https://peltiertech.com/dynamic-char...ltiple-series/
    Cheers
    Andy
    www.andypope.info

  3. #3
    Registered User
    Join Date
    11-24-2008
    Location
    North Carolina
    Posts
    41

    Re: Automatically adjust displayed portion of fixed data series on chart

    Thanks Andy. Does this work when my series is laid out horizontally vs vertically? If so, can you help with how I would be adjusting the Names/Series in that scenario?

  4. #4
    Registered User
    Join Date
    11-24-2008
    Location
    North Carolina
    Posts
    41

    Re: Automatically adjust displayed portion of fixed data series on chart

    Also, how would this offset naming look if I wanted the starting cell to adjust? It looks like the formula in that article always starts with the XLabel of "A" and just grows. I am looking to have the XLabel start with "A" then the next day it starts with "B".

    For example, on day one, the xlabel range is A-F. On day two, the xlabel range is B-G. On day three, the xlabel range is C-H. And so on.
    Last edited by ezdizzy; 04-10-2020 at 02:46 PM. Reason: grammar, clarity

  5. #5
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,436

    Re: Automatically adjust displayed portion of fixed data series on chart

    To do horizontal dynamic ranges you just need to alter the column start point and length, while the row start = 0 and height =1

    MY_DATA: =OFFSET(Sheet1!$D$30,0,COUNT(Sheet1!$30:$30)-MIN(COUNT(Sheet1!$30:$30),9),1,MIN(COUNT(Sheet1!$D$30:$L$30),9)+1)
    MY_LABEL: =OFFSET(MY_DATA,-1,0)

    You need to calculate the number of available points, capping at 10 points.
    Then you can work out the last data point and subtract

  6. #6
    Registered User
    Join Date
    11-24-2008
    Location
    North Carolina
    Posts
    41

    Re: Automatically adjust displayed portion of fixed data series on chart

    So are you saying the following should be in my name manager?

    =OFFSET(OFFSET(Sheet1!$D$30,0,COUNT(Sheet1!$30:$30)-MIN(COUNT(Sheet1!$30:$30),9),1,MIN(COUNT(Sheet1!$D$30:$L$30),9)+1),-1,0)

    If so, do I leave the 'series' data the same (wherever it may be) for the chart itself?

  7. #7
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,436

    Re: Automatically adjust displayed portion of fixed data series on chart

    Did you try the two named ranges I provided?

    The use formula to determine column offset and length. The row parameters are simple 0 and 1.

  8. #8
    Registered User
    Join Date
    11-24-2008
    Location
    North Carolina
    Posts
    41

    Re: Automatically adjust displayed portion of fixed data series on chart

    yeah, sorry this is my first time with dynamic charting... when you say "try the named ranges", I'm not clear on where I am inputting what information...

    In your post, are "MY_DATA" and "MY_LABEL" names? In other words, in the screenshot below, "XLabels" is to be replaced with what you have for "MY_DATA", and "YAlpha" is to be replaced with what you have for "MY_LABEL"? Is that what you mean?

    (screenshot taken from the article you linked earlier in this thread)

    Attachment 672396
    Last edited by ezdizzy; 04-14-2020 at 06:54 AM.

  9. #9
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,436

    Re: Automatically adjust displayed portion of fixed data series on chart

    You need to use the Name Manager on the Formula tab of the ribbon.

    Once you have entered the 2 named ranges you can then select the chart and use the Select Data dialog to use the named ranges range than cell references.
    The website link provided will provide all the information you need, including screen shots.

  10. #10
    Registered User
    Join Date
    11-24-2008
    Location
    North Carolina
    Posts
    41

    Re: Automatically adjust displayed portion of fixed data series on chart

    Ok, I have figured out the names and where to add them in my series. Now I am trying to understand: Where in these formulas is the chart getting the instruction to shift to the right with the new data? For example: If right now it shows columns D->L, how does it know to show columns E->M, once data is entered into L30?

    Attachment 672422

  11. #11
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,436

    Re: Automatically adjust displayed portion of fixed data series on chart

    FYI, your attachments are not showing.

    The offset function has 5 arguments
    Anchor cell
    row offset from anchor
    column offset from anchor
    number of rows
    number of columns


    MY_DATA: =OFFSET(Sheet1!$D$30,0,COUNT(Sheet1!$30:$30)-MIN(COUNT(Sheet1!$30:$30),9),1,MIN(COUNT(Sheet1!$D$30:$L$30),9)+1)

    =OFFSET(
    Sheet1!$D$30,
    0,
    COUNT(Sheet1!$30:$30)-MIN(COUNT(Sheet1!$30:$30),9),
    1,
    MIN(COUNT(Sheet1!$D$30:$L$30),9)+1
    )

    The count function determines how many columns there are. The min stops it from tripping up if there are not enough data columns
    The number of columns includes +1 as you wanted the last period to be 1 beyond the actual data

  12. #12
    Registered User
    Join Date
    11-24-2008
    Location
    North Carolina
    Posts
    41

    Re: Automatically adjust displayed portion of fixed data series on chart

    yeah something is off in your instructions then (or I am misunderstanding). I had to change the +1 at the end of the formula to a +9 to get the graph to show nine columns. Otherwise, with your formula it was just showing one column in the chart....

  13. #13
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,436

    Re: Automatically adjust displayed portion of fixed data series on chart

    It works for me, based on your picture of your data.
    Attached Files Attached Files

  14. #14
    Registered User
    Join Date
    11-24-2008
    Location
    North Carolina
    Posts
    41

    Re: Automatically adjust displayed portion of fixed data series on chart

    Ah. Got it. I found some errors on my end with entering the formulas. Thanks so much for sharing this workbook. Very helpful. I appreciate your patience and help!

+ 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 Chart with series data rolling and fixed x axis
    By AlanC in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 12-27-2015, 06:07 PM
  2. How to unanchor chart data series to adjust when copied?
    By Hugheslf in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 10-03-2015, 11:38 AM
  3. Trouble with Fixed Chart Series Data Range when adding Rows
    By pmkf in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 12-10-2014, 12:29 PM
  4. [SOLVED] How to have a chart automatically adjust range as I add data entri
    By AdamCPTD in forum Excel General
    Replies: 2
    Last Post: 07-06-2006, 04:55 PM
  5. How to have a chart automatically adjust range as I add data entr.
    By AdamCPTD in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 07-06-2006, 04:40 PM
  6. Chart Series Not displayed
    By Barb Reinhardt in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 06-05-2006, 06:10 AM
  7. How to add data labels from a series not displayed on a chart
    By doctor bm in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 02-28-2006, 08:55 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