Private
Sub
Worksheet_Change(
ByVal
Target
As
Range)
If
Target.Count > 1
Then
Exit
Sub
If
Intersect(Union(Columns(
"D"
), Columns(
"J:K"
)), Target)
Is
Nothing
Then
Exit
Sub
If
Target.Row < 19
Or
Target.Row > 803
Then
Exit
Sub
Dim
nbf
As
Variant
Dim
mOfs
As
Long
Application.EnableEvents =
False
nbf = Target.NumberFormat
Target.NumberFormat =
"General"
Select
Case
Target.Column
Case
4
mOfs = 19
Case
10, 11
mOfs = 14
End
Select
Select
Case
Nachkomma(Target)
Case
0
Target.Offset(, mOfs).Value = 7
Case
1
Target.Offset(, mOfs).Value = 5
Case
2
Target.Offset(, mOfs).Value = 3
Case
3
Target.Offset(, mOfs).Value = 2
Case
Else
End
Select
Target.NumberFormat = nbf
Application.EnableEvents =
True
End
Sub