Archive of Mr Excel Message Board


Back to Forms in Excel VBA archive index
Back to archive home

Vlookup in another file

Posted by Dan on January 23, 2001 6:34 AM
Attempting to use "vlookup" to find information in one workbook and return it to another. Do not have any problem using this function within the same workbook but it appears to have a problem when I go to another workbook to draw info. The problem appears to be with the "col_index_num" function trying to find the column to use in the formula. Examples:

Within same spreadsheet -
=VLOOKUP("test",A:C,3,FALSE)

Trying to get info from another spreadsheet
=VLOOKUP("[Sample.xls]A!test",[Sample.xls]A!$A:$C,3,FALSE)

where "Sample.xls" is the other workbook and A! is the worksheet in the "Sample.xls" workbook that contains the info I am trying to retrieve.

Have also tried with no luck:
=VLOOKUP("[Sample.xls]A!test",[Sample.xls]A!$A:$C,[Sample.xls]A!3,FALSE)

Any suggestions ?


Check out our Excel Resources

Re: Vlookup in another file

Posted by Dave Hawley on January 23, 2001 7:02 AM

Hi Dan

Try using:
=VLOOKUP("test",[Sample.xls]A!$A:$C,3)


While the Sample.xls is open. Use your mouse pointer select ranges and you can't go wrong.


Hope this helps
Dave
OzGrid Business Applications


Re: Vlookup in another file

Posted by Dan on January 23, 2001 7:38 AM


This archive is from the original message board at www.MrExcel.com.
All contents © 1998-2004 MrExcel.com.
Visit our online store to buy searchable CD's with thousands of VBA and Excel answers.
Microsoft Excel is a registered trademark of the Microsoft Corporation.
MrExcel is a registered trademark of Tickling Keys, Inc.