I have a list of people I need to find within a larger list of people, however the larger list is populated based on assignments and are populated in cell h2 through m2 , the result needs to be pasted in g2 then move to next and find result in h3 to m3 paste in g3 etc. There are 20 different options in h2 through m2 and I only have 10 that I have the option for responses from. My original idea was to make an If Else and move horizontally running an instance in each cell until it found a result and moving down a row starting process over until the end. Any help would be greatly appreciated
Sub assignment()
Dim assignment As String
Dim i As Integer
Dim j As Integer
assignment = Range("h2").Value
Do Until i > 2725
Do Until j > 13
Range("H2").Offset(0, 1).Select
If aba = "Name1" Then
result = "Name1"
ElseIf aba = "Name2" Then
result = "Name2"
ElseIf aba = "Name3" Then
result = "Name3"
ElseIf aba = "Name4" Then
result = "Name4"
ElseIf aba = "Name6" Then
result = "Name6"
ElseIf aba = "Name7" Then
result = "Name7"
ElseIf aba = "Name8" Then
result = "Name8"
ElseIf aba = "Name9" Then result = "Name9"
End If
Range("G2").Value = result
Range("H2").Offset(1, 0).Select
Loop
Range("G2").Offset(1, 0).Select
Loop
End Sub
Bookmarks