+ Reply to Thread
Results 1 to 24 of 24

Using a concatenated string to reference a name ranged for a chart series

  1. #1
    Registered User
    Join Date
    09-02-2010
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    10

    Using a concatenated string to reference a name ranged for a chart series

    So I've created a self-updating chart using named ranges with the OFFSET() function. The table works if I directly reference the named ranges i've created in the Series Value box.

    What I am trying to do is give my user the ability to choose what named ranges to put into the chart by using a list box, option Box, and eventually a check box. So far I have set up List and Option boxes that return certain string values (using CHOOSE). I have been concatenating those strings to match exactly with the named ranges I have already created.

    The Problem

    I can't find a way for the chart to recognize the concatenated string as a reference to a named range. I have tried:

    Referencing the Cell Number directly in the Series Value Box
    Referencing a TEXT() version of the concatenated string
    I have even just tried typing out the string to see if the chart would recognize a string in a cell as a named range. Didn't work

    I feel like I'm missing something simple, or this isn't possible. Any help would be greatly appreciated.

    Thanks.
    Last edited by Snoch; 08-05-2013 at 03:00 PM.

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

    Re: Using a concatenated string to reference a name ranged for a chart series

    You would normally use something like:

    =INDIRECT("named_range")

    or:

    =INDIRECT(A1)

    if A1 contains the name as a text value.

    However, I'm not sure if INDIRECT and OFFSET can both work together like this as they are both volatile functions - maybe use INDEX instead of the OFFSET function (though I'm not sure how you are using it, as you didn't give details).

    Hope this helps.

    Pete

  3. #3
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: Using a concatenated string to reference a name ranged for a chart series

    Are you including the sheet name as well as the named range?

    i.e. are you using
    =Sheet1!Named_Range
    not just
    =Named_Range

    Edit: At Pete, I'm not sure you can use indirect inside a chart? I'd guess you would want to set the chart reference to a specific named range and then use that named range to adjust based on the user selection:

    eg. chart source: =Sheet1!Named_Range1

    NamedRange1 definition: =indirect(A1), where A1 contains the name of the named range you want the chart to reference.
    Last edited by ragulduy; 08-05-2013 at 09:27 AM.

  4. #4
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Using a concatenated string to reference a name ranged for a chart series

    "However, I'm not sure if INDIRECT and OFFSET can both work together like this as they are both volatile functions"

    Correct. Using INDIRECT to reference a Named Range is not valid if that Named Range uses certain formulae, including OFFSET.

    Regards
    Click * below if this answer helped

    Advanced Excel Techniques: http://excelxor.com/

  5. #5
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Using a concatenated string to reference a name ranged for a chart series

    you have to use an additional named range using EVALUATE in the same way as you would use INDIRECT and then refer to this named range in the chart series
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  6. #6
    Registered User
    Join Date
    09-02-2010
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: Using a concatenated string to reference a name ranged for a chart series

    I am concatenating the sheet name into the string as well as the named range. I have tested the named ranges and I know that they work if I insert them into the Series Value box directly.

    It seems the consensus is that INDIRECT() won't work if i'm also using offset.

    Any other ideas?

  7. #7
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: Using a concatenated string to reference a name ranged for a chart series

    JosephP's suggestions are always good ones to try (use evaluate instead of indirect)

  8. #8
    Registered User
    Join Date
    09-02-2010
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: Using a concatenated string to reference a name ranged for a chart series

    From what I can find EVALUATE seems to be a function that is only available through a downloadable Add-In. I'm on a work computer (at a new job) so I'm not sure i'm comfortable or able to download something like that.

    I'm using excel 2007.
    Is it part of an add-in? If so is there another way to do this?

  9. #9
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Using a concatenated string to reference a name ranged for a chart series

    no it is a native excel function and works in all versions of excel from version 4 :-)

  10. #10
    Registered User
    Join Date
    09-02-2010
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: Using a concatenated string to reference a name ranged for a chart series

    Do you know of a trustworthy link to get this add-in? I'm a bit terrified to introduce a virus into the company network in my first week on the job.

  11. #11
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Using a concatenated string to reference a name ranged for a chart series

    it is not an add-in
    :-)

  12. #12
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Using a concatenated string to reference a name ranged for a chart series

    It's NOT an Add-In!!

    Edit: @JosephP

  13. #13
    Registered User
    Join Date
    09-02-2010
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: Using a concatenated string to reference a name ranged for a chart series

    Oops! Sorry I misread what you wrote.

    I can't seem to find EVALUATE anywhere. Is this a function that works in the worksheet or if it a vba function?

    Sorry for all the questions but thank you for all the help.

  14. #14
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Using a concatenated string to reference a name ranged for a chart series

    It's not a worksheet function, but can be used in Named Ranges.

  15. #15
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Using a concatenated string to reference a name ranged for a chart series

    it will not work in a worksheet-you can only use it in a defined name. for instance if your INDIRECT formula for a static range would be
    =INDIRECT(A1)
    for a dynamic range you define a name (called say MySeries1) and in the RefersTo box you enter
    =EVALUATE(A1)

  16. #16
    Registered User
    Join Date
    09-02-2010
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: Using a concatenated string to reference a name ranged for a chart series

    That is exactly what I needed! Pure Genius. Works perfectly.


    Thank you so very, very much

  17. #17
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Using a concatenated string to reference a name ranged for a chart series

    you're welcome :-)

  18. #18
    Registered User
    Join Date
    09-02-2010
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: Using a concatenated string to reference a name ranged for a chart series

    A new problem has pop up! I figured I'd update the same thread rather than start a new one.

    The Problem
    I saved the workbook as an "Excel Macro-Enabled Workbook" but the EVALUATION function doesn't save. When I try and open the saved workbook, my series value formulas that have EVALUATION in them all show up as:
    =[0]!Eval_Named_Range

    Additional Info

    When I try to replace the "[0]!" with a the correct tab reference, excel sends back an invalid reference error pop up box.

    First, I have to go into Name Manager, open and save (without changing any data) the named range. Then I can go in and replace the "[0]!" with the correct tab reference and it works.

    Opening the security warning and checking "Enable This Conent" doesn't fix the isssue.

    Is there another workbook type i need to save as to make this work?

    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    I'm guessing I need to Enable All Macros in the Macro Security Settings. How safe is this? The file would be in the department network folder.
    Last edited by Snoch; 08-05-2013 at 01:22 PM. Reason: Potential Solution Found

  19. #19
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Using a concatenated string to reference a name ranged for a chart series

    do you have at least service pack 2 installed? that sounds like an early 2007 named range bug

  20. #20
    Registered User
    Join Date
    09-02-2010
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: Using a concatenated string to reference a name ranged for a chart series

    I'm in windows 7.
    System file says I only have service pack 1.

    This won't work without a service pack 2 upgrade? I'd need to get the IT department involved if so.

  21. #21
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Using a concatenated string to reference a name ranged for a chart series

    I'm referring to office service packs rather than windows ones

  22. #22
    Registered User
    Join Date
    09-02-2010
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: Using a concatenated string to reference a name ranged for a chart series

    It looks like I still have the original version installed (Microsoft Office Excel 2007 Excel.exe 12.0.4518.1014).

    I've enabled all macros for now and it saves correctly, guess I'll have to ask IT to update the SP.

    Thanks again,

    JosephP you are the best!

  23. #23
    Registered User
    Join Date
    08-05-2013
    Location
    bangalore
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: Using a concatenated string to reference a name ranged for a chart series

    thank u very much,i got the solution....,

  24. #24
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Using a concatenated string to reference a name ranged for a chart series

    I would insist on it-there are a lot of bugs in 2007 so you need at least sp2 and preferably sp3 and all subsequent patches too! ;-)

+ 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. Dynamic charts lose reference in chart series =[0]!
    By Mikerton in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 05-31-2013, 07:31 AM
  2. Stop cell reference from changing in a chart series
    By ruggedcashew in forum Excel General
    Replies: 0
    Last Post: 02-23-2012, 05:26 PM
  3. Series reference on a chart
    By kev_06 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-21-2006, 05:55 PM
  4. [SOLVED] how do I define a chart series with an indirect reference
    By tvanellen in forum Excel Charting & Pivots
    Replies: 4
    Last Post: 05-31-2006, 05:55 AM
  5. specify range name in formula with concatenated string
    By Lori H in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-19-2005, 11:05 AM

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