Live-Forum - Die aktuellen Beiträge
Anzeige
Archiv - Navigation
300to304
Aktuelles Verzeichnis
Verzeichnis Index
Übersicht Verzeichnisse
Vorheriger Thread
Rückwärts Blättern
Nächster Thread
Vorwärts blättern
Anzeige
HERBERS
Excel-Forum (Archiv)
20+ Jahre Excel-Kompetenz: Von Anwendern, für Anwender
300to304
300to304
Aktuelles Verzeichnis
Verzeichnis Index
Verzeichnis Index
Übersicht Verzeichnisse
Inhaltsverzeichnis

Bedingte Formatierung

Bedingte Formatierung
30.08.2003 21:41:46
wolfgang
Hallo
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

3
Beiträge zum Forumthread
Beiträge zu diesem Forumthread

Betreff
Datum
Anwender
Anzeige
AW: Bedingte Formatierung
30.08.2003 22:36:54
Jörg Gradert
Hallo Wolfgang,
ich denke, so geht es


Sub BedingteFormatierung()
Dim i As Integer
For i = 1 To 10
With Cells(i, 2)
.FormatConditions.Delete
.FormatConditions.Add Type:=xlExpression, Formula1:="=$A" & "$" & i & "=22"
.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


Ich habe die 99 in 22 geändert und $ Zeichen in die Formel eingefügt.

Gruss Jörg
Anzeige
AW: Bedingte Formatierung
30.08.2003 22:42:05
wolfgang
hallo jörg
Habs gleich probiert
klappt super
danke für deine hilfe
ich hatte schon den ganzen abend probiert
gruß wolfgang
AW: Bedingte Formatierung
30.08.2003 22:59:12
Rolf
Hallo Jörg,
DANKE SEHR!!!
Werde morgen ausprobieren!
Grüsse
Rolf

Beliebteste Forumthreads (12 Monate)

Anzeige

Beliebteste Forumthreads (12 Monate)

Anzeige
Anzeige
Anzeige