changing all bars within a bar graph to same color at once

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is there a way to change to the same color on all the bars within a chart at
the same time?
 
I assume you have a chart with more than one data series?
Experimentation seems to suggest the answer is NO, but of course all (many)
things are possible with VBA

This will make them all aqua

Sub MakeColor()
ActiveSheet.ChartObjects("Chart 1").Activate
myCount = ActiveChart.SeriesCollection.Count
For j = 1 To myCount
ActiveChart.SeriesCollection(j).Select
With Selection.Interior
.ColorIndex = 8
.Pattern = xlSolid
End With
Next j
End Sub


best wishes
 
Thanks - I'll try that!

Bernard Liengme said:
I assume you have a chart with more than one data series?
Experimentation seems to suggest the answer is NO, but of course all (many)
things are possible with VBA

This will make them all aqua

Sub MakeColor()
ActiveSheet.ChartObjects("Chart 1").Activate
myCount = ActiveChart.SeriesCollection.Count
For j = 1 To myCount
ActiveChart.SeriesCollection(j).Select
With Selection.Interior
.ColorIndex = 8
.Pattern = xlSolid
End With
Next j
End Sub


best wishes
 
Or change one, then without doing anything else, select the next series and press F4
to repeat, then continue with the select + F4 sequence until everything is changed.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
Tutorials and Custom Solutions
http://PeltierTech.com/
_______
 

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

Back
Top