Mit diesen Format geschrieben müsste es auch funktionieren oder?
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 y
|