I would like to change the color of dots in top left part of the scatterplot. I wrote a macro, no errors occurred but the color did not change :/
Sub Kolorowanie()
ActiveSheet.ChartObjects("Chart 1").Activate
a = ActiveChart.SeriesCollection(1).Values
b = ActiveChart.SeriesCollection(1).XValues
For i = LBound(a) To UBound(a)
If a(i) < 0 And b(i) > 0 Then
ActiveSheet.ChartObjects("Chart 1").Activate
ActiveChart.SeriesCollection(1).Select
ActiveChart.SeriesCollection(1).Points(i).Select
With Selection.Format.Fill
.Visible = msoTrue
.ForeColor.RGB = RGB(255, 0, 0)
.Solid
End With
Else
End If
Next i
End Sub
Any ideas why it does not work?