+ Reply to Thread
Results 1 to 3 of 3

Dynamic Named Ranges used create a Chart

  1. #1
    Registered User
    Join Date
    11-15-2011
    Location
    St. Louis, MO
    MS-Off Ver
    Excel 2013
    Posts
    69

    Smile Dynamic Named Ranges used create a Chart

    I'm trying to create chart using dynamic named ranges. My coding returns an error on the Bolded line:
    Run-Time error '1004': Application-defined or object-defined error
    My named ranges are:
    Bat_Perc scope: Raw Data =OFFSET('Raw Data'!$B$2,0,0,COUNTA('Raw Data'!$B:$B),1)
    Date_Time scope: Raw Data =OFFSET('Raw Data'!$A$2,0,0,COUNTA('Raw Data'!$A:$A),1)

    It seems Excel does like my named ranges. Could the scope setting maybe need to be changed to Workbook?
    I'd appreciate any help anyone has to offer. Steve

    HTML Code: 

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Dynamic Named Ranges used create a Chart

    While recording a macro, right-click on the chart your current macro created and manually enter in the named ranges. Look at the recorded code to get the proper syntax.

    .Values = "={""Raw Data!Bat_Perc""}"
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Registered User
    Join Date
    11-15-2011
    Location
    St. Louis, MO
    MS-Off Ver
    Excel 2013
    Posts
    69

    Re: Dynamic Named Ranges used create a Chart

    AlphaFrog, Thank you very much. When I tried to do what you suggest, excel wouldn't let me enter my named ranged for the X or Y axis, to be able to see what would be recorded. So I knew that the problem had to do with how the named range was entered, not a problem with the named range itself. It was the Apostrophies (') that were missing around my sheet name. I had:
    Please Login or Register  to view this content.
    and I should have had
    Please Login or Register  to view this content.
    That was it. The plot on my chart works. Your suggestion got me there. Thank you. Steve

+ 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. Quickly Create 100+ Dynamic Named Ranges
    By dharmon in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-17-2016, 05:13 PM
  3. [SOLVED] dynamic chart with named ranges
    By a.hudrea in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-22-2014, 05:18 AM
  4. [SOLVED] Dynamic Named Ranges & Chart Series
    By stockgoblin42 in forum Excel Charting & Pivots
    Replies: 17
    Last Post: 05-15-2013, 01:31 AM
  5. Dynamic Chart Using Named Ranges
    By jjcgirl in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-07-2013, 11:57 AM
  6. [SOLVED] Create Multiple Dynamic Named Ranges with a Macro
    By bennank in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-09-2012, 12:55 PM
  7. Chart using dynamic named ranges
    By sinspawn56 in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 05-05-2010, 10:39 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