When i try below code it gives me error. "Unable to get the Vlookup property of the worksheetFunction class".
However when i copy paste vlookup formula used in VBA code in excell manually & change Cell(Z,2) value with B2 , then i gives right output. However when i keep Cell(2,2), it gives me error (N#A).
Sub ThreshXhigh()
Dim z As Integer
z = 2
While Cells(z, 2).Value <> ""
Cells(z, 19) = Application.WorksheetFunction.VLookup(Cells(z, 2), Master1, 19, False)
z = z + 1
Wend
End Sub
However when i copy paste vlookup formula used in VBA code in excell manually & change Cell(Z,2) value with B2 , then i gives right output. However when i keep Cell(2,2), it gives me error (N#A).
Sub ThreshXhigh()
Dim z As Integer
z = 2
While Cells(z, 2).Value <> ""
Cells(z, 19) = Application.WorksheetFunction.VLookup(Cells(z, 2), Master1, 19, False)
z = z + 1
Wend
End Sub