Vba change marker size and color in Excel

For example, I have a Chart ("Chart1") comparing the sales figures of 3 Salespersons - I want to set the Marker Size to "4", Marker Type to "Round" and Marker Line Color to "Black" for all the 3 series in Chart.

excel vba change marker size and color

To do it in Excel, here is the answer:

  1. Option Explicit
  2. Sub MarkerSettingsUpdate()
  3. Dim seriesChart As Series
  4. ''
  5. For Each seriesChart In ActiveSheet.ChartObjects("Chart1").Chart.SeriesCollection
  6. seriesChart.Select
  7. With Selection
  8. .MarkerStyle = 8
  9. .MarkerSize = 4
  10. .MarkerForegroundColor = RGB(0, 0, 0)
  11. End With
  12. ''
  13. Next seriesChart
  14. End Sub


a) Line 5 loops through all series in Chart1.

b) Line 8 , Line 9 and Line 10 sets the Marker properties for the selected series.

Result after Macro execution:

excel vba change marker size and color


You can find similar Excel Questions and Answer hereunder

1) How do i put double quotes in a string in vba in Excel

2) How can I list all files in a folder using VBA?

3) How do I copy a Table from one location to another and retain all formulas, formats and columnwidths?

4) How can I shade alternate rows in color using VBA to make it easier to read voluminous data running into hundreds of rows?

5) How can I save a WorkSheet as a new WorkBook using VBA?

6) How to create charts in Excel VBA

7) How do I add a symbol like Triangle / Inverted Triangle for indicating trends in a cell using VBA?

8) Here some explanations about the MSXML who stands for Microsoft XML core services

9) Vba list all files in a folder in Excel

10) How do I update my DropDown list whenever the sheet is activated?


Here the previous and next chapter