Share via


FormatConditions.AddColorScale Method

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.

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

Syntax

'Declaration
Function AddColorScale ( _
    ColorScaleType As Integer _
) As Object
'Usage
Dim instance As FormatConditions
Dim ColorScaleType As Integer
Dim returnValue As Object

returnValue = instance.AddColorScale(ColorScaleType)
Object AddColorScale(
    int ColorScaleType
)

Parameters

  • ColorScaleType
    Type: System.Int32

    The type of color scale.

Return Value

Type: System.Object
ColorScale object

Remarks

Color scales are visual guides that help you understand data distribution and variation. A color scale helps you identify relative differences in the values of cells in a given range by using color variation. Different colors and gradations between colors represent differences in cell values. For example, in a three-color scale, you can specify that cells with the highest relative data values are green, cells with intermediate values are yellow, and cells with the lowest values are red.

See Also

Reference

FormatConditions Interface

FormatConditions Members

Microsoft.Office.Interop.Excel Namespace