+ Reply to Thread
Results 1 to 3 of 3

Vlookup, External File Name to a Referenced Cell

  1. #1
    Registered User
    Join Date
    05-09-2011
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    38

    Vlookup, External File Name to a Referenced Cell

    I haven't been able to figure this one out in any of the previous threads so hopefully there's someone who can help me...

    I'm working with multiple workbooks, about 50 of them, which are all the same layout and store employee data. Only the data inside is each workbook varies.

    I would like to create a "Summary" workbook that pulls data from all 50 workbooks. However, I would like to use a combination of the vlookup formula as well as the different .xls file names. I already built a macro that pulls the .xls file names for me easily.

    If I build a vlookup formula that pulls data from each workbook, what I find is that the only referenced file names varies (.xls). The rest of the formula is identical to the next. So to save time, is there a way to make the file name a referenced cell? I haven't been able to figure this one out. I tried using the INDIRECT formula, but that seems to only work if I want to reference the table array name (i.e. named range) and not necessarily the varying file names.

    Example:

    My File Names, My External Workbooks: JohnDoe.xls, JaneDoe.xls, JimDoe.xls, etc

    Possible Formula in my New "Summary" Workbook:
    =vlookup(AgentName,'C:\Documents and Settings\office\Desktop\JohnDoe.xls'!EmployeeData,2,False)

    Since I already have a list of the file names...and I already have the vlookup formula working... how can I incorporate the two so that the file name points to a reference cell within my summary workbook? Thanks!
    Last edited by gjohn282; 05-16-2011 at 06:48 PM.

  2. #2
    Registered User
    Join Date
    05-09-2011
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    38

    Re: Vlookup, External File Name to a Referenced Cell

    Is there anyone that can help?

  3. #3
    Valued Forum Contributor ron2k_1's Avatar
    Join Date
    09-30-2009
    Location
    Not the USA
    MS-Off Ver
    Excel 2003, 2007
    Posts
    606

    Re: Vlookup, External File Name to a Referenced Cell

    You can use INDIRECT to do that as well, the only downside is that it will not update unless the source workbook is open.

    You can use PULL user-defined function.

    Harlan does a pretty good job explaining how it is used here.
    Ron
    Knowledge is knowing that a tomato and pepper are fruits. Wisdom is knowing whether to put these in a fruit salad

    Kindly

    [1] Use code tags. Place "[code]" before the first line of code and "[/code"]" after the last line of code. Exclude quotation marks
    [2] Mark your post [SOLVED] if it has been answered satisfactorily by editing your original post in advanced mode.
    [3] Thank (using the little scale) those that provided useful help; its nice and its very well appreciated

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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