What happens if you have two employees with the same first names? You may want to re-think your design.
Put this code into a command button or some other object. It will prompt for the Employee name, find it and then place the Supervisor name in the roster worksheet.
This code assumes that the data structure you provided will remain constant.
Sub Names()
Dim Supervisor As String
Dim Employee As String
Dim Col As Integer
Dim Rw As Integer
Worksheets("Teams").Activate
Employee = InputBox("Enter Employee Name")
Cells.Find(What:=Employee, After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate
Col = ActiveCell.Column
Supervisor = Cells(1, Col).Value
Worksheets("Roster").Activate
Cells.Find(What:=Employee, After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate
Rw = ActiveCell.Row
Cells(Rw, 1).Value = Supervisor
End Sub
Bookmarks