LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default Programming around Vlookup Errors in VBA

I have a program that uses vlookup to find values that are stored in a quote.
Some of the older quotes do no contain all of the fields €śLookup_Values€ť
that are in the newer quotes. When the program connot find a fileld
€śLookup_Value", excel stops my macro stops and highlightsts 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? I would like the vlookup
function to return "" to the active cell if the field "Lookup value" does not
exist.


Dim SerialRange As Range 'The range of the serial field, from the quote
Set SerialRange = Worksheets("Sheet1").Range("A:C")
Serial = (Application.WorksheetFunction.Vlookup("SER #:", SerialRange,
3, False))
ActiveCell.Formula = Serial



 
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 errors #n/a [email protected] Excel Worksheet Functions 10 November 9th 08 12:39 AM
VLOOKUP AND N/A ERRORS amy howell Excel Discussion (Misc queries) 6 March 31st 08 02:46 AM
Programming around vlookup errors in vba Elceller in distress Excel Programming 0 August 1st 06 08:56 PM
Vlookup errors alymcmorland[_23_] Excel Programming 5 November 14th 05 11:35 AM
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 08:54 PM.

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

About Us

"It's about Microsoft Excel"