+ Reply to Thread
Results 1 to 9 of 9

dynamic ranges which adds column

  1. #1
    Forum Contributor
    Join Date
    11-20-2014
    Location
    Netherlands
    MS-Off Ver
    Office 365
    Posts
    177

    dynamic ranges which adds column

    I have a row which is filled in with data for each week.
    A graph is made out of this data.

    now i would like to have a dynamic named range which will add the next week when the cell is filled with data.
    This dynamic range should then be linked to the graph so the graph will automatically update with the new week.

    see test workbook.
    Attached Files Attached Files

  2. #2
    Forum Expert tim201110's Avatar
    Join Date
    10-23-2011
    Location
    Russia
    MS-Off Ver
    2016, 2019
    Posts
    2,357

    Re: dynamic ranges which adds column

    there are 2 names in WB _q for data and _n for week no
    Attached Files Attached Files

  3. #3
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    MS365 Apps for enterprise
    Posts
    5,887

    Re: dynamic ranges which adds column

    Slightly different approach. Using 3 named ranges.

    1 for series data, 1 for x_axis and another for series label.

    Recreate those named ranges, then edit series formula by highlighting series.

    Making sure to add worksheet name in front of named ranges.
    =SERIES(test.xlsx!Series_Label,test.xlsx!x_axis,test.xlsx!Series,1)
    Attached Files Attached Files
    ?Progress isn't made by early risers. It's made by lazy men trying to find easier ways to do something.?
    ― Robert A. Heinlein

  4. #4
    Forum Contributor
    Join Date
    11-20-2014
    Location
    Netherlands
    MS-Off Ver
    Office 365
    Posts
    177

    Re: dynamic ranges which adds column

    Thank you both.
    Making the named ranges I understand now, however it seems I cant get those linked to my graphs.

    For example I named my range for the weeknumbers 'week' then I fill in the axis label range =name of the file.xlsx!name of the range
    The same as you do in the test files but for me it does not work..

  5. #5
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: dynamic ranges which adds column

    Upload an example where it is not working (Go Advanced > Manage Attachments) so that we can troubleshoot
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  6. #6
    Forum Expert tim201110's Avatar
    Join Date
    10-23-2011
    Location
    Russia
    MS-Off Ver
    2016, 2019
    Posts
    2,357

    Re: dynamic ranges which adds column

    you should input named ranges in graph data source this way: sheetname!definedname

  7. #7
    Forum Contributor
    Join Date
    11-20-2014
    Location
    Netherlands
    MS-Off Ver
    Office 365
    Posts
    177

    Re: dynamic ranges which adds column

    Please Login or Register  to view this content.
    Did it like that
    Attached Files Attached Files

  8. #8
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    MS365 Apps for enterprise
    Posts
    5,887

    Re: dynamic ranges which adds column

    Oh, in my post. I meant. Workbook name, not worksheet name.

    =SERIES(test.xlsx!Series_Label,test.xlsx!x_axis,test.xlsx!Series,1)

    Replace sheet reference with workbook reference and named ranges should work.

  9. #9
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: dynamic ranges which adds column

    The easiest way (for me) to insert named ranges into graphs is, with the graph selected, choose Design tab on ribbon and then "Select Data"
    Choose each series and then Edit
    =sheetname!definedname ie. = 'Inbound vs outbound week'!Inboundzig
    repeat for all series.

    Some notes:
    It might be due to you editing but the Inboundzig name was not set up right. You referenced the COUNTA to row 2 instead of row 4 (where the data actually is)

    I assumed that the number of data points in Inbound Z will be the same as all the others so I used this shortcut in creating the other defined names
    outboundzig = Offset(Inboundzig,1,0)
    InboundU = Offset(Inboundzig,2,0)
    OutboundU = Offset(Inboundzig,3,0)
    and so on.
    Any questions?
    Attached Files Attached Files
    Last edited by ChemistB; 07-05-2017 at 02:34 PM.

+ 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. Create two dynamic named ranges in the same column?
    By nobodyukno in forum Excel General
    Replies: 1
    Last Post: 05-05-2017, 11:10 AM
  2. [SOLVED] Speeding up For Loop that adds names to ranges
    By newfrito11 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 03-18-2016, 07:07 PM
  3. [SOLVED] Incrementing dynamic ranges beyond Column Z
    By daffodil11 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-24-2013, 01:53 PM
  4. Replies: 19
    Last Post: 03-04-2013, 01:16 PM
  5. Replies: 10
    Last Post: 11-21-2011, 12:51 PM
  6. Replies: 2
    Last Post: 01-06-2010, 05:51 AM
  7. [SOLVED] Funtion that adds two named ranges
    By Matt in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-17-2006, 12:50 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