+ Reply to Thread
Results 1 to 6 of 6

Vlookup From Closed Workbook with variable filename

  1. #1
    Registered User
    Join Date
    08-21-2012
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    5

    Vlookup From Closed Workbook with variable filename

    Hi There,

    I have a number of Workbooks that contain research i have conducted on various stocks.

    All of these Workbooks have a title page that contains summary information that i deem important, with all the different workbooks having the exact same title page.

    I would like to build a master document that allows me to enter the 3 digit stock code and then get the front page from this stock. I think it is best to use an example:

    In my master document i would like to have:

    A1: Stock Code
    A2: File Destination (this would be static as all the different files are within the same folder)
    A3: The file name (This would need to be dynamic based on the value in A1) eg "CDD History.xlsx"

    A4 and below to display the front page information from the "CDD History.xlsx" Workbook

    The reason i would like this to be dynamic is so i can easily enter in various stock codes and get the different summary information quickly and easily.

    I am happy to upload both the "CDD History" and how i would like the master document to work if that helps?

    I have so far tried to use the "=Pull" Formula from Harlan Grove and have also tried using the INDIRECT formula but none of these are working.

    ANy help would be greatly appreciated.

    Kind Regards,
    Will

  2. #2
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Vlookup From Closed Workbook with variable filename

    Using the built-in INDIRECT function would require that the referenced file be open. This is usually not desirable especially if you have to refer to many files.

    Your profile says you're using Excel 2003. Is that correct? If so, there is an add-in called Morefunc.xll that will work in Excel 2007 and earlier that has a function called INDIRECT.EXT that works much like the built-in INDIRECT function except that it will work on closed files.

    Morefunc.xll can be downloaded from here:

    http://excelenthusiasts.sharepoint.c...s/Morefunc.zip
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  3. #3
    Registered User
    Join Date
    08-21-2012
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Vlookup From Closed Workbook with variable filename

    Sorry i am actually using MS excel 2010. Will this still work?

  4. #4
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Vlookup From Closed Workbook with variable filename

    If it's 64bit Excel 2010 it will not work.

    I'm not sure if it'll work in 32bit Excel 2010.

    I have used the add-in in Excel 2007 and 2002 (both 32 bit).

  5. #5
    Registered User
    Join Date
    08-21-2012
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Vlookup From Closed Workbook with variable filename

    It is 32bit Excel 2010.

    I have downloaded and installed this file however i'm not really sure how it works?

    Are there any other suggestions using VBA or something?

  6. #6
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Vlookup From Closed Workbook with variable filename

    In Excel 2007 I would do this...

    Click the Insert function icon

    From the Category drop down list scroll to the bottom and there should be an item called Morefunc.

    Open that item and look for the INDIRECT.EXT function.

    Use that function and build your formula the same way you would if you were using the built-in INDIRECT function.

    The formula has to be constructed properly or it won't work (you will get some kind of error value).

+ 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. Variable filename in vlookup
    By Lizzietish11 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-19-2016, 08:30 AM
  2. Vlookup in a database with variable filename?
    By Alexhoc in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-09-2013, 09:27 AM
  3. Replies: 3
    Last Post: 07-09-2012, 03:09 PM
  4. Get value from closed workbook based on filename?
    By Novo in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-07-2011, 12:58 PM
  5. How to pass variable between closed workbook
    By hon123456 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-13-2006, 05:25 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