Option
Explicit
Private
Sub
Worksheet_Change(
ByVal
Target
As
Range)
Dim
C&, NichtLeer
As
Boolean
, R&, Wert#, V
Application.EnableEvents =
False
On
Error
GoTo
ExitSub
With
Target
R = .Row
C = .Column
V = .Value
End
With
Select
Case
R
Case
Is
> 14,
Is
< 5
Application.EnableEvents =
True
Exit
Sub
End
Select
Select
Case
C
Case
Is
> 7,
Is
< 4
Application.EnableEvents =
True
Exit
Sub
Case
4:
If
V =
"x"
Then
Wert = 3
Case
Else
:
If
V =
"x"
Then
Wert = 1
End
Select
If
V <>
""
Then
Range(Cells(R, 4), Cells(R, 7)).ClearContents
Target =
"x"
End
If
If
Wert <> 0
Then
Cells(11 + R, 3) = Wert
Else
If
Cells(R, 8).
End
(xlToLeft).Column < 4
Then
Cells(11 + R, 3) =
""
End
If
End
If
ExitSub:
Application.EnableEvents =
True
End
Sub