View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
orquidea orquidea is offline
external usenet poster
 
Posts: 132
Default macro vlookup between 2 files

Hi

I am using a Vloockup statement to get the information from 1 file to
another file. I have the string below, but it generates the error '1004':
Application-defined or object-defined error. I know the error is when I
added the file name [Transit Times.xls] because when I had the data for the
vloockup on sheet 1 in the same file were I was running the macro, it worked.
Could anyone help me please. FYI. In the macro I have the file Transit
Times open.

ActiveCell.Value = "=VLOOKUP(" & ActiveCell.Offset(0, -10).Address(False,
False) & "'[Transit Times.xls]Sheet1'!A:B,2,FALSE)"

Thanks,