Conditional formating in a Chart

O

Ola

Is there anyone who knows how to make conditional formating in a colum
chart. I want my positive observation to be blue and my negative red
Is this possible?

/Ol
 
N

Nicky

I don't think you can have conditional formatting in the chart itself.

However, this code sets the interior color of all series to "3" (re
in the default colo scheme) if its value is below 0, otherwise to "5".


Sub change_cols()

For Each ss In ActiveChart.SeriesCollection
values_array = ss.Values
For n = 1 To ss.Points.Count
If values_array(n) < 0 Then ss.Points(n).Interior.ColorIndex =
Else ss.Points(n).Interior.ColorIndex = 5
Next
Next
End Su
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top