VBA-Programmierung in Microsoft Excel

Tutorial: Excel-Beispiele

VBA-Begriff: Beispiel zur Add-Methode (FormatConditions-Auflistung)

In diesem Beispiel wird den Zellen E1:E10 ein bedingtes Format hinzugefügt.

With Worksheets(1).Range("e1:e10").FormatConditions _
        .Add(xlCellValue, xlGreater, "=$a$1")
    With .Borders
        .LineStyle = xlContinuous
        .Weight = xlThin
        .ColorIndex = 6
    End With
    With .Font
        .Bold = True
        .ColorIndex = 3
    End With
End With