Hello ,
I have the following VBA code that includes VLOOKUP.
I am trying to include error trapping in the code so that when Vlookup returns #N/A write the code writes "Missing" in those cells.
But i am getting Sub/Function not defined for VLOOKUP when I run the code.
Can't figure out what is wrong in the code.
I have the following VBA code that includes VLOOKUP.
I am trying to include error trapping in the code so that when Vlookup returns #N/A write the code writes "Missing" in those cells.
VBA Code:
lastRow = Worksheets("LTE_Best Server by RSRP").Cells.SpecialCells(xlCellTypeLastCell).Row
With Worksheets("LTE_Best Server by RSRP")
For r1 = 2 To lastRow
.Range("G" & r1) = Application.WorksheetFunction.IfNa(VLookup(CStr(.Range("F", r1)), Worksheets("ALL 4G Hierarchy").Range("E2:J125000"), 5, False), "Missing")
Next
End With
But i am getting Sub/Function not defined for VLOOKUP when I run the code.
Can't figure out what is wrong in the code.