Hi I was wondering if anyone can help me out? I am trying to get a stacked bar chart to show the series name for each series as a data label. I have the code below, hwoever it generates all of the data labels as series names but groups them all together at the right hand side of the chart. I want to show the data label (shwoing the series name) on each element of the chart.
Cheers for any help in advance!
Cheers for any help in advance!
Code:
Option Explicit
Sub LastPointLabel()
Dim mySrs As Series
Dim nPts As Long
For Each mySrs In ActiveChart.SeriesCollection
With mySrs
nPts = .Points.Count
mySrs.ApplyDataLabels _
Type:=xlDataLabelsShowValue, _
AutoText:=True, LegendKey:=False
mySrs.Points(nPts).DataLabel.Text = mySrs.Name
End With
Next
End Sub