Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
VLOOKUP AND N/A ERRORS amy howell Excel Discussion (Misc queries) 6 March 31st 08 02:46 AM
Vlookup errors alymcmorland[_23_] Excel Programming 5 November 14th 05 11:35 AM
VLookup Errors Erika Excel Worksheet Functions 4 May 20th 05 01:25 AM
errors using Vlookup BLW Excel Worksheet Functions 1 May 19th 05 06:18 PM
Need Help with Programming-Syntax/Compile Errors clk[_2_] Excel Programming 6 January 17th 05 11:21 PM


All times are GMT +1. The time now is 10:38 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"