VBA & Macro Problems

Show Series Names on All Excel 2010 Chart Data Labels

Olivia MillerOlivia Miller Nov 27, 2026 870 views

Question details

Show series names on data labels for every series in the charts on an Excel 2010 worksheet.

Show Series Names on All Excel 2010 Chart Data Labels
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.
Before you start

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.

Solution 1Recommended

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.

1
Open the worksheet code window

Right-click the tab of the worksheet containing the charts and select View Code.

2
Paste the macro

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

3
Choose the label settings

In the pasted code, leave ShowSeriesName set to True. Change ShowValue to True if you also want each data value to appear.

4
Run the macro

Click anywhere inside the macro and press F5. Return to the worksheet and check the chart labels.

Apply series names to worksheet charts with VBA
Macro security: Run macros only from sources you trust. If Excel blocks the macro, review the workbook's security warning and macro settings before enabling it.
Free Microsoft Office alternative

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.

Create and edit charts in WPS SpreadsheetsOpen and save Microsoft Excel formats such as XLSXUse a familiar spreadsheet interface for an easier transitionWork with a free, lightweight Office suite
microsoft office alternative - wps office

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.