+ Reply to Thread
Results 1 to 6 of 6

Reference to named range valid in one cell, #Value in another

  1. #1
    Valued Forum Contributor AlvaroSiza's Avatar
    Join Date
    09-19-2007
    Location
    Staffordshire
    MS-Off Ver
    2007
    Posts
    591

    Reference to named range valid in one cell, #Value in another

    Assume MyName is a global named range defined as the merged Range("A1:A2") containing a validated list of animals, with "Cat" chosen.

    In B2, =MyName returns "Cat"
    In C2, =MyName returns #VALUE

    What is wrong with Cell C2?

    Thx
    Perhaps it was the Noid who should have avoided me...
    If you are satisfied with my solution click the small star icon on the left. Thanks
    1. Make a copy of your workbook and run the following code on your copy (just in case)
    2. With excel open, press ALT+F11 to open the Visual Basic Editor (VBE). From the "Insert" menu, select "Module".
    3. Paste the code from above into the empty white space. Close the VBE.
    4. From the developer tab, choose "Macros", select the Sub Name, and click "Run".

  2. #2
    Forum Contributor
    Join Date
    09-27-2012
    Location
    London, England
    MS-Off Ver
    2003, 2010
    Posts
    344

    Re: Reference to named range valid in one cell, #Value in another

    I tried to replicate your criteria's, but seemed to work fine. Please could you upload a sample workbook?

    Thanks.
    If solved kindly remember to mark Thread as solved.
    Click the small star icon at the bottom left of my post if this was useful.

  3. #3
    Forum Contributor
    Join Date
    09-27-2012
    Location
    Florida
    MS-Off Ver
    Excel XP to 2013
    Posts
    342

    Re: Reference to named range valid in one cell, #Value in another

    How many rows are in your list "MyName" ?
    Tom S.
    ↙ If you find my reply helpful click on the * down there on the left. Yeah that's it, right there, down on the left
    If your question is resolved, mark it SOLVED using the thread tools.

  4. #4
    Forum Contributor
    Join Date
    09-27-2012
    Location
    Florida
    MS-Off Ver
    Excel XP to 2013
    Posts
    342

    Re: Reference to named range valid in one cell, #Value in another

    Let me rephrase that, is row 3 included in your list. I get the error if row 3 is not part of the MyName range

  5. #5
    Valued Forum Contributor AlvaroSiza's Avatar
    Join Date
    09-19-2007
    Location
    Staffordshire
    MS-Off Ver
    2007
    Posts
    591

    Re: Reference to named range valid in one cell, #Value in another

    Not able to replicate via 'example' workbook unfortunately.

    Named range consists of a single row, and three columns. (OP should have read "A1:B3"). Moreover, MyName references a validated list via Data > Data Validation > Allow > List =AnimalList (which is located on another worksheet)

    I can literally =MyName in some places and it renders as expected. =MyName elsewhere renders #VALUE. Baffled and I consider myself an advanced user. Thanks again for the input.

  6. #6
    Valued Forum Contributor AlvaroSiza's Avatar
    Join Date
    09-19-2007
    Location
    Staffordshire
    MS-Off Ver
    2007
    Posts
    591

    Re: Reference to named range valid in one cell, #Value in another

    Figured it out. Changing reference of MyName to only first cell in merged range solved problem.

    SOLVED.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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