Dieser Code soll die bedingten Formate der markierten Zellen, ab Zelle O2, auflisten. Was muss am Code geändert werden, damit es funktioniert.
Danke für evtl. Lösung und
Gruß, Dieter(Drummer)
Code von Herber:
Sub FormCond()
Dim iFormula As Integer, iColorA As Integer
Dim iColorB As Integer
With Range("A1").FormatConditions(1)
iFormula = .Formula1
iColorA = .Font.ColorIndex
iColorB = Range("A1").Font.ColorIndex
If iColorB = -4105 Then iColorB = "'Automatisch'"
If Range("A1").Value = iFormula Then
MsgBox "Bedingung '" & iFormula & "' ist erfüllt" _
& vbLf & "Die aktuelle Schriftfarbe ist " & iColorA
Else
MsgBox "Bedingung '" & iFormula & "' ist nicht erfüllt" _
& vbLf & "Die aktuelle Schriftfarbe ist " & iColorB
End If
End With
End Sub