Operator Property

Microsoft Excel Visual Basic

Show All

Operator Property

       

Operator property as it applies to the Filter object.

Returns the operator that associates the two criteria applied by the specified filter. Read-only XlAutoFilterOperator.

XlAutoFilterOperator can be one of these XlAutoFilterOperator constants.
xlAnd
xlBottom10Percent
xlTop10Items
xlBottom10Items
xlOr
xlTop10Percent

expression.Operator

expression   Required. An expression that returns one of the above objects.

 

Operator property as it applies to the FormatCondition and Validation objects.

Returns the operator for the conditional format or data validation. Read-only Long.

expression.Operator

expression   Required. An expression that returns one of the above objects.

 

Example

 As it applies to the FormatCondition object.

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