View Single Post
  #9   Report Post  
Posted to microsoft.public.excel.programming
Doug Glancy Doug Glancy is offline
external usenet poster
 
Posts: 770
Default How can I trap this Vlookup error in a VBA macro

Carim,

That's the way to go. Notice that it works only if you use
Application.VLookup. If you use WorksheetFunction.VLookup you will get your
original runtime error.

hth,

Doug


"Carim" wrote in message
oups.com...
Richard,

Could the following help ...
Result = Application.VLookup(x, MyRange,2,0)
if iserror(Result) then

to detect where somthing is going wrong ...

HTH
Carim