Private
Sub
Worksheet_Change(
ByVal
Target
As
Range)
Dim
Bereich1
As
Range
Set
Bereich1 = Range(
"G2:G10"
)
If
Target.Cells.Count > 1
Then
Exit
Sub
If
Target.Value =
""
Then
Exit
Sub
If
Intersect(Bereich1, Target)
Is
Nothing
Then
Exit
Sub
If
WorksheetFunction.CountIf(Bereich1, Target.Value) > 1
Then
MsgBox (
"Doppelter Eintrag nicht zulässig"
)
Application.EnableEvents =
False
Target.Value =
""
Application.EnableEvents =
True
Target.
Select
End
If
End
Sub