Use the following code to call the above procedure for each series in a given chart Sub Chart_AssignNameToCellBeforeYValues (cht As Chart) Dim srs As Series For Each srs In ActiveChartSeriesCollection Series_AssignNameToCellBeforeYValues srs Next End Sub Use this to assign names for the active chart Sub ActiveChart_AssignNameToCellBeforeYValues () If Not VBA loop through Chart series by Gergely Gy In this loop article let's see how you can loop through chart series To make my life easier I only modified the loop through Chart example As a quick recall summary if it is embedded to a sheet it's type is ChartObject In the example file you can find "chartSeriesNameAndFormulaDeleting Names in Excel VBA
How To Create A Dynamic Chart Range In Excel