Sub
ifAnweisung_Var1()
Range(
"H1:I1"
) = Empty
For
icounter = 3
To
7
If
Cells(1, icounter) >= Cells(1, 1)
And
Cells(1, icounter) <= Cells(1, 2)
Or
Cells(1, icounter) =
""
Then
Cells(1, 8) =
"richtig"
Else
Cells(1, 9) =
"falsch"
Next
icounter
If
Cells(1, 9) =
"falsch"
Then
Cells(1, 8) = Empty
End
Sub
Sub
ifAnweisung_Var2()
Dim
Txt
As
String
For
icounter = 3
To
7
If
Cells(1, icounter) =
""
Then
Else
_
If
Cells(1, icounter) >= Cells(1, 1)
And
Cells(1, icounter) <= Cells(1, 2)
Then
Txt =
"richtig"
Else
Txt =
"falsch"
:
Exit
For
Next
icounter
If
Txt =
"richtig"
Then
Cells(1, 8) =
"richtig"
If
Txt =
"falsch"
Then
Cells(1, 9) =
"falsch"
End
Sub