title | keywords | f1_keywords | api_name | ms.assetid | ms.date | ms.localizationpriority | ||
---|---|---|---|---|---|---|---|---|
Series.InvertColor property (Excel) |
vbaxl10.chm578126 |
|
|
889cef2a-8211-c1b2-0668-8e0c48a894ec |
05/11/2019 |
medium |
Returns or sets the fill color for negative data points in a series. Read/write.
expression.InvertColor
expression A variable that represents a Series object.
Integer
The InvertColor property enables you to set the fill color for negative data points as a specific numeric, hexadecimal, octal, or RGB color value. To set the value as an RBG value, use the Visual Basic RGB function.
Instead of using the InvertColor property, you can use the InvertColorIndex property, which uses a simplier set of integer values from the current color palette.
For the InvertColor property to have an effect, the InvertIfNegative property of the Series object must also be set to True.
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).InvertColor = RGB(255, 0, 255)
[!includeSupport and feedback]