+ Reply to Thread
Results 1 to 3 of 3

Problem with Using Variable Named Range for Chart

  1. #1
    Valued Forum Contributor
    Join Date
    02-04-2009
    Location
    Texas
    MS-Off Ver
    Excel 2016
    Posts
    665

    Problem with Using Variable Named Range for Chart

    I created a Variable named range based on choices on Summary tab. This works. Created Chart using ChartData (the variable Named Range). Good. But then when the options are changed. The chart doesn't change.
    So for example - when creating the chart, the options in the variable range result in a range of A1:F10. When I change the options and the range would result in A1:F30 - the chart remains A1:F10.

    Example Worksheet attachedTEST.xlsm
    Last edited by CRIMEDOG; 02-28-2024 at 10:46 AM. Reason: Title
    If this solves your issue, Mark thread as Solved & Add Reputation.

    Thanks!

  2. #2
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,563

    Re: Problem with Using Variable Named Range for Chart

    Looks like the chart changes as expected to me with the possible exception of the legend having some unused symbols when changing from All to another selection under Year.
    Could you please give us a specific instance where it does not.
    Such as when changed from Expanded Income to Profit, or from All to Last 3, what should it do that it isn't?
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  3. #3
    Valued Forum Contributor
    Join Date
    02-04-2009
    Location
    Texas
    MS-Off Ver
    Excel 2016
    Posts
    665

    Re: Problem with Using Variable Named Range for Chart

    Fixed it with Macros. On sheet Summary when B2 or D2 changes, then it runs a macro that updates the data based on the variable Named Range. By updating everything each time, you don't get the unused symbols. What was happening before, if you chose an option that had less data, the next change you made would not have all the data you want - or if you chose an option that had more data, you get the unused symbols. So it would use the variable Named range for the first choice, but would not update the range for the second...
    The macro updates the range each time a change is made.
    On summary:
    Please Login or Register  to view this content.
    On Module:
    Please Login or Register  to view this content.
    TEST.xlsm

+ 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. Variable for named range in combobox
    By bevc in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-02-2016, 05:36 AM
  2. Replies: 0
    Last Post: 03-08-2016, 02:25 PM
  3. Variable named range problem
    By CXsjr in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-06-2015, 03:37 AM
  4. [SOLVED] Automatically answer Named Conflict Dialog with No and set Named range to variable
    By mlj61289 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-23-2013, 08:32 PM
  5. Set a variable to a dynamic named range
    By BarryTSL in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-20-2012, 06:18 AM
  6. Define variable range as named range
    By nigelog in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-30-2008, 09:28 AM
  7. Looking up against a variable named range??
    By jghutch in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-25-2006, 08:26 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