+ Reply to Thread
Results 1 to 3 of 3

Modifying Named Ranges in Name Manager in field 'Refers To'

  1. #1
    Forum Contributor
    Join Date
    01-08-2017
    Location
    Salt Lake City, Ut.
    MS-Off Ver
    2019 and 365
    Posts
    135

    Question Modifying Named Ranges in Name Manager in field 'Refers To'

    I am trying to find a way to simplify modifying Named ranges in Name Manager.
    I can do this with this code:
    Please Login or Register  to view this content.
    Where I have a problem is that I have up to a dozen different ranges that I want to modify at different times, and rather than writing code for each Named Range, I would like to place the range info in another sheet for all named ranges, so that I can pull the desired range and swap it into the sub RedefinedNamedRange. The issue I am having is that if I place them on another sheet in a cell code such as
    Please Login or Register  to view this content.
    and then try to reference it, it will change the Named range, but it places double quotation marks, making the range ineffective.

    So instead of the Named range Refers To being
    Please Login or Register  to view this content.
    , I end up with this:
    Please Login or Register  to view this content.
    where the additional quotations occur rendering the code ineffective. I have been unsuccessful in finding a way to remove the quotation marks when trying to pull the code from another sheet.

    Does anyone have any ideas or solutions?
    Last edited by dentler; 11-04-2020 at 09:45 PM.

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,996

    Re: Modifying Named Ranges in Name Manager in field 'Refers To'

    I know nothing about VBA, but looking at this, my guess is that your output needs to be either this (more likely - this is what formuale need)

    ='Sheet1'!$E$2:$E$41

    or this (less likely)

    ="'Sheet1'!$E$2:$E$41"

    Give it a go... but... do note, I know nothing about VBA....
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    Forum Contributor
    Join Date
    01-08-2017
    Location
    Salt Lake City, Ut.
    MS-Off Ver
    2019 and 365
    Posts
    135

    Re: Modifying Named Ranges in Name Manager in field 'Refers To'

    Actually, I just solved my problem, or at least I figured out how to handle it and will need more coding to handle multiple name ranges. To begin with completely ignore the code in the original post. I do not need it.

    In the Name Manager, I changed the Refers To to
    Please Login or Register  to view this content.
    Then on sheet1 in cells 254B, C, and D, I placed the following strings:
    Please Login or Register  to view this content.
    Then I created the following sub routine
    Please Login or Register  to view this content.
    So I can change the value for the named range in Name Manager on the fly with the simple code above.
    This is the main problem I was trying to resolve. Now I have more code to right, since by the time I am through, I will have approximately 156 code lines to index along with 156 INDIRECT entries in Name Manager. This should be fun!

    *** Note: In my code, I refer to sheet1 as code
    Last edited by dentler; 11-05-2020 at 02:47 AM.

+ 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. [SOLVED] Changing refers to for specific named range
    By jaryszek in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-14-2019, 10:33 AM
  2. [SOLVED] Named Range- 'refers to' defined in a cell instead of in the Name Manager
    By MycroftHolmes in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-21-2017, 10:18 AM
  3. [SOLVED] Using Name Manager named ranges against a pivot table output
    By Becks54 in forum Excel General
    Replies: 4
    Last Post: 04-20-2017, 11:23 AM
  4. Replies: 1
    Last Post: 01-24-2017, 04:10 PM
  5. Group Name Manager - Redefine the "Refers to" for many groups
    By KLT in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-06-2013, 10:00 AM
  6. Sumproduct refers to named ranges in closed workbook
    By Bob@Sun in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 08-25-2010, 11:35 AM
  7. Named Range Refers To
    By Tim in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-12-2006, 11:00 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