With
Sheets(
"C"
).Range(
"A5:D6"
)
.FormatConditions.Add Type:=xlExpression, Formula1:=
"=WENN($A5=$A4 "
;WAHR;FALSCH)"
With
.FormatConditions(1).Borders(xlBottom)
.LineStyle = xlContinuous
.TintAndShade = 0
.Weight = xlThin
End
With
.FormatConditions(1).StopIfTrue =
False
End
With
With
Sheets(
"C"
).Range(
"D1:D6"
)
.FormatConditions.Add Type:=xlExpression, Formula1:=
"=WENN(D$2<>E$2;WAHR;FALSCH)"
With
.FormatConditions(1).Borders(xlEdgeRight)
.LineStyle = xlContinuous
.TintAndShade = 0
.Weight = xlThin
End
With
.FormatConditions(1).StopIfTrue =
False
End
With