i'm trying to do vlookup but shows error
Sub lookup_trying()
Dim sx As String
Cells.Find(what:="associate name").Offset(1, 0).Select
Cells(ActiveCell.Row, Columns.Count).End(xlToLeft).Offset(0, 1).Select
'first two codes are prefect but sx is not working
'sx is get the value of b2 cell
sx = Range(ActiveCell, Cells(ActiveCell.Row, 1)).ActiveCell.Offset(0, 1).Value
Do While sx <> ""
ActiveCell.Value = WorksheetFunction.VLookup(x, Sheets("sheet2").Range("a1:j15"), 10, False)
ActiveCell.Offset(1, 0).Select
Loop
End Sub
please help me.... Thanks
Sub lookup_trying()
Dim sx As String
Cells.Find(what:="associate name").Offset(1, 0).Select
Cells(ActiveCell.Row, Columns.Count).End(xlToLeft).Offset(0, 1).Select
'first two codes are prefect but sx is not working
'sx is get the value of b2 cell
sx = Range(ActiveCell, Cells(ActiveCell.Row, 1)).ActiveCell.Offset(0, 1).Value
Do While sx <> ""
ActiveCell.Value = WorksheetFunction.VLookup(x, Sheets("sheet2").Range("a1:j15"), 10, False)
ActiveCell.Offset(1, 0).Select
Loop
End Sub
please help me.... Thanks