Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
VLOOKUP returns #N/A and causes VBA routine to halt
I'm an absolute newcomer to Excel 2007 VBA (Started on my first
project 24 hours ago). I'm trying to parse some data I have downloaded. I use VLOOKUP to search for specific strings. It works fine if the string is present, but if the string is not present then VLOOKUP returns #N/A which seems to cause the execution of my routine to be halted. I have to tried to wrap IsNA() around VLOOKUP, but my routine is still halted. I have also tried to add "On Error Resume Next" but that seems to cause the following check (IsNA) to fail (i.e. #N/A is not detected). I assume the #N/A value gets wiped out by the "On Error Resume Next Statement". How do I get Execl to continue executing when #N/A is returned, but at the same branch out if #N/A was returned? Here is what I want to do: I want to search my downloaded data for a specific string. If the string is present then I want to grap the associated data (and store them somewhere). If the string is not present then I want to go and search for the next string and the whole thing repeats itself until I get thru all my patterns. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
No RETURN() or HALT() function found on macro sheet | Excel Discussion (Misc queries) | |||
Vlookup returns a zero? | Excel Discussion (Misc queries) | |||
VLookup returns #VALUE! | Excel Worksheet Functions | |||
vlookup returns 0.00 | Links and Linking in Excel | |||
vlookup returns n/a | Excel Worksheet Functions |