أخى الفاضل / محمد
هذا هو الكود المستخدم
وهو يوضع فى حدث الورقة
Private Sub Worksheet_Change(ByVal Target As Range)
Dim LR As Integer, cl As Range, cll As Range
LR = [A1000].End(xlUp).Row
'==========================================================
If Target.Count > 1 Then Exit Sub
If Target.Column <> 1 Or Target = "" Then Exit Sub
For Each cl In Range("A2:A" & LR)
If Application.WorksheetFunction.CountIf(Range(Cells(cl.Row, 1), Cells(LR, 1)), cl) > 1 Then
For Each cll In Range("A2:A" & LR - 1)
If Target = cll Then
arr = arr & cll.Address & ","
End If
Next
m = MsgBox("هذا الاسم مكرر فى الخلية" & Chr(10) & arr & Chr(10) & "هل تريد السماح بتكرار هذا الاسم", vbYesNo, "اسم مكرر")
If m = vbYes Then Exit Sub
Target = "": Target.Select: Exit Sub
End If
Next
End Sub