Version

AddColorScaleCondition Method

Adds a new ColorScaleConditionalFormat instance to this collection.
Syntax
'Declaration
 
Public Function AddColorScaleCondition( _
   ByVal regionAddress As String, _
   ByVal colorScaleType As ColorScaleType _
) As ColorScaleConditionalFormat
public ColorScaleConditionalFormat AddColorScaleCondition( 
   string regionAddress,
   ColorScaleType colorScaleType
)

Parameters

regionAddress
A string identifying the region to which this conditional format applies.
colorScaleType
A ColorScaleType value which determines whether to add a 2-color or 3-color scale.

Return Value

The resulting ColorScaleConditionalFormat instance.
Remarks

Note that when TwoColor is specified as the value of the colorScaleType parameter, the MidpointThreshold property is not applicable; attempting to set properties on the object returned from that property causes an exception to be thrown.

The ColorScaleConditionalFormat.MinimumThreshold and MaximumThreshold properties can be used to customize the coloring and threshold boundaries for the minimum and maximum points of the associated range.

For a 3-color scale, the MidpointThreshold can also be used to customize the midpoint threshold boundary.

Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also