Hi

I have charts created in Powerpoint (not Excel) using one series with 6 data points. I want to conditional format those bars for each data point based on whether the value for each data point/bar is positive (set to green) or negative (set to red).


I have several charts across multiple sheets that I would like to apply this to but can't get beyond the first stage. The following codes lets me set the colours when selecting a single chart so I know how to set the colours but not how to do the evaluation:


Sub Testbarcolour()
Dim p As Point
Dim s As Series
Dim c As Chart


Set c = ActiveWindow.Selection.ShapeRange(1).Chart
Set s = c.SeriesCollection(1)


With s
    .Points(1).Format.Fill.ForeColor.RGB = RGB(0, 176, 240)
    .Points(2).Format.Fill.ForeColor.RGB = RGB(0, 88, 240)

    .Points(6).Format.Fill.ForeColor.RGB = RGB(0, 176, 240)
   End With


End Sub
I tried to add in the evaluation like this line but it does not work

If .Values(1) > 0 Then .Points(1).Format.Fill.ForeColor.RGB = RGB(25, 176, 24)
Would be great if someone can help with this.

Thanks

Hamond