ColorScaleCriterion Interface

Represents the criteria for the minimum, midpoint, or maximum thresholds for a color format conditional format.

Namespace:  Microsoft.Office.Interop.Excel
Assembly:  Microsoft.Office.Interop.Excel (in Microsoft.Office.Interop.Excel.dll)

Syntax

'Declaration
<InterfaceTypeAttribute()> _
<GuidAttribute("00024495-0000-0000-C000-000000000046")> _
Public Interface ColorScaleCriterion
'Usage
Dim instance As ColorScaleCriterion
[InterfaceTypeAttribute()]
[GuidAttribute("00024495-0000-0000-C000-000000000046")]
public interface ColorScaleCriterion

Remarks

Each ColorScaleCriterion is part of the ColorScaleCriteria collection. Use ColorScaleCriteria(index), to return an individual criterion.

You can set the Type, Value, and FormatColor of each threshold for the color scale.

Examples

The following code example creates a range of numbers and then applies a two-color scale conditional formatting rule to that range. The color for the minimum threshold is then assigned to red and the maximum threshold to blue by indexing into the ColorScaleCriteriacollection to set individual criteria.

See Also

Reference

ColorScaleCriterion Members

Microsoft.Office.Interop.Excel Namespace