+ Reply to Thread
Results 1 to 2 of 2

Automatize File Path Vlookups

  1. #1
    Registered User
    Join Date
    05-24-2018
    Location
    NY
    MS-Off Ver
    2010
    Posts
    1

    Automatize File Path Vlookups

    Hi!
    My vlookups currently pull from 15 different files and I would like for them to know automatically what file to pull from, instead of having to build 15+ different vlookups (one for each file).

    The only variance between all my vlookup paths is the file name. See below a few examples:
    =VLOOKUP($A54,'H : path\[LD.xlsx]MASTER'!$B:$U,5,FALSE)
    =VLOOKUP($A64,'H : path\[UT.xlsx]MASTER'!$B:$U,5,FALSE)
    =VLOOKUP($A74,'H : path\[FN.xlsx]MASTER'!$B:$U,5,FALSE)

    These two letter abbreviations (LD, UT, FN) are already in cells B54, B65 and B74.

    So originally, I was thinking to use something like this so that I could easily drag the formula down:
    =VLOOKUP($A54,'"H : path\["&B54&".xlsx]MASTER"'!$B:$U,5,FALSE)

    However, this does not work. I was able to do this with an INDIRECT formula, however this only works when all my work books are open, which is not an option for me (too many files). See formula below:
    =VLOOKUP($A54,INDIRECT(B54),5,FALSE)

    Does anybody have an idea of how to go around this? Thanks!!

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: Automatize File Path Vlookups

    2 suggestions come to mine...
    1. install the Morefunc add-in which lets you use INDIRECT on closed workbooks
    http://www.ashishmathur.com/tag/morefunc/

    2. Use VBA
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

+ 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. copy file from path to path
    By rudyHanna in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-26-2017, 09:15 AM
  2. [SOLVED] Separate complete path to file and directory path
    By drgkt in forum Excel General
    Replies: 19
    Last Post: 10-28-2016, 04:17 PM
  3. Choosing folder path (instead of file path) in VBA
    By sminter in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-23-2014, 08:50 PM
  4. Replies: 0
    Last Post: 01-27-2013, 12:13 PM
  5. Specified folder path to select file path
    By JayEmTee91 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-29-2012, 10:38 AM
  6. Replies: 7
    Last Post: 10-09-2009, 10:10 AM
  7. Use String Variables in File Path and create path if not existing
    By JanBang in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-26-2007, 09:04 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