FormatCondition.Modify method (Excel)
Modifies an existing conditional format.
Syntax
expression.Modify (Type, Operator, Formula1, Formula2)
expression A variable that represents a FormatCondition object.
Parameters
Name | Required/Optional | Data type | Description |
---|---|---|---|
Type | Required | XlFormatConditionType | Specifies whether the conditional format is based on a cell value or an expression. |
Operator | Optional | Variant | An XlFormatConditionOperator value that represents the conditional format operator. This parameter is ignored if Type is set to xlExpression. |
Formula1 | Optional | Variant | The value or expression associated with the conditional format. Can be a constant value, a string value, a cell reference, or a formula. |
Formula2 | Optional | Variant | The value or expression associated with the conditional format. Can be a constant value, a string value, a cell reference, or a formula. |
Example
This example modifies an existing conditional format for cells E1:E10.
Worksheets(1).Range("e1:e10").FormatConditions(1) _
.Modify xlCellValue, xlLess, "=$a$1"
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.
Feedback
https://aka.ms/ContentUserFeedback.
Binnenkort beschikbaar: In de loop van 2024 zullen we GitHub-problemen geleidelijk uitfaseren als het feedbackmechanisme voor inhoud en deze vervangen door een nieuw feedbacksysteem. Zie voor meer informatie:Feedback verzenden en weergeven voor