I was helping a friend to get a vlookup done through vba. In my entire code, i have this code line for vlookup -
with Worksheets(1)
.Cells(j, i).Value = Application.WorksheetFunction.VLookup(Range("A" & j), Worksheets("Sheet2").Columns("A:S"), i - 3, False)
end with
However, if the value is not available, i get an error - Unable to get the vlookup property of the worksheetfunction class (runtime error 1004).
I tried using
.cells(j,i).formulaR1C1="=iferror(vlookup(.range("A" & j), Sheet2!C1:C19, i-3,false),"""")"
But its not working.
Please assist.
Bookmarks