The
conditional formatting feature allows you to apply formats to a cell or range of cells, and have that formatting change depending on the value of the cell or the value of a formula.
Use the
Add method to add new ConditionalFormat objects. Use the
Item property
to access a ConditionalFormat object. The ConditionalFormat object supports
the following properties and method:
| | Name | Description | |
| | ApplyTo | Specifies whether the format is applied to items or columns. | |
| | BackColor | Retrieves or sets the background color for objects that match the condition. | |
| | Bold | Bolds the objects that match the condition. | |
| | ClearBackColor | Clears the background color. | |
| | ClearForeColor | Clears the foreground color. | |
| | Enabled | Specifies whether the condition is enabled or disabled. | |
| | Expression | Indicates the expression being used in the conditional format. | |
| | Font | Retrieves or sets the font for objects that match the criteria. | |
| | ForeColor | Retrieves or sets the foreground color for objects that match the condition. | |
| | Italic | Specifies whether the objects that match the condition should appear in italic. | |
| | Key | Checks whether the expression is syntactically correct. | |
| | StrikeOut | Specifies whether the objects that match the condition should appear in strikeout. | |
| | Underline | Underlines the objects that match the condition. | |
| | Valid | Checks whether the expression is syntactically correct. | |