Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Programming around vlookup errors in vba
I have a program that uses vlookup to find values that are stored in a quote
that is made in excel. Some of the older quotes do no contain all of the fields (Lookup_Values) that are in the newer quotes. When this occurs, the excel macro stops and highlights the vlookup function that I am using. Is there a way to use? if(iserror(vlookup))then... or any other functions to work around this problem? If the field does not exist, I would like it to return "" to the active cell. The program works fine when all of the fields (Lookup_values) are on the quote. Code: Dim ArmatureRange As Range Set ArmatureRange = Worksheets("Sheet1").Range("H:J") Armature = (Application.WorksheetFunction.Vlookup("Arm:", ArmatureRange, 3, False)) ActiveCell.Formula = Armature |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
VLOOKUP AND N/A ERRORS | Excel Discussion (Misc queries) | |||
Vlookup errors | Excel Programming | |||
VLookup Errors | Excel Worksheet Functions | |||
errors using Vlookup | Excel Worksheet Functions | |||
Need Help with Programming-Syntax/Compile Errors | Excel Programming |