+ Reply to Thread
Results 1 to 7 of 7

dynamic range with chart

  1. #1
    Registered User
    Join Date
    10-12-2009
    Location
    OZ
    MS-Off Ver
    Excel 2003
    Posts
    3

    Question dynamic range with chart

    Hi guys,

    I'm trying to create a global dynamic range for my charts which works ok however the problem i have is that the range name only work for one worksheet.

    Attached is the file which I have the first 2 charts with dynamic name, and when i tried to use the same range name in other sheets, i couldn't as it will refer back to the first chart range. I tried to remove the Sheet reference but still doesnt work.

    Please help.

    Thanks in adv.
    Attached Files Attached Files
    Last edited by TonyNguyen; 10-20-2009 at 08:41 PM.

  2. #2
    Forum Expert ConneXionLost's Avatar
    Join Date
    03-11-2009
    Location
    Victoria, Canada
    MS-Off Ver
    2010
    Posts
    2,952

    Re: dynamic range with chart

    Hi Tony,

    Just guessing, but this might help. Have a read of the section on:

    Global-Scope And Sheet-Scope Names

    from Chip Pearson's web site.

    Cheers,
    Would you like to say thanks? Please click the: " Add Reputation" button, on the grey bar below the post.

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

    Re: dynamic range with chart

    I'm confused by your termonolgy. You say you want global but for it to be specific to a sheet. These descriptions are at odds with each other.

    Currently your ranges are at the workbook level which means they are the same for all sheets.

    If you want sheet specific sheets then you need to create sheet level named ranges.

    So for the Axes example you need to create a named range,
    NNC!Axes :=OFFSET(NNC!$C$6,0,0,1,MONTH(NNC!$B$6))

    And use it in the series formula like this,

    =SERIES(NNC!$B$7,NNC!Axes,NNC!$C$7:$O$7,1)
    Cheers
    Andy
    www.andypope.info

  4. #4
    Registered User
    Join Date
    10-12-2009
    Location
    OZ
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: dynamic range with chart

    Sorry guys,

    I was a bit confusing myself when trying to put it all into word.

    Here are some screen shots. The first one shows that i tried to use the range name in sheet NNC, however after clicking OK button, it automatically refer to the MET data.

    So my question is do I have to create different name for each sheet to refer to its own data or is there a name range where it can refer to the same cell reference on each sheet?

    eg: in sheet MET I have the name "ActOR" for range A1:A10, and when I go to sheet NNC or any other sheet, i want that ActOR to refer to NNC!A1:A10 in stead of MET!A1:A10

    If I have to create different name for each sheet, then is there any quick way of doing that (instead of doing Insert/Name/Define) because I will be looking at creating at least 120 names.

    Thanks
    Attached Files Attached Files

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

    Re: dynamic range with chart

    Named ranges can be either workbook or worksheet specific.

    When you add a named range called Axes it is at the workbook level.
    When you add a named range NNC!Axes it is at the worksheet level.

    So if you are on the MET sheet and look at the Names dialog you will see Axes in the list.

    If you are on the NNC sheet and look at the Names dialog you will see Axes with NNC to the right of Axes. This denotes a worksheet level name. If you delete it the workbook level Axes entry will remain and the NNC will be removed from the right as the worksheet level name is deleted.

    Quickest way to add sheet level names is with code.

    Please Login or Register  to view this content.
    Last edited by Andy Pope; 10-20-2009 at 03:56 AM.

  6. #6
    Registered User
    Join Date
    10-12-2009
    Location
    OZ
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: dynamic range with chart

    Hi Andy,

    Thanks for that, I have kinds worked out that there's no easy way to do it so I came up with a code to do all the names for me. I was having a problem of making it at the worksheet level but now you say to put the sheetname! in the front, i think that will work.

    Here is my code if anyone is interested:

    Please Login or Register  to view this content.
    Attached Images Attached Images
    Last edited by TonyNguyen; 10-20-2009 at 08:31 PM. Reason: Insert the Code tag

  7. #7
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: dynamic range with chart

    Tony, please take a few minutes to read the forum rules, and then edit your post to add code tags.

    Thanks.
    Last edited by shg; 10-20-2009 at 06:15 PM. Reason: typo
    Entia non sunt multiplicanda sine necessitate

+ 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