View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 6,953
Default How to obtain cell address of a succesful VLookup?

Dim res as Variant, rng as Range
res = Application.Match(Range("J68").Value, _
Worksheets("1000").Range("J139:J150"),0)
if not iserror(res) then
set rng = Worksheets("1000").Range("J139:J150")(res)
else
set rng = Nothing
end if

--
Regards,
Tom Ogilvy


=VLOOKUP(J68,'1000'!$J$139:$J$150,1,FALSE)


" wrote:

2003/2007

If the following is successful:

=VLOOKUP(J68,'1000'!$J$139:$J$150,1,FALSE)

How can I easily ID the found cell reference to use in subsequent VBA?

TIA EagleOne