+ Reply to Thread
Results 1 to 5 of 5

Pull defined name from text field

  1. #1
    Registered User
    Join Date
    06-19-2013
    Location
    Seattle, USA
    MS-Off Ver
    Excel 2007
    Posts
    3

    Pull defined name from text field

    I have a workbook where I need to create many (30+) tabs all of which are identical except for one thing. Each tab has about 100 functions each of which pull from a set of defined names. The names used on each tab will be different. Rather than updating all of my formulas on all of my tabs I would like to be able to simply write in the defined name into a cell and have all of the functions look at this cell and recognize the contents of the cell as a defined name and use it accordingly. That way I can simply update a few cells on each tab for the defined names and be good to go.

    as an example:

    =VLOOKUP(I3,WBH,2,TRUE)

    WBH is a defined name, and appears several times on the same tab. However, when I copy this tab to make the next one, I need to update all instances of WBH to WBM. I would like to replace WBH in this function with a reference to a cell where I write in WBH, and have excel recognize that I mean the defined name, and not simply text (I suppose I could do a find and replace, but that is more work, and also runs the risk of my failing to update one of the terms on one of the many tabs I have to do).

    Is there a way to do this? If not, does anyone have suggestions for workarounds or better ways to approach this problem?

  2. #2
    Forum Expert WideBoyDixon's Avatar
    Join Date
    10-03-2016
    Location
    Sheffield, UK
    MS-Off Ver
    365
    Posts
    2,182

    Re: Pull defined name from text field

    Well, you *could* use INDIRECT and that would work but it might run very slowly. E.g.

    Please Login or Register  to view this content.
    Then you could put "WBH" or "WBM" in Z1 and it should work.

    WBD
    Office 365 on Windows 11, looking for rep!

  3. #3
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,747

    Re: Pull defined name from text field

    Quote Originally Posted by random360 View Post
    The names used on each tab will be different.
    Why do all the names have to be different? Why not use the same names on each tab, and set the scope to Worksheet instead of Workbook?
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  4. #4
    Registered User
    Join Date
    06-19-2013
    Location
    Seattle, USA
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Pull defined name from text field

    Quote Originally Posted by WideBoyDixon View Post
    Well, you *could* use INDIRECT and that would work but it might run very slowly. E.g.

    Please Login or Register  to view this content.
    Then you could put "WBH" or "WBM" in Z1 and it should work.

    WBD
    That's done it. Thanks!
    Last edited by random360; 04-14-2022 at 10:04 AM.

  5. #5
    Registered User
    Join Date
    06-19-2013
    Location
    Seattle, USA
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Pull defined name from text field

    Quote Originally Posted by 6StringJazzer View Post
    Why do all the names have to be different? Why not use the same names on each tab, and set the scope to Worksheet instead of Workbook?
    Because the input data is all on the same tab. There are 50+ sets of input data, all defined once there, and the output tabs reference portions of it.

+ 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: 2
    Last Post: 12-28-2021, 02:06 PM
  2. [SOLVED] Match Pre-defined Numbers and Enter Pre-defined Text
    By pratnimk in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-28-2017, 04:41 AM
  3. Pull specific text from a field
    By alittlegirllikeme in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 10-26-2016, 09:27 AM
  4. VB to pull cells from browser defined worksheet
    By tbrozovich in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-28-2015, 01:26 PM
  5. [SOLVED] How to change find formula from single text field to more than one text field
    By cmwilbur in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-11-2015, 04:13 PM
  6. [SOLVED] Macro to add defined text to the end of multiple defined columns of data
    By spikedog in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-28-2012, 05:10 AM
  7. [SOLVED] Error in Vb Code -Form-Selecting ComboBox Value to Pull Related Row Value into Text Field
    By Southfish in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-08-2012, 10:01 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