Skip to main content
Row

ConditionalFormattingCollection Methods

A collection of all conditional formatting rules on a worksheet.
Name Description
AddAverageConditionalFormatting(CellRange, ConditionalFormattingAverageCondition, Int32) Applies the "above or below average…" conditional formatting rule.
AddAverageConditionalFormatting(CellRange, ConditionalFormattingAverageCondition) Applies the "above or below average…" conditional formatting rule.
AddColorScale2ConditionalFormatting(CellRange, ConditionalFormattingValue, Color, ConditionalFormattingValue, Color) Applies the two-color scale conditional formatting rule.
AddColorScale3ConditionalFormatting(CellRange, ConditionalFormattingValue, Color, ConditionalFormattingValue, Color, ConditionalFormattingValue, Color) Applies the three-color scale conditional formatting rule.
AddDataBarConditionalFormatting(CellRange, ConditionalFormattingValue, ConditionalFormattingValue, Color) Applies the data bar conditional formatting rule.
AddExpressionConditionalFormatting(CellRange, ConditionalFormattingExpressionCondition, String) Applies a conditional formatting rule that uses a relational operator to determine which cells to format.
AddFormulaExpressionConditionalFormatting(CellRange, String) Applies a conditional formatting rule that uses a formula to determine which cells to format.
AddIconSetConditionalFormatting(CellRange, IconSetType, ConditionalFormattingIconSetValue[]) Applies an icon set conditional formatting rule.
AddRangeConditionalFormatting(CellRange, ConditionalFormattingRangeCondition, String, String) Applies the conditional formatting rule that formats cells which are between or not between two specified values.
AddRankConditionalFormatting(CellRange, ConditionalFormattingRankCondition, Int32) Applies the "top/bottom N" conditional formatting rule.
AddSpecialConditionalFormatting(CellRange, ConditionalFormattingSpecialCondition) Applies the conditional formatting rule that formats cells which contain the specified values (unique or duplicate values, formula errors, etc.).
AddTextConditionalFormatting(CellRange, ConditionalFormattingTextCondition, String) Applies the conditional formatting rule that formats cells based on the text they contain.
AddTimePeriodConditionalFormatting(CellRange, ConditionalFormattingTimePeriod) Applies a "date occurring…" conditional formatting rule.
Clear() Removes all conditional formatting rules from the collection.
Contains(ConditionalFormatting) Indicates whether the collection contains the specified conditional formatting rule.
CreateIconSetValue(ConditionalFormattingValueType, String, ConditionalFormattingValueOperator) Specifies the threshold value for the icon set conditional formatting rule.
CreateValue(ConditionalFormattingValueType, String) Specifies the minimum or maximum threshold value for the conditional formatting rule.
CreateValue(ConditionalFormattingValueType) Specifies the minimum or maximum threshold value for the conditional formatting rule.
GetConditionalFormattings(CellRange) Obtains conditional formatting rules applied to the specified cell range.
GetEnumerator() Returns an enumerator that iterates through the collection. Inherited from IEnumerable<T>.
IndexOf(ConditionalFormatting) Returns the index of the specified conditional formatting rule in the collection.
Remove(CellRange) Removes all conditional formatting rules applied to the specified range of cells.
Remove(ConditionalFormatting) Removes the specified conditional formatting rule from the collection.
RemoveAt(Int32) Removes the conditional formatting rule at the specified index from the collection.
See Also