Hi
Below I have a code which is great to do vlookup via vba on just one sheet. However i need it to look at 3 sheets in the same workbook. Can anyone help.
Below I have a code which is great to do vlookup via vba on just one sheet. However i need it to look at 3 sheets in the same workbook. Can anyone help.
VBA Code:
Sub Vlookup()
Set myrange = Sheet1.Range("B:E")
Set MeasureReference = Range("c3")
Set Status = Range("D3")
Status.Value = Application.WorksheetFunction.Vlookup(MeasureReference, myrange, 2, False)
Set ManagingAgent = Range("e3")
ManagingAgent.Value = Application.WorksheetFunction.Vlookup(MeasureReference, myrange, 3, False)
Set MARefNo = Range("f3")
MARefNo.Value = Application.WorksheetFunction.Vlookup(MeasureReference, myrange, 4, False)
End Sub