Use "VLookup" function

T

Tom Ogilvy

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?
 
Top