+ Reply to Thread
Results 1 to 2 of 2

File name in Vlookup

  1. #1
    Forum Contributor
    Join Date
    10-03-2005
    Posts
    185

    File name in Vlookup

    I am trying to do vlookup in a macro. Is there any way I can specify a table from a sheet in a workbook that is not open for second argument of vlookup?

    For this format
    ActiveCell.FormulaR1C1 = _
    "=VLOOKUP(RC4,[current_file.xls]overall!R2C1:R1000C15,4,FALSE)"
    I have to have current_file.xls open

    It gave me errors when I tried this

    ActiveCell.FormulaR1C1 = _
    "=VLOOKUP(RC4,[E:\folder 1\folder 2\current_file.xls]overall!R2C1:R1000C15,4,FALSE)"

    What is the correct syntax to specify this file in vlookup so that I dont have to have that file open?

    Thanks,
    Jay

  2. #2
    Barb Reinhardt
    Guest

    RE: File name in Vlookup

    I've had to use INDIRECT.EXT to get data from closed workbooks. I don't
    know how it would work for your application.

    http://xcell05.free.fr/english/index.html



    "sa02000" wrote:

    >
    > I am trying to do vlookup in a macro. Is there any way I can specify a
    > table from a sheet in a workbook that is not open for second argument
    > of vlookup?
    >
    > For this format
    > ActiveCell.FormulaR1C1 = _
    >
    > "=VLOOKUP(RC4,[current_file.xls]overall!R2C1:R1000C15,4,FALSE)"
    > I have to have current_file.xls open
    >
    > It gave me errors when I tried this
    >
    > ActiveCell.FormulaR1C1 = _
    > "=VLOOKUP(RC4,[E:\folder 1\folder
    > 2\current_file.xls]overall!R2C1:R1000C15,4,FALSE)"
    >
    > What is the correct syntax to specify this file in vlookup so that I
    > dont have to have that file open?
    >
    > Thanks,
    > Jay
    >
    >
    > --
    > sa02000
    > ------------------------------------------------------------------------
    > sa02000's Profile: http://www.excelforum.com/member.php...o&userid=27747
    > View this thread: http://www.excelforum.com/showthread...hreadid=475574
    >
    >


+ 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