to a sheet module
![]()
Private Sub Worksheet_Change(ByVal Target As Range) With Target If (Not Intersect(.Cells, Range("A19:A82")) Is Nothing) * _ (Not IsEmpty(.Value)) Then If WorksheetFunction.CountIf(Range("A19:A82"),.Value) > 1 Then MsgBox "Duplicate" Application.EnableEvents = False .ClearContents Application.EnableEvents = True End If End If End With End Sub
Bookmarks