Private Sub Worksheet_Change(ByVal Target As Range)
Dim n As Integer
If Application.WorksheetFunction.CountIf(Range(Cells(3, Target.Column), Cells(10000, Target.Column)), Target.Value) = 1 Then
If Target.Address = "$A$3" And Target.Count = 1 Then
n = Application.CountA([A4:A10000])
ActiveSheet.Unprotect Password:=""
Cells(4 + n, "a") = Target
ActiveSheet.Protect Password:=""
[A3].Select
End If
If Target.Address = "$B$3" And Target.Count = 1 Then
n = Application.CountA([B4:B10000])
ActiveSheet.Unprotect Password:=""
Cells(4 + n, "b") = Target
ActiveSheet.Protect Password:=""
[B3].Select
End If
End If
End Sub