I am trying to do a vlookup in VBA and I am getting an #VALUE error. I am trying to match values in column A of a sheet called data with the values from column B on a sheet called Default Pt List. On a match I want the value to go in Column H of the sheet called data. Any help is appreciated.
Tom
Tom
Code:
On Error Resume Next
For i = 2 To lLastRow
Worksheets("Data").Cells(i, "H") = Application.WorksheetFunction.VLookup(Worksheets("Default Pt List").Range("A2:A" & lLastRow), Worksheets("Data").Range("B2:B" & lLastRow), "B")
Next i
Last edited: