Thread: Excel VBA
View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default Excel VBA

Here is an example way

On Error Resume Next
ans = Application.VLookup("Val", Range("A1:H10"), 2, False)
On Error GoTo 0
If IsError(ans) Then
MsgBox "error"
End If


--

HTH

RP
(remove nothere from the email address if mailing direct)


"hobbyist" wrote in message
...
How can I avoid error in VBA procedure trying to use Excel function

VLOOKUP
if lookup value is missing?