FormatConditions.AddColorScale Method (Excel)

Office 2013 and later
GitHub-Mark-64px

Contribute to this content

Use GitHub to suggest and submit changes. See our guidelines for contributing to VBA documentation.

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.

expression .AddColorScale(ColorScaleType)

expression A variable that represents a FormatConditions object.

Parameters

Name

Required/Optional

Data Type

Description

ColorScaleType

Required

Long

The type of color scale.

Return Value

ColorScale object

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.

Show: