+ Reply to Thread
Results 1 to 3 of 3

Macro to update chart using dynamic named range

  1. #1
    Registered User
    Join Date
    03-03-2016
    Location
    London, England
    MS-Off Ver
    2007
    Posts
    14

    Macro to update chart using dynamic named range

    I have the below line in a macro and it updates the series range of a chart as expected:
    Please Login or Register  to view this content.
    However, if I amend it to the below to have the chart update from a named range, I get an error (Run-time error 1004 - Application-defined or object-defined error):
    Please Login or Register  to view this content.
    For info, the named range is dynamic and if defined using the below:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    If the named range referrs to a static range (i.e. A6:D21) then the second line works fine so I'm guessing it's all to do with the dynamic aspect.

    I need it to be a dynamic range as an earlier part of the macro adds/removes rows and data from the range that drives the chart.

    Any ideas to get around this?

  2. #2
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: Macro to update chart using dynamic named range

    Try defining the named range using the below formula:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Does that work for you?

    BSB

  3. #3
    Registered User
    Join Date
    03-03-2016
    Location
    London, England
    MS-Off Ver
    2007
    Posts
    14

    Re: Macro to update chart using dynamic named range

    It works!!! Thank you thank you thank you, BSB!

    Now does anyone have any idea why the dynamic range with INDEX didn't work for this?

+ 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. Replies: 0
    Last Post: 03-08-2016, 02:25 PM
  2. Replies: 11
    Last Post: 01-16-2015, 07:04 PM
  3. [SOLVED] Dynamic Named Range As Chart Series
    By goss in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-19-2013, 05:22 PM
  4. [SOLVED] Chart date labels don't update (using dynamic named range)
    By s80NL in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 01-04-2013, 11:35 AM
  5. Using Dynamic Named Range in Chart
    By Ivydesert in forum Excel General
    Replies: 3
    Last Post: 11-09-2011, 01:42 PM
  6. Dynamic Named Range in Chart
    By ckirkwalsh in forum Excel General
    Replies: 2
    Last Post: 09-13-2011, 03:08 PM
  7. Can't chart dynamic named range??
    By [email protected] in forum Excel Charting & Pivots
    Replies: 4
    Last Post: 07-20-2006, 03:35 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