Private Sub Worksheet_Change(ByVal Target As Range) 'SAS
Dim r As Long
Dim lc As Long
Dim ans As String
Dim rngDV As Range
If Target.Count 1 Or Target.Column < 3 Then Exit Sub
'Me.Unprotect Password:="builder"
Set rngDV = Cells.SpecialCells(xlCellTypeAllValidation)
If Intersect(Target, rngDV) Is Nothing Then
Application.EnableEvents = False
Target = ""
Application.EnableEvents = True
Exit Sub
End If
r = Target.Row
lc = Cells(r, Columns.Count).End(xlToLeft).Column + 1
Application.EnableEvents = False
Cells(r, lc) = Target
Application.EnableEvents = True
If Application.CountIf(Range(Cells(r, "d"), Cells(r, "Q")), Target) 1 Then
ans = MsgBox("Duplicated, Continue?", vbYesNo)
If ans = vbNo Then
Cells(r, lc) = ""
End If
Target = ""
End If
'Me.Protect Password:="builder"
End Sub