Skip to content

Latest commit

 

History

History
52 lines (30 loc) · 1.63 KB

Excel.Series.InvertColorIndex.md

File metadata and controls

52 lines (30 loc) · 1.63 KB
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
Series.InvertColorIndex property (Excel)
vbaxl10.chm578127
vbaxl10.chm578127
Excel.Series.InvertColorIndex
fa2e87a4-57ad-395d-b631-fbca99560dae
05/11/2019
medium

Series.InvertColorIndex property (Excel)

Returns or sets the fill color for negative data points in a series. Read/write.

Syntax

expression.InvertColorIndex

expression A variable that represents a Series object.

Return value

Integer

Remarks

The InvertColorIndex property enables you to set the fill color for negative data points as a color index value from 0 to 56. For more information about color index values, see Adding color to Excel 2007 worksheets by using the ColorIndex property.

Instead of using the InvertColorIndex property, you can use the InvertColor property, which enables you to set the color as a specific numeric, hexadecimal, octal, or RGB color value.

For the InvertColorIndex property to have an effect, the InvertIfNegative property of the Series object must also be set to True.

Example

The following code example sets the fill color of negative data points in the first series of Chart 2 to magenta.

ActiveSheet.ChartObjects("Chart 2").Activate 
ActiveChart.SeriesCollection(1).InvertIfNegative = True 
ActiveChart.SeriesCollection(1).InvertColorIndex = 7

[!includeSupport and feedback]