Using the vlookup, how can I code in VBA code?
CostCenter = Application.VLookup(Range("RangeName").Value, _
Worksheets("sheet2").Range("Rlookup"), 2, False)
If Not IsError(CostCenter) Then
cell.Offset(0, 1).Value = CostCenter
End If
wage = Application.VLookup(Range("RangeName").Value, _
Worksheets("Sheet2").Range("Rlookup"), 3, False)
If Not IsError(wage) Then
cell.Offset(0, 1).Value = wage
End If
Above VBA code I had define the range for "RangeNAme","Rlookup"... Any mistake in the code? I can't execute it... It gave me error message! Any help is very appreciated..