Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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, |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
It looks like you're missing a comma between the lookup value and the table:
ActiveCell.Value = "=VLOOKUP(" & ActiveCell.Offset(0, -10).Address(False,False) & ",'[Transit Times.xls]Sheet1'!A:B,2,FALSE)" "orquidea" wrote: 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, |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Thanks it worked.
"bpeltzer" wrote: It looks like you're missing a comma between the lookup value and the table: ActiveCell.Value = "=VLOOKUP(" & ActiveCell.Offset(0, -10).Address(False,False) & ",'[Transit Times.xls]Sheet1'!A:B,2,FALSE)" "orquidea" wrote: 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, |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
First, I'd use .formula instead of .value.
Second, it looks like you're missing a comma after the first parm. ActiveCell.Formula _ = "=VLOOKUP(" & ActiveCell.Offset(0, -10).Address(False, False) _ & ",'[Transit Times.xls]Sheet1'!A:B,2,FALSE)" (added a comma before the first apostrophe) orquidea wrote: 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, -- Dave Peterson |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Thanks it worked.
"Dave Peterson" wrote: First, I'd use .formula instead of .value. Second, it looks like you're missing a comma after the first parm. ActiveCell.Formula _ = "=VLOOKUP(" & ActiveCell.Offset(0, -10).Address(False, False) _ & ",'[Transit Times.xls]Sheet1'!A:B,2,FALSE)" (added a comma before the first apostrophe) orquidea wrote: 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, -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
VLOOKUP linking to different files | Excel Worksheet Functions | |||
Reference different files using vlookup | Excel Worksheet Functions | |||
Need to reference different files using vlookup | Excel Worksheet Functions | |||
Using VLOOKUP across multiple files | Excel Worksheet Functions | |||
vlookup to other files | Excel Worksheet Functions |