Teil 3:
Sub Prüfung_S_1()
With Worksheets("Sheet1")
For y = .Range("BQC1").Column To .Range("DTL1").Column
If .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
ElseIf .Cells(1, y).Value > .Range("KD2").Value _
Then
.Cells(2, y).Value = 0
ElseIf .Cells(1, y).Value < .Range("KC2").Value _
Then
.Cells(2, y).Value = 0
Else
.Cells(2, y).Value = 1
End If
Next
.Range("BQA2").Value = WorksheetFunction.Sum(.Range("BQC2:DTL2"))
.Range("BPK2").Value = ""
If .Range("BQA2").Value = 0 _
Then
Call verplanen_S(3, 10, 13, 14, "BPN2", "BPO2")
Else:
Call Prüfung_1
End If
End With
End Sub
Sub Prüfung_S_2()
With Worksheets("Sheet1")
For y = .Range("BQC1").Column To .Range("DTL1").Column
If .Cells(33, 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
ElseIf .Cells(1, y).Value > .Range("KD2").Value _
Then
.Cells(2, y).Value = 0
ElseIf .Cells(1, y).Value < .Range("KC2").Value _
Then
.Cells(2, y).Value = 0
Else
.Cells(2, y).Value = 1
End If
Next
.Range("BQA2").Value = WorksheetFunction.Sum(.Range("BQC2:DTL2"))
.Range("BPK3").Value = ""
If .Range("BQA2").Value = 0 _
Then
Call verplanen_S(33, 40, 43, 44, "BPN3", "BPO3")
Else:
Call Prüfung_1
End If
End With
End Sub
Sub Prüfung_S_3()
With Worksheets("Sheet1")
For y = .Range("BQC1").Column To .Range("DTL1").Column
If .Cells(63, 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
ElseIf .Cells(1, y).Value > .Range("KD2").Value _
Then
.Cells(2, y).Value = 0
ElseIf .Cells(1, y).Value < .Range("KC2").Value _
Then
.Cells(2, y).Value = 0
Else
.Cells(2, y).Value = 1
End If
Next
.Range("BQA2").Value = WorksheetFunction.Sum(.Range("BQC2:DTL2"))
.Range("BPK4").Value = ""
If .Range("BQA2").Value = 0 _
Then
Call verplanen_S(63, 70, 73, 74, "BPN4", "BPO4")
Else:
Call Prüfung_1
End If
End With
End Sub
Sub Prüfung_S_4()
With Worksheets("Sheet1")
For y = .Range("BQC1").Column To .Range("DTL1").Column
If .Cells(93, 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
ElseIf .Cells(1, y).Value > .Range("KD2").Value _
Then
.Cells(2, y).Value = 0
ElseIf .Cells(1, y).Value < .Range("KC2").Value _
Then
.Cells(2, y).Value = 0
Else
.Cells(2, y).Value = 1
End If
Next
.Range("BQA2").Value = WorksheetFunction.Sum(.Range("BQC2:DTL2"))
.Range("BPK5").Value = ""
If .Range("BQA2").Value = 0 _
Then
Call verplanen_S(93, 100, 103, 104, "BPN5", "BPO5")
Else:
Call Prüfung_1
End If
End With
End Sub
Sub Prüfung_S_5()
With Worksheets("Sheet1")
For y = .Range("BQC1").Column To .Range("DTL1").Column
If .Cells(123, 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
ElseIf .Cells(1, y).Value > .Range("KD2").Value _
Then
.Cells(2, y).Value = 0
ElseIf .Cells(1, y).Value < .Range("KC2").Value _
Then
.Cells(2, y).Value = 0
Else
.Cells(2, y).Value = 1
End If
Next
.Range("BQA2").Value = WorksheetFunction.Sum(.Range("BQC2:DTL2"))
.Range("BPK6").Value = ""
If .Range("BQA2").Value = 0 _
Then
Call verplanen(123, 130, 133, 134, "BPN6", "BPO6")
Else:
Call Prüfung_1
End If
End With
End Sub
Sub Prüfung_S_6()
With Worksheets("Sheet1")
For y = .Range("BQC1").Column To .Range("DTL1").Column
If .Cells(153, 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
ElseIf .Cells(1, y).Value > .Range("KD2").Value _
Then
.Cells(2, y).Value = 0
ElseIf .Cells(1, y).Value < .Range("KC2").Value _
Then
.Cells(2, y).Value = 0
Else
.Cells(2, y).Value = 1
End If
Next
.Range("BQA2").Value = WorksheetFunction.Sum(.Range("BQC2:DTL2"))
.Range("BPK7").Value = ""
If .Range("BQA2").Value = 0 _
Then
Call verplanen_S(153, 160, 163, 164, "BPN7", "BPO7")
Else:
Call Prüfung_1
End If
End With
End Sub
Sub Prüfung_S_7()
With Worksheets("Sheet1")
For y = .Range("BQC1").Column To .Range("DTL1").Column
If .Cells(183, 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
ElseIf .Cells(1, y).Value > .Range("KD2").Value _
Then
.Cells(2, y).Value = 0
ElseIf .Cells(1, y).Value < .Range("KC2").Value _
Then
.Cells(2, y).Value = 0
Else
.Cells(2, y).Value = 1
End If
Next
.Range("BQA2").Value = WorksheetFunction.Sum(.Range("BQC2:DTL2"))
.Range("BPK8").Value = ""
If .Range("BQA2").Value = 0 _
Then
Call verplanen_S(183, 190, 193, 194, "BPN8", "BPO8")
Else:
Call Prüfung_1
End If
End With
End Sub
Sub Prüfung_S_8()
With Worksheets("Sheet1")
For y = .Range("BQC1").Column To .Range("DTL1").Column
If .Cells(213, 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
ElseIf .Cells(1, y).Value > .Range("KD2").Value _
Then
.Cells(2, y).Value = 0
ElseIf .Cells(1, y).Value < .Range("KC2").Value _
Then
.Cells(2, y).Value = 0
Else
.Cells(2, y).Value = 1
End If
Next
.Range("BQA2").Value = WorksheetFunction.Sum(.Range("BQC2:DTL2"))
.Range("BPK9").Value = ""
If .Range("BQA2").Value = 0 _
Then
Call verplanen_S(213, 220, 223, 224, "BPN9", "BPO9")
Else:
Call Prüfung_1
End If
End With
End Sub
Sub Prüfung_S_9()
With Worksheets("Sheet1")
For y = .Range("BQC1").Column To .Range("DTL1").Column
If .Cells(243, 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
ElseIf .Cells(1, y).Value > .Range("KD2").Value _
Then
.Cells(2, y).Value = 0
ElseIf .Cells(1, y).Value < .Range("KC2").Value _
Then
.Cells(2, y).Value = 0
Else
.Cells(2, y).Value = 1
End If
Next
.Range("BQA2").Value = WorksheetFunction.Sum(.Range("BQC2:DTL2"))
.Range("BPK10").Value = ""
If .Range("BQA2").Value = 0 _
Then
Call verplanen_S(243, 250, 253, 254, "BPN10", "BPO10")
Else:
Call Prüfung_1
End If
End With
End Sub
Sub Prüfung_S_10()
With Worksheets("Berechnung Rampe")
For y = .Range("BQC1").Column To .Range("DTL1").Column
If .Cells(273, 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
ElseIf .Cells(1, y).Value > .Range("KD2").Value _
Then
.Cells(2, y).Value = 0
ElseIf .Cells(1, y).Value < .Range("KC2").Value _
Then
.Cells(2, y).Value = 0
Else
.Cells(2, y).Value = 1
End If
Next
.Range("BQA2").Value = WorksheetFunction.Sum(.Range("BQC2:DTL2"))
.Range("BPK11").Value = ""
If .Range("BQA2").Value = 0 _
Then
Call verplanen_S(273, 280, 283, 284, "BPN11", "BPO11")
Else:
Call Prüfung_2
End If
End With
End Sub
Sub Prüfung_O_1()
With Worksheets("Sheet1")
For y = .Range("BQC1").Column To .Range("DTL1").Column
If .Cells(13743, 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
ElseIf .Cells(1, y).Value > .Range("KD2").Value _
Then
.Cells(2, y).Value = 0
ElseIf .Cells(1, y).Value < .Range("KC2").Value _
Then
.Cells(2, y).Value = 0
Else
.Cells(2, y).Value = 1
End If
Next
.Range("BQA2").Value = WorksheetFunction.Sum(.Range("BQC2:DTL2"))
.Range("BPK460").Value = ""
If .Range("BQA2").Value = 0 _
Then
Call verplanen_O(13743, 13750, 13753, 13754)
Else:
Call Prüfung_2
End If
End With
End Sub
Sub Prüfung_O_2()
With Worksheets("Sheet1")
For y = .Range("BQC1").Column To .Range("DTL1").Column
If .Cells(13773, 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
ElseIf .Cells(1, y).Value > .Range("KD2").Value _
Then
.Cells(2, y).Value = 0
ElseIf .Cells(1, y).Value < .Range("KC2").Value _
Then
.Cells(2, y).Value = 0
Else
.Cells(2, y).Value = 1
End If
Next
.Range("BQA2").Value = WorksheetFunction.Sum(.Range("BQC2:DTL2"))
.Range("BPK461").Value = ""
If .Range("BQA2").Value = 0 _
Then
Call verplanen_O(13773, 13780, 13783, 13784)
Else:
Call Prüfung_2
End If
End With
End Sub
Sub Prüfung_O_3()
With Worksheets("Sheet1")
For y = .Range("BQC1").Column To .Range("DTL1").Column
If .Cells(13803, 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
ElseIf .Cells(1, y).Value > .Range("KD2").Value _
Then
.Cells(2, y).Value = 0
ElseIf .Cells(1, y).Value < .Range("KC2").Value _
Then
.Cells(2, y).Value = 0
Else
.Cells(2, y).Value = 1
End If
Next
.Range("BQA2").Value = WorksheetFunction.Sum(.Range("BQC2:DTL2"))
.Range("BPK462").Value = ""
If .Range("BQA2").Value = 0 _
Then
Call verplanen_O(13803, 13810, 13813, 13814)
Else:
Call Ende
End If
End With
End Sub
|