+ Reply to Thread
Results 1 to 2 of 2

How to replace workbook tab name in a formula with a cell reference

  1. #1
    Registered User
    Join Date
    11-12-2019
    Location
    seattle, WA
    MS-Off Ver
    20
    Posts
    1

    Angry How to replace workbook tab name in a formula with a cell reference

    Hi,

    I bet there are some answers lingering out there but I honestly havn't been able to locate the answer. So my problem is I have two workbooks. Workbook 1 has over 50 different tabs that are named as US states. Each tab within that workbook are structrued the same. Workbook 2 is an raw output from some software I have, but lists the state name in one of the columns. What I essentially want to do is have a way that automatically updates the tab name in a several different formulas, so I can drag and drop the formula instead of having to change the formulaeach time a new state starts. So basically I want to edit the state part automatically based on values in an adjacent column: =INDEX[Workbook 1.xlsx]State'!$C:$C,MATCH(blah blah)). I've tried inserting a direct reference in place of "State" such as D31, but it didn't work. I don't know if this is at all possible or requires VBA skills. Let me know your thoughts

  2. #2
    Forum Expert
    Join Date
    09-30-2019
    Location
    Chiangmai, Thailand
    MS-Off Ver
    Office 2016, Excel 2019
    Posts
    1,234

    Re: How to replace workbook tab name in a formula with a cell reference

    If you can merged them together, you can use INDIRECT to reference cross sheet (not cross workbook).
    Because INDIRECT only work when in the same workbook or both workbook are opened.

    The formula will be like...

    =INDEX( INDIRECT("'"&D3&"'!C:C") , Match( .... ) )

    Regards.

+ 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. Macro: Search and replace: Replace using a cell reference
    By kalyan46 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-11-2019, 07:11 PM
  2. [SOLVED] Replace a cell reference in a formula with dynamic reference
    By jkj115 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-25-2016, 11:04 AM
  3. formula with cell to reference other workbook
    By 13lack13lade in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-19-2014, 09:51 PM
  4. How to use a cell value as part of a workbook reference, in a formula?
    By kimaalfr in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-06-2013, 05:05 AM
  5. check formula integrity: replace dynamic cell reference with fixed value?
    By orchidee in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-07-2013, 06:18 PM
  6. [SOLVED] Replace absolute cell reference with Indirect cell reference in formula
    By Roothy in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-11-2013, 04:46 AM
  7. Replace name in formula with cell reference
    By narrowgate88 in forum Excel General
    Replies: 10
    Last Post: 09-15-2009, 12:10 PM

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