Or
Try like this...
Sub Vlookup_func()
Dim rMyRng As Range, rLkpCell As Range, rRes As Range, iCl As Integer, blType As Boolean
Set rLkpCell = Application.InputBox("Select The Lookup Cell", "Lookup Cell Req", , , , , , 8)
Set rMyRng = Application.InputBox("Select The Vlookup Range", "Vlookup Range Req", , , , , , 8)
iCl = InputBox("Enter the Output Column No", "Result Column # Req")
blType = InputBox("Enter Match Type", "True/False Req", False)
Set rRes = Application.InputBox("Select Result Range", "Result Range Req", , , , , , 8)
rRes.Formula = "=VLookup(" & rLkpCell.Address(0, 0) & "," & rMyRng.Address & _
"," & iCl & "," & blType & ")"
End Sub
Bookmarks