ApiFormatCondition
Class representing a single format condition.
Properties
| Name | Type | Description |
|---|---|---|
| AboveBelow | boolean | Returns or sets whether the condition applies above or below the average. |
| AppliesTo | ApiRange | Returns the range to which this condition applies. |
| DateOperator | XlTimePeriods | Returns or sets the date operator for time period conditions. |
| FillColor | ApiColor | 'No Fill' | Returns or sets the background color of the format condition. |
| Formula1 | string | Returns or sets the first formula used by the format condition. |
| Formula2 | string | Returns or sets the second formula used by the format condition. |
| NumberFormat | string | Returns or sets the number format applied to a cell when the conditional formatting rule evaluates to true. |
| Operator | XlFormatConditionOperator | Returns the format condition operator. |
| PTCondition | PTCondition | Returns the pivot table condition object. |
| Parent | ApiRange | Returns the parent range object of the format condition. |
| PercentRank | boolean | Returns or sets whether the rank is percentage-based. |
| Priority | number | Returns or sets the priority of the condition. |
| Rank | number | Returns or sets the rank for top/bottom conditional formatting rules. |
| ScopeType | XlPivotConditionScope | Returns or sets the scope type for the format condition. |
| StdDev | number | Returns or sets the number of standard deviations for average conditions. |
| StopIfTrue | boolean | Returns or sets whether subsequent conditional formatting rules should be evaluated when this rule evaluates to true. |
| Text | string | Returns or sets the text for text-based conditions. |
| TextOperator | XlContainsOperator | Returns or sets the text operator for text-based conditions. |
| Type | XlFormatConditionType | Returns the format condition type. |
Methods
The following table lists the available methods.
| Method | Returns | Description |
|---|---|---|
| Delete | None | Deletes the current format condition. |
| GetAppliesTo | ApiRange | null | Returns the range of cells to which the current conditional formatting rule applies. |
| GetDateOperator | XlTimePeriods | null | Returns the date operator for time period conditions. |
| GetFillColor | ApiColor | 'No Fill' | Returns the background color for the format condition. |
| GetFont | ApiFont | null | Returns the font applied by the current format condition. |
| GetFormula1 | string | Returns the first formula used by the current conditional formatting rule. |
| GetFormula2 | string | Returns the second formula used by the current conditional formatting rule. |
| GetNumberFormat | string | Returns the number format applied to a cell when the conditional formatting rule evaluates to true. |
| GetOperator | XlFormatConditionOperator | Returns the format condition operator. |
| GetPTCondition | PTCondition | null | Returns the pivot table condition object. |
| GetParent | ApiRange | Returns the parent range object of the current format condition. |
| GetPriority | number | Returns the priority value of the conditional formatting rule. |
| GetScopeType | XlPivotConditionScope | Returns the scope type of the conditional formatting rule. |
| GetText | string | Returns the text value used in text-based conditional formatting rules. |
| GetTextOperator | XlContainsOperator | null | Returns the text operator for text-based conditional formatting rules. |
| GetType | XlFormatConditionType | Returns the format condition type. |
| Modify | ApiFormatCondition | null | Modifies the current format condition with the specified parameters. |
| ModifyAppliesToRange | None | Sets the cell range to which the current conditional formatting rule applies. |
| SetBorders | None | Sets the border style for the conditional formatting rule. |
| SetDateOperator | None | Sets the date operator for time period conditions. |
| SetFillColor | None | Sets the background color to the format condition with the previously created color object. |
| SetFirstPriority | None | Sets the priority value for the current conditional formatting rule to "1" so that it will be evaluated before all other rules on the worksheet. |
| SetLastPriority | None | Sets the evaluation order for the current conditional formatting rule so it is evaluated after all other rules on the worksheet. |
| SetNumberFormat | None | Sets the number format applied to a cell when the conditional formatting rule evaluates to true. |
| SetPriority | None | Sets the priority value of the conditional formatting rule. |
| SetScopeType | None | Sets the scope type for the conditional formatting rule. |
| SetText | None | Sets the text value used in text-based conditional formatting rules. |
| SetTextOperator | None | Sets the text operator for text-based conditional formatting rules. |