Sub
Prüfung_1()
With
Worksheets(
"Sheet1"
)
If
.Range(
"BPK2"
).Value =
"x"
Then
For
y = .Range(
"BQC1"
).Column
To
.Range(
"DTL1"
).Column
If
(.Cells(1, y).Value < .Range(
"KC2"
).Value _
Or
.Cells(1, y).Value > .Range(
"KD2"
).Value _
Or
.Cells(3, y).Value = 1) _
And
.Cells(1, y).Value >= .Range(
"KC2"
).Value _
And
.Cells(1, y).Value <= .Range(
"KD2"
).Value _
Then
.Cells(2, y).Value = 0
Else
.Cells(2, y).Value = 1
End
If
Next
.Range(
"BQA2"
).Value = WorksheetFunction.Sum(.Range(
"BQC2:DTL2"
))
If
.Range(
"BQA2"
).Value = 0
Then
Call
Ende(3, 10, 13, 14,
"BPN2"
,
"BPO2"
)
Else
Call
Prüfung_2
End
If
Else
Call
Prüfung_2
End
If
End
With