+ Reply to Thread
Results 1 to 10 of 10

Error trying to use a named range to define series x values

  1. #1
    Registered User
    Join Date
    10-13-2022
    Location
    Northamptonshire, England
    MS-Off Ver
    Excel 2016
    Posts
    56

    Error trying to use a named range to define series x values

    I have a chart in which I am trying to use a named range (X1Values) to define the Series X values for Series1
    Edit Series.png
    The range X1Values appears in Name Manager thus
    Name Manager.png
    but this is showing the following error message when I attempt to use it as shown in the first image
    Error message.png
    If I set the range to Calculations!$B$3:$B$51 (the same range as X1Values) all is well. The chart is embedded on Sheet1 (aka "Parameters") and the range is on Sheet3 (aka "Calculations").

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,419

    Re: Error trying to use a named range to define series x values

    Try:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,720

    Re: Error trying to use a named range to define series x values

    Try it with INDIRECT, i.e.:

    =INDIRECT(X1Values)

    or you may need to put quotes around the name:

    =INDIRECT("X1Values")

    Hope this helps.

    Pete

  4. #4
    Registered User
    Join Date
    10-13-2022
    Location
    Northamptonshire, England
    MS-Off Ver
    Excel 2016
    Posts
    56

    Re: Error trying to use a named range to define series x values

    I tried that after posting and it doesn't work. Thanks

  5. #5
    Registered User
    Join Date
    10-13-2022
    Location
    Northamptonshire, England
    MS-Off Ver
    Excel 2016
    Posts
    56

    Re: Error trying to use a named range to define series x values

    Both those give "Function isn't valid"

  6. #6
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,907

    Re: Error trying to use a named range to define series x values

    The syntax Trevor posted is correct and should not give that error. I suggest you post a workbook.
    Rory

  7. #7
    Registered User
    Join Date
    10-13-2022
    Location
    Northamptonshire, England
    MS-Off Ver
    Excel 2016
    Posts
    56

    Re: Error trying to use a named range to define series x values

    You are right, Trevor's syntax is working (I don't know why it didn't work when I tried it the first time - I must have done something wrong). Two points though:

    1. When I go back to edit the series, it is shows the filename of the workbook at the beginning of the definition and I can't see the full definition.
    2. I don't understand why the Calculations! prefix is required when the scope of X1Values is "Workbook".

    Lastly, I will need to see how I can do this in VBA - but I'll work on that later.

    Thanks to everybody (especially Trevor, thank you Trevor)

  8. #8
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,907

    Re: Error trying to use a named range to define series x values

    Re 1: you can scroll to the end of the box (press f2 first if you want to use the arrow keys)
    Re 2: it doesn't have to be the sheet name, it can be the workbook name (and will switch to that anyway) but we didn't know what that was... (and it's usually easier to use a sheet name).

  9. #9
    Registered User
    Join Date
    10-13-2022
    Location
    Northamptonshire, England
    MS-Off Ver
    Excel 2016
    Posts
    56

    Re: Error trying to use a named range to define series x values

    Thank you, that is incredibly helpful (I didn't know about either of those things)

  10. #10
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,419

    Re: Error trying to use a named range to define series x values

    You're welcome. Thanks for the rep.

+ 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. [SOLVED] Cant make Excel Chart to use Named Range for Series values in VBA
    By rocksan in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-26-2012, 07:26 AM
  3. VBA Named Define error
    By jjschramm in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-09-2011, 01:32 PM
  4. How do you define a data series from a named range?
    By GeneralDisarray in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 11-08-2011, 06:42 PM
  5. Define named range where user can define size
    By nahousto in forum Excel General
    Replies: 4
    Last Post: 07-06-2009, 05:09 PM
  6. define a Named Range
    By T. Jenkins in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-08-2006, 04:05 PM
  7. [SOLVED] How to define a Named Range in VBA?
    By Richard in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-12-2005, 02:50 PM

Tags for this Thread

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