Use "VLookup" function

  • Thread starter Thread starter Grey
  • Start date Start date
dim target as Range
Dim lookRange as Range
Dim res as Variant

Set target = Range("A1")
Set lookRange = worksheets("Sheet2").Range("A1:F300")

res = Application.Vlookup(Target,lookRange,2,False)
if iserror(res) then
' not found
else
msgbox "Result is " & res
End if


--
Regards,
Tom Ogilvy


i want to know that how to use "VLookup" function in VBA?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top