Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Vlookup in VB not returning anything error
Hi, I am trying to get the following working:
If Application.WorksheetFunction.IsNA(Application. _ WorksheetFunction.VLookup(lookUpValue, myRange, 1, False)) = False Then I have tested it where it should not be able to find anything from the vlookup and it causes an error of 1004 unable to get the vlookup property of the worksheet class. How would I go about getting this to work? Thanks, Grant. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Vlookup in VB not returning anything error
dim res as Variant
res = VLookup(lookUpValue,myRange, 1, False) if not iserror(res) then ' don't use Worksheetfunction -- Regards, Tom Ogilvy "Grant" wrote in message ... Hi, I am trying to get the following working: If Application.WorksheetFunction.IsNA(Application. _ WorksheetFunction.VLookup(lookUpValue, myRange, 1, False)) = False Then I have tested it where it should not be able to find anything from the vlookup and it causes an error of 1004 unable to get the vlookup property of the worksheet class. How would I go about getting this to work? Thanks, Grant. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Vlookup in VB not returning anything error
Returns sub or function not defined error.
-----Original Message----- dim res as Variant res = VLookup(lookUpValue,myRange, 1, False) if not iserror(res) then ' don't use Worksheetfunction -- Regards, Tom Ogilvy "Grant" wrote in message ... Hi, I am trying to get the following working: If Application.WorksheetFunction.IsNA(Application. _ WorksheetFunction.VLookup(lookUpValue, myRange, 1, False)) = False Then I have tested it where it should not be able to find anything from the vlookup and it causes an error of 1004 unable to get the vlookup property of the worksheet class. How would I go about getting this to work? Thanks, Grant. . |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Vlookup in VB not returning anything error
Hi Grant,
I think there was a typo and Tom intended: res = Application.VLookup(lookUpValue,myRange, 1, False) --- Regards, Norman "Grant" wrote in message ... Returns sub or function not defined error. -----Original Message----- dim res as Variant res = VLookup(lookUpValue,myRange, 1, False) if not iserror(res) then ' don't use Worksheetfunction -- Regards, Tom Ogilvy "Grant" wrote in message ... Hi, I am trying to get the following working: If Application.WorksheetFunction.IsNA(Application. _ WorksheetFunction.VLookup(lookUpValue, myRange, 1, False)) = False Then I have tested it where it should not be able to find anything from the vlookup and it causes an error of 1004 unable to get the vlookup property of the worksheet class. How would I go about getting this to work? Thanks, Grant. . |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Vlookup in VB not returning anything error
That is correct. Thanks for the correction.
-- Regards, Tom Ogilvy "Norman Jones" wrote in message ... Hi Grant, I think there was a typo and Tom intended: res = Application.VLookup(lookUpValue,myRange, 1, False) --- Regards, Norman "Grant" wrote in message ... Returns sub or function not defined error. -----Original Message----- dim res as Variant res = VLookup(lookUpValue,myRange, 1, False) if not iserror(res) then ' don't use Worksheetfunction -- Regards, Tom Ogilvy "Grant" wrote in message ... Hi, I am trying to get the following working: If Application.WorksheetFunction.IsNA(Application. _ WorksheetFunction.VLookup(lookUpValue, myRange, 1, False)) = False Then I have tested it where it should not be able to find anything from the vlookup and it causes an error of 1004 unable to get the vlookup property of the worksheet class. How would I go about getting this to work? Thanks, Grant. . |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Vlookup in VB not returning anything error
my typo - editing your code, I deleted application as well and forgot to
add it back. res = Application.vlookup(lookUpValue, myRange, 1, False) -- Regards, Tom Ogilvy "Grant" wrote in message ... Returns sub or function not defined error. -----Original Message----- dim res as Variant res = VLookup(lookUpValue,myRange, 1, False) if not iserror(res) then ' don't use Worksheetfunction -- Regards, Tom Ogilvy "Grant" wrote in message ... Hi, I am trying to get the following working: If Application.WorksheetFunction.IsNA(Application. _ WorksheetFunction.VLookup(lookUpValue, myRange, 1, False)) = False Then I have tested it where it should not be able to find anything from the vlookup and it causes an error of 1004 unable to get the vlookup property of the worksheet class. How would I go about getting this to work? Thanks, Grant. . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Formula returning an error | Excel Worksheet Functions | |||
VLOOKUP returning a #VALUE! error and I've not idea why! HELP!!! | Excel Worksheet Functions | |||
Vlookup Function returning #N/A error for two entries | Excel Discussion (Misc queries) | |||
Formula returning #N/A Error---why??? | Excel Worksheet Functions | |||
Returning Error from Functions | Excel Programming |