Bedingte Formatierung
30.08.2003 21:41:46
wolfgang
ich möchte gerne mit bedingter Formatierung die Zellen dynamisch formatieren
leider klappt es nicht so wie ich es möchte
also wenn ich in der zelle
a1 einen wert habe dann soll die zelle b1 grün sein,
und wenn der wert in a1 =22 ist soll die zelle b1 gelb sein
hier mein kleines makro was nicht funktioniert
Sub BedingteFormatierung()
Dim i As Variant
For i = 1 To 10
With Cells(i, 2)
.FormatConditions.Delete
.FormatConditions.Add Type:=xlExpression, Formula1:="=A" & i & "=99"
.FormatConditions(1).Interior.ColorIndex = 36
.FormatConditions.Add Type:=xlExpression, Formula1:="=A" & i & ">0"
.FormatConditions(2).Interior.ColorIndex = 35
.FormulaR1C1 = "=RC[-1]*RC[-1]"
End With
Next i
End Sub
kann jemand helfen?!
gruß
wolfgang