Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Error 1004 in WorksheetFunction.VLookup
What could POSSIBLY be causing the error 1004 on this code:
Dim LookLU2 as Range Dim Stats as Variant Set LookLU2 = Workbooks("PRProc.xls").Names("StatsAcc").RefersTo Range Stats = Application.WorksheetFunction.VLookup("112001", LookLU2, 2, False) The file is open, the lookup works when I do it manually. I don't get it. Any ideas? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Error 1004 in WorksheetFunction.VLookup
what is the error message?
On Oct 4, 9:48 am, Mike H. wrote: What could POSSIBLY be causing the error 1004 on this code: Dim LookLU2 as Range Dim Stats as Variant Set LookLU2 = Workbooks("PRProc.xls").Names("StatsAcc").RefersTo Range Stats = Application.WorksheetFunction.VLookup("112001", LookLU2, 2, False) The file is open, the lookup works when I do it manually. I don't get it. Any ideas? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Error 1004 in WorksheetFunction.VLookup
Runtime error 1004.
Unable to get the vlookup property from the worksheetfunction class! "dan dungan" wrote: what is the error message? On Oct 4, 9:48 am, Mike H. wrote: What could POSSIBLY be causing the error 1004 on this code: Dim LookLU2 as Range Dim Stats as Variant Set LookLU2 = Workbooks("PRProc.xls").Names("StatsAcc").RefersTo Range Stats = Application.WorksheetFunction.VLookup("112001", LookLU2, 2, False) The file is open, the lookup works when I do it manually. I don't get it. Any ideas? |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Error 1004 in WorksheetFunction.VLookup
Try
Stats = Application.WorksheetFunction.VLookup(112001, LookLU2, 2, False) -- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "Mike H." wrote in message ... Runtime error 1004. Unable to get the vlookup property from the worksheetfunction class! "dan dungan" wrote: what is the error message? On Oct 4, 9:48 am, Mike H. wrote: What could POSSIBLY be causing the error 1004 on this code: Dim LookLU2 as Range Dim Stats as Variant Set LookLU2 = Workbooks("PRProc.xls").Names("StatsAcc").RefersTo Range Stats = Application.WorksheetFunction.VLookup("112001", LookLU2, 2, False) The file is open, the lookup works when I do it manually. I don't get it. Any ideas? |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Error 1004 in WorksheetFunction.VLookup
I should have known! I have only used this
application.worksheetfunction.vlookup one other time and kept thinking it was something with my naming the range or something. But it is just the fact that the data in one place is a number and in the other is text. I should have figured that out. Thanks for being there for me. I just spent the last 1.5 hours trying to figure what was wrong withe code. When all along, I just had a loose nut on the keyboard! "Bob Phillips" wrote: Try Stats = Application.WorksheetFunction.VLookup(112001, LookLU2, 2, False) -- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "Mike H." wrote in message ... Runtime error 1004. Unable to get the vlookup property from the worksheetfunction class! "dan dungan" wrote: what is the error message? On Oct 4, 9:48 am, Mike H. wrote: What could POSSIBLY be causing the error 1004 on this code: Dim LookLU2 as Range Dim Stats as Variant Set LookLU2 = Workbooks("PRProc.xls").Names("StatsAcc").RefersTo Range Stats = Application.WorksheetFunction.VLookup("112001", LookLU2, 2, False) The file is open, the lookup works when I do it manually. I don't get it. Any ideas? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
worksheetfunction.vlookup error | Excel Programming | |||
Worksheetfunction.vlookup and #value error | Excel Worksheet Functions | |||
Error '1004' in WorksheetFunction | Excel Programming | |||
Error '1004' in WorksheetFunction | Excel Programming | |||
Error '1004' in WorksheetFunction | Excel Programming |