Private
Sub
Worksheet_Change(
ByVal
Target
As
Range)
Application.EnableEvents =
False
If
Not
Intersect(Range(
"G4:AE72"
), Target)
Is
Nothing
Then
If
IsNumeric(Target.Value)
Then
If
Target.Value =
CInt
(Target.Value)
And
Target.Value < 100
Then
If
WorksheetFunction.CountA(Range(
"G"
& Target.Row &
":AE"
& Target.Row)) > 1
Then
MsgBox
"schon ein Wert vorhanden"
Target.Value = vbNullString
End
If
Else
MsgBox
"Falscher Wert"
Target.Value = vbNullString
End
If
End
If
End
If
Application.EnableEvents =
True
End
Sub