Created
May 10, 2019 13:27
-
-
Save andli/782a9ed47d29defa7061837bc0e19a7c to your computer and use it in GitHub Desktop.
Edit all data labels in an Excel graph to show series name
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sub datalabels() | |
For Each myChart In ActiveSheet.ChartObjects | |
For Each mySrs In myChart.chart.SeriesCollection | |
With mySrs | |
If Not .HasDataLabels Then | |
.ApplyDataLabels | |
End If | |
.datalabels.ShowSeriesName = True | |
.datalabels.ShowValue = False | |
End With | |
Next mySrs | |
Next myChart | |
End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment