XY marker change for entire workbook

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

Guest

Is there a way to change the markers for data series across several charts
within a workbook? I have been given A LOT of charts to make consistent and
was wondering is there is a way to apply a certain marker style to an entire
data series across several charts. Each chart is made from one data sheet in
the workbook, but placed on a separate page within the workbook.
 
You would need to use a macro to loop through the charts, changing the
markers. For example

Sub ChangeMarkers()
Dim cht As Chart
Dim srs As Series
For Each cht In ActiveWorkbook.Charts
For Each srs In cht.SeriesCollection
Select Case srs.Name
' add cases and marker info here based on series name
Case "Alpha"
srs.MarkerStyle = xlMarkerStyleSquare
srs.MarkerBackgroundColorIndex = 3
srs.MarkerForegroundColorIndex = 3
Case "Beta"
srs.MarkerStyle = xlMarkerStyleTriangle
srs.MarkerBackgroundColorIndex = 5
srs.MarkerForegroundColorIndex = 5
End Select
Next
Next
End Sub

- Jon
 
YIKES!
thank you for the information.

Jon Peltier said:
You would need to use a macro to loop through the charts, changing the
markers. For example

Sub ChangeMarkers()
Dim cht As Chart
Dim srs As Series
For Each cht In ActiveWorkbook.Charts
For Each srs In cht.SeriesCollection
Select Case srs.Name
' add cases and marker info here based on series name
Case "Alpha"
srs.MarkerStyle = xlMarkerStyleSquare
srs.MarkerBackgroundColorIndex = 3
srs.MarkerForegroundColorIndex = 3
Case "Beta"
srs.MarkerStyle = xlMarkerStyleTriangle
srs.MarkerBackgroundColorIndex = 5
srs.MarkerForegroundColorIndex = 5
End Select
Next
Next
End Sub

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