Try this version.
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Count <> 1 Then Exit Sub
If Target.Column = 16 And Target.Count = 1 Then
If Cells(17, 7) = "" Then
Cells(17, 7) = Target
ElseIf Cells(28, 7) <> "" And Cells(29, 7) = "" Then
Cells(29, 7) = Target
ElseIf Cells(29, 7) = "" Then
Cells(29, 7).End(xlUp).Offset(1, 0) = Target
End If
End If
If Target.Column = 20 And Target.Count = 1 Then
If Cells(17, 7) = "" Then
Cells(17, 7) = Target
ElseIf Cells(28, 7) <> "" And Cells(29, 7) = "" Then
Cells(29, 7) = Target
ElseIf Cells(29, 7) = "" Then
Cells(29, 7).End(xlUp).Offset(1, 0) = Target
End If
End If
End Sub
Bookmarks