Operator Property

Applies To

FormatCondition object, Validation object.

Description

Returns the operator for the conditional format or data validation. Can be one of the following XlFormatConditionOperator constants: xlBetween, xlEqual, xlGreater, xlGreaterEqual, xlLess, xlLessEqual, xlNotBetween, or xlNotEqual. Read-only Long.

See Also

Add method (FormatConditions collection), Formula1 property, Formula2 property, Modify method (FormatCondition object).

Example

This example changes the formula for conditional format one for cells E1:E10 if the formula specifies "less than 5."

With Worksheets(1).Range("E1:E10").FormatConditions(1)
    If .Operator = xlLess And .Formula1 = "5" Then
        .Modify xlCellValue, xlBetween, "5", "15"
    End If
End With