+ Reply to Thread
Results 1 to 5 of 5

vlookup with variable workbook and sheet

  1. #1
    Registered User
    Join Date
    08-09-2009
    Location
    Athens
    MS-Off Ver
    Excel 2003
    Posts
    3

    vlookup with variable workbook and sheet

    Hello

    I have use the command vlookup
    =VLOOKUP(A10;'C:\seaa\[2009-07-pcnew.xls]PC_mo_YTD'!$A$2:$N$100;9;FALSE) and it works fine but I like to replace the file name ('C:\seaa\[2009-07-pcnew.xls]PC_mo_YTD') and the range ($A$2:$N$100) with variables

    Thanks in advance

    Nikos
    Last edited by nzeg; 08-09-2009 at 12:21 PM.

  2. #2
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326

    Re: vlookup with variable workbook and sheet

    Hi and welcome to the board
    Maybe you need to have a look at the INDIRECT function

  3. #3
    Registered User
    Join Date
    08-09-2009
    Location
    Athens
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: vlookup with variable workbook and sheet

    Thank you for your quick reply.

    I had use INDIRECT but no chance maybe the syntax is wrong

    The attached file is a sample
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326

    Re: vlookup with variable workbook and sheet

    Hi, I added a workbook with an example.
    Keep in mind that referencing another workbook with vlookup implies that workbook is open.
    Otherwise you will need a VBA solution.

  5. #5
    Registered User
    Join Date
    08-09-2009
    Location
    Athens
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: vlookup with variable workbook and sheet

    Thank you again

    But vlookup it work even the searched workbook is not opened

    Nikos

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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