+ Reply to Thread
Results 1 to 5 of 5

Replace a part of external source address with an internal value

  1. #1
    Registered User
    Join Date
    11-07-2022
    Location
    Stockholm, Sweden
    MS-Off Ver
    365
    Posts
    3

    Replace a part of external source address with an internal value

    Hi,

    Question: Ho do I replace an external tab name with the value from an internal cell?

    Situation: I want to get cell values from another Excel file, but want to be able to change from what tab the values come from. In my case the tabs is named by the year: 2020, 2021, 2022, 2023 etc.

    The link now is:

    Please Login or Register  to view this content.
    I would like to replace "2022" with a the value (2022) from a cell (A1) from the same (internal) sheet. Something like:

    Please Login or Register  to view this content.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    79,330

    Re: Replace a part of external source address with an internal value

    Welcome to the forum.

    Try this:

    =INDIRECT("[database.xlsx]"&A1&"!B3")
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    11-07-2022
    Location
    Stockholm, Sweden
    MS-Off Ver
    365
    Posts
    3

    Re: Replace a part of external source address with an internal value

    Thank you!
    Quick and spot on!
    [SOLVED]

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    79,330

    Re: Replace a part of external source address with an internal value

    Glad to have helped.

    If that takes care of your original question, please choose Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, if you have not already done so, you may not be aware that you can thank those who have helped you by clicking the small star icon (* Add Reputation) located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of all those who offered help.

  5. #5
    Registered User
    Join Date
    11-07-2022
    Location
    Stockholm, Sweden
    MS-Off Ver
    365
    Posts
    3

    Re: Replace a part of external source address with an internal value

    Unfortunately it only worked localy with both files open. It did not work with sharepoint-addresses ('h t t p s : / / domain . sharepoint . com /path/[database.xls]2022'!B3). I can not find a solution of replacing the tab name 2022 with a value.

    But it's a great solution for certain circumstances.

    PS
    Sorry! I am not yet alowed to write a correct URL in my messages :D

+ 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] Sumproduct to replace countifs as countifs don't work on external source reference
    By KrishnaSagar in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-02-2017, 02:33 AM
  2. Replies: 1
    Last Post: 04-17-2015, 09:06 AM
  3. Pivot Table Data Source - External to Internal
    By littlemy in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 05-13-2014, 09:03 AM
  4. Replies: 2
    Last Post: 02-22-2010, 08:21 AM
  5. external references that should be internal
    By marnie in forum Excel General
    Replies: 11
    Last Post: 03-05-2007, 09:56 AM
  6. [SOLVED] Convert external links to internal
    By Marie J-son in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-26-2006, 11:55 PM
  7. Replies: 0
    Last Post: 07-20-2005, 08:05 AM

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