Private Sub Worksheet_Change(ByVal Target As Range)
Dim I As Integer
If Target.Column > 7 And Target.Column < 11 Then
If Target.Count > 1 Then Exit Sub
If Application.CountA(Cells(Target.Row, 8).Resize(, 3)) = 3 Then
Application.EnableEvents = False
For I = 1 To 5
If Application.CountIf(Cells(Target.Row, 8).Resize(, 3), Cells(Target.Row, I)) = 0 Then
If Cells(Target.Row, 11) = "" Then
Cells(Target.Row, 11) = Cells(Target.Row, I)
Else
Cells(Target.Row, 12) = Cells(Target.Row, I)
End If
End If
Next I
Application.EnableEvents = True
End If
End If
End Sub