Gruppe
Ereignis
Problem
In Spalte A werden Doppeleingaben über das Change-Ereignis verhndert, in Spalte B durch das Excel-Feature Menü DATEN / GÜLTIGKEIT
ClassModule: Tabelle1
Private Sub Worksheet_Change(ByVal Target As Range)
Dim rng As Range
If Target.Column <> 1 Then Exit Sub
If IsEmpty(Target) Then Exit Sub
If Target.Cells.Count > 1 Then Exit Sub
Application.EnableEvents = False
On Error GoTo ERRORHANDLER
If Application.CountIf(Range("A:A"), Target.Value) > 1 Then
Target.ClearContents
End If
ERRORHANDLER:
Application.EnableEvents = True
End Sub