Show Series Names on All Excel 2010 Chart Data Labels
Question details
Show series names on data labels for every series in the charts on an Excel 2010 worksheet.

- Product
- Microsoft Excel 2010
- Device & OS
- not provided
- Scenario
- A worksheet contains multiple charts whose data labels need to display their series names.
- Observed behavior
- Excel normally requires data label options to be configured one series at a time; the goal is to apply the setting across the worksheet.
Open the worksheet containing the embedded charts and make sure its series have the names you want to display. Save the workbook as an Excel Macro-Enabled Workbook (.xlsm) if you want to keep the macro.
Apply series names to worksheet charts with VBA
Use this macro to update all series in embedded charts on the worksheet at once.
The macro applies data labels, shows the series name, and hides the value for each series. It processes embedded charts on the worksheet, not separate chart sheets.
Right-click the tab of the worksheet containing the charts and select View Code.
Paste this code into the worksheet code window: Sub ShowSeriesNamesOnCharts() Dim chartObj As ChartObject Dim chartSeries As Series For Each chartObj In Me.ChartObjects For Each chartSeries In chartObj.Chart.SeriesCollection chartSeries.ApplyDataLabels chartSeries.DataLabels.ShowSeriesName = True chartSeries.DataLabels.ShowValue = False Next chartSeries Next chartObj End Sub
In the pasted code, leave ShowSeriesName set to True. Change ShowValue to True if you also want each data value to appear.
Click anywhere inside the macro and press F5. Return to the worksheet and check the chart labels.

Set series names on each chart series manually
Use Excel's label options when you only have a few series to update or cannot run macros.
Work with spreadsheet charts in WPS Office
WPS Office is a free, lightweight Office alternative with a familiar interface and compatibility with Excel files, making it easy to move existing spreadsheets into WPS. It does not change Excel 2010's chart label settings.

Frequently Asked Questions
Can I show both the series name and the value?
Yes. In the macro, change chartSeries.DataLabels.ShowValue to True. For a manual update, select both Series Name and Value under Format Data Labels > Label Options.
Does the macro update charts on other worksheets?
No. Because it uses Me.ChartObjects, it updates embedded charts only on the worksheet whose code window contains the macro. Paste and run it in another worksheet's code window to update that sheet.
Will the macro update a separate chart sheet?
No. The macro loops through embedded ChartObjects on a worksheet; a separate chart sheet requires different VBA code or a manual label update.
How do I keep the macro in my workbook?
Use File > Save As and select Excel Macro-Enabled Workbook (.xlsm). A standard .xlsx file cannot retain VBA macros.




