FormatConditions Interface

Definition

Represents the collection of conditional formats for a single range.

public interface class FormatConditions : System::Collections::IEnumerable
[System.Runtime.InteropServices.Guid("00024424-0000-0000-C000-000000000046")]
[System.Runtime.InteropServices.InterfaceType(2)]
public interface FormatConditions : System.Collections.IEnumerable
Public Interface FormatConditions
Implements IEnumerable
Attributes
Implements

Remarks

The FormatConditions collection can contain up to three conditional formats. Each format is represented by a FormatCondition object.

Use the FormatConditions property to return a FormatConditions object. Use the Microsoft.Office.Interop.Excel.FormatConditions.Add(Microsoft.Office.Interop.Excel.XlFormatConditionType,System.Object,System.Object,System.Object) method to create a new conditional format, and use the Modify(XlFormatConditionType, Object, Object, Object) method to change an existing conditional format.

If you try to create more than three conditional formats for a single range, the Add method fails. If a range has three formats, you can use the Modify method to change one of the formats, or you can use the Delete() method to delete a format and then use the Add method to create a new format.

For more information about conditional formats, see the FormatCondition object.

Properties

_Default[Object]

Reserved for internal use.

Application

Returns an Application object that represents the Microsoft Excel application.

Count

Returns the number of objects in the collection.

Creator

Returns a 32-bit integer that indicates the application in which this object was created.

Parent

Returns the parent object for the specified object.

Methods

Add(XlFormatConditionType, Object, Object, Object, Object, Object, Object, Object)

Adds a new conditional format.

AddAboveAverage()

Returns a new AboveAverage object representing a conditional formatting rule for the specified range.

AddColorScale(Int32)

Returns a new ColorScale object representing a conditional formatting rule that uses gradations in cell colors to indicate relative differences in the values of cells included in a selected range.

AddDatabar()

Returns a Databar object representing a data bar conditional formatting rule for the specified range.

AddIconSetCondition()

Returns a new IconSetCondition object which represents an icon set conditional formatting rule for the specified range.

AddTop10()

Returns a Top10 object representing a conditional formatting rule for the specified range.

AddUniqueValues()

Returns a new UniqueValues object representing a conditional formatting rule for the specified range.

Delete()

Deletes the object.

GetEnumerator()
Item(Object)

Returns a single object from a collection.

Applies to