+ Reply to Thread
Results 1 to 3 of 3

dynamic named range in chart becomes absolute

  1. #1
    Registered User
    Join Date
    03-11-2011
    Location
    Gelrode
    MS-Off Ver
    Excel 2007
    Posts
    4

    dynamic named range in chart becomes absolute

    Hi,



    Can someone tell me how I can set the data for a chart with named dynamic ranges so that these ranges are not translated absolute by Excel ??


    I've tried to set a dynamic named range as the source/series/formula of a chart through a couple of ways but apparently it gets "translated" to the "current" absolute range. I would rather have it relative/dynamic so that the chart changes when data in the range changes (more, less items in the range).

    The named ranges are correct and dynamic, I can test that by printing count of the range and play with the range.

    at first I tried to set the data via (right click chart > select data) chart data range, but apparently that is the easiest way to get absolute ranges.

    I tried setting via seriecollection.values (for instance

    .SeriesCollection(1).Values = Range("maten_ola!rngBovengrensVerdelingTopicOla")

    and when I Msgbox the formula for the series it is translated to the current range (for instance maten_ola!D2:D10), and changes to the range are clearly "lost".



    I was hoping to have the chart configured with dynamic ranges so that it could be used flexible with external data without users or application (on import do ...) "resetting" the values with the dynamic range but I guess it should be possible to have the dynamic range dynamic (relative not absolute).

    It's driving me nuts ;-)

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

    Re: dynamic named range in chart becomes absolute

    Based on your description, your dynamic named ranges are functioning properly (i.e. when you add data your named range expands accordingly).

    Click on your chart and go to the Design Tab of your ribbon and "Select Data"
    From there you should be able to edit your series. Let's say you have named ranges xdata and ydata. For the series values =sheet1!xdata enter.
    Does that work for you?
    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

  3. #3
    Registered User
    Join Date
    03-11-2011
    Location
    Gelrode
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: dynamic named range in chart becomes absolute

    YES !! I think it does ;-)

    thank you very very (very!) much chemist.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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