Teil 1:
Dim y As Integer
Dim par1, par2, par3, par4, par5, par6 As String
Sub Berechnung_Prüfung()
With Worksheets("Sheet1")
For z = 2 To 21
If .Cells(z, "BOT").Value = "x" _
And .Range("ID2").Value = "x" _
And Format(.Range("KC2"), "hh:mm") > Format(.Cells(z, "BPM"), "hh:mm") _
And Format(.Range("KD2"), "hh:mm") < Format(.Cells(z, "BPP"), "hh:mm") _
Then
.Cells(z, "BPK").Value = "x"
ElseIf .Cells(z, "BOU").Value = "x" _
And .Range("IE2").Value = "x" _
And Format(.Range("KC2"), "hh:mm") > Format(.Cells(z, "BPM"), "hh:mm") _
And Format(.Range("KD2"), "hh:mm") < Format(.Cells(z, "BPP"), "hh:mm") _
Then
.Cells(z, "BPK").Value = "x"
ElseIf .Cells(z, "BOV").Value = "x" _
And .Range("IF2").Value = "x" _
And Format(.Range("KC2"), "hh:mm") > Format(.Cells(z, "BPM"), "hh:mm") _
And Format(.Range("KD2"), "hh:mm") < Format(.Cells(z, "BPP"), "hh:mm") _
Then
.Cells(z, "BPK").Value = "x"
ElseIf .Cells(z, "BOW").Value = "x" _
And .Range("IG2").Value = "x" _
And Format(.Range("KC2"), "hh:mm") > Format(.Cells(z, "BPM"), "hh:mm") _
And Format(.Range("KD2"), "hh:mm") < Format(.Cells(z, "BPP"), "hh:mm") _
Then
.Cells(z, "BPK").Value = "x"
ElseIf .Cells(z, "BOX").Value = "x" _
And .Range("IH2").Value = "x" _
And Format(.Range("KC2"), "hh:mm") > Format(.Cells(z, "BPM"), "hh:mm") _
And Format(.Range("KD2"), "hh:mm") < Format(.Cells(z, "BPP"), "hh:mm") _
Then
.Cells(z, "BPK").Value = "x"
ElseIf .Cells(z, "BOY").Value = "x" _
And .Range("II2").Value = "x" _
And Format(.Range("KC2"), "hh:mm") > Format(.Cells(z, "BPM"), "hh:mm") _
And Format(.Range("KD2"), "hh:mm") < Format(.Cells(z, "BPP"), "hh:mm") _
Then
.Cells(z, "BPK").Value = "x"
ElseIf .Cells(z, "BOZ").Value = "x" _
And .Range("IJ2").Value = "x" _
And Format(.Range("KC2"), "hh:mm") > Format(.Cells(z, "BPM"), "hh:mm") _
And Format(.Range("KD2"), "hh:mm") < Format(.Cells(z, "BPP"), "hh:mm") _
Then
.Cells(z, "BPK").Value = "x"
ElseIf .Cells(z, "BPA").Value = "x" _
And .Range("IK2").Value = "x" _
And Format(.Range("KC2"), "hh:mm") > Format(.Cells(z, "BPM"), "hh:mm") _
And Format(.Range("KD2"), "hh:mm") < Format(.Cells(z, "BPP"), "hh:mm") _
Then
.Cells(z, "BPK").Value = "x"
ElseIf .Cells(z, "BPB").Value = "x" _
And .Range("IL2").Value = "x" _
And Format(.Range("KC2"), "hh:mm") > Format(.Cells(z, "BPM"), "hh:mm") _
And Format(.Range("KD2"), "hh:mm") < Format(.Cells(z, "BPP"), "hh:mm") _
Then
.Cells(z, "BPK").Value = "x"
ElseIf .Cells(z, "BPL").Value = "x" _
And .Range("IM2").Value = "x" _
And Format(.Range("KC2"), "hh:mm") > Format(.Cells(z, "BPM"), "hh:mm") _
And Format(.Range("KD2"), "hh:mm") < Format(.Cells(z, "BPP"), "hh:mm") _
Then
.Cells(z, "BPK").Value = "x"
ElseIf .Cells(z, "BPD").Value = "x" _
And .Range("IN2").Value = "x" _
And Format(.Range("KC2"), "hh:mm") > Format(.Cells(z, "BPM"), "hh:mm") _
And Format(.Range("KD2"), "hh:mm") < Format(.Cells(z, "BPP"), "hh:mm") _
Then
.Cells(z, "BPK").Value = "x"
ElseIf .Cells(z, "BPE").Value = "x" _
And .Range("IO2").Value = "x" _
And Format(.Range("KC2"), "hh:mm") > Format(.Cells(z, "BPM"), "hh:mm") _
And Format(.Range("KD2"), "hh:mm") < Format(.Cells(z, "BPP"), "hh:mm") _
Then
.Cells(z, "BPK").Value = "x"
ElseIf .Cells(z, "BPF").Value = "x" _
And .Range("IP2").Value = "x" _
And Format(.Range("KC2"), "hh:mm") > Format(.Cells(z, "BPM"), "hh:mm") _
And Format(.Range("KD2"), "hh:mm") < Format(.Cells(z, "BPP"), "hh:mm") _
Then
.Cells(z, "BPK").Value = "x"
ElseIf .Cells(z, "BPG").Value = "x" _
And .Range("IQ2").Value = "x" _
And Format(.Range("KC2"), "hh:mm") > Format(.Cells(z, "BPM"), "hh:mm") _
And Format(.Range("KD2"), "hh:mm") < Format(.Cells(z, "BPP"), "hh:mm") _
Then
.Cells(z, "BPK").Value = "x"
ElseIf .Cells(z, "BPH").Value = "x" _
And .Range("IR2").Value = "x" _
And Format(.Range("KC2"), "hh:mm") > Format(.Cells(z, "BPM"), "hh:mm") _
And Format(.Range("KD2"), "hh:mm") < Format(.Cells(z, "BPP"), "hh:mm") _
Then
.Cells(z, "BPK").Value = "x"
ElseIf .Cells(z, "BPI").Value = "x" _
And .Range("IS2").Value = "x" _
And Format(.Range("KC2"), "hh:mm") > Format(.Cells(z, "BPM"), "hh:mm") _
And Format(.Range("KD2"), "hh:mm") < Format(.Cells(z, "BPP"), "hh:mm") _
Then
.Cells(z, "BPK").Value = "x"
Else:
.Cells(z, "BPK").Value = ""
End If
Next
.Range("BPK460:BPK660").Value = "x"
End With
Call Prüfung_1
End Sub
|