VBA Code To Remove Line Series Markers From All Charts On Excel Spreadsheet

Excel Spreadsheet Graphs Delete Line Series Marker Icons

What This VBA Code Does

It happened again today....I received 10 Excel line charts that needed to be "properly" formatted for an executive presentation very quickly. The one major problem, all the charts had line markers on them that needed to be removed....and there were about 50 series in total to clean up.

This was going to be a tedious task that I most likely would have to repeat again down the road, so I threw on my headphones and started coding the following little macro to annihilate all those pesky little chart markers with the click of my mouse. Enjoy!

Sub Charts_RemoveMarkers()
'PURPOSE: Loop through every chart series and remove all line markers
'SOURCE: www.TheSpreadsheetGuru.com/the-code-vault

Dim cht As ChartObject
Dim srs As Series
Dim MarkerCount As Long

'Optimize Code
  Application.ScreenUpdating = False

'Loop Through Each Chart On Current Sheet
  For Each cht In ActiveSheet.ChartObjects
    'Activate Chart
      cht.Activate
    
    'Loop through each series and remove markers (if applicable)
      For Each srs In ActiveChart.SeriesCollection
         If srs.MarkerStyle <> xlMarkerStyleNone Then
          srs.MarkerStyle = xlMarkerStyleNone
          MarkerCount = MarkerCount + 1
        End If
      Next srs
  
  Next cht

'Turn Screen Back On
  Application.ScreenUpdating = True

'Report Results
  MsgBox "Successfully removed " & MarkerCount & " Marker(s) from your chart series!"

End Sub

How Do I Modify This To Fit My Specific Needs?

Chances are this post did not give you the exact answer you were looking for. We all have different situations and it's impossible to account for every particular need one might have. That's why I want to share with you: My Guide to Getting the Solution to your Problems FAST! In this article, I explain the best strategies I have come up with over the years to getting quick answers to complex problems in Excel, PowerPoint, VBA, you name it

I highly recommend that you check this guide out before asking me or anyone else in the comments section to solve your specific problem. I can guarantee 9 times out of 10, one of my strategies will get you the answer(s) you are needing faster than it will take me to get back to you with a possible solution. I try my best to help everyone out, but sometimes I don't have time to fit everyone's questions in (there never seem to be quite enough hours in the day!).

I wish you the best of luck and I hope this tutorial gets you heading in the right direction!

~ Chris