Hi there,

I am using a pivot chart, which is best for what I need. However, I am struggling with labelling. I am also working in Excel 2010, not 2013. Basically, I am trying to customise the labels to say something other than the off-the-shelf Category, Series or Value names.

I have a macro below which does roughly what I need. However, this alters the labels based on those which are visible on the pivot chart at the point the macro is triggered. It doesn't update the label for values that aren't being show in the Pivot Chart at. What I am hoping for is a macro that somehow will label all the points in the pivot table regardless of whether they are filtered or unfiltered, so that when called upon they display the right labels.

The label column is just one column, then same number of cells as the data series it is labelling.

Any help would be appreciated.

Please Login or Register  to view this content.
Sub AddXYLabels()
If Left(TypeName(Selection), 5) <> "Chart" Then
MsgBox "Please select the chart first."
Exit Sub
End If
Set StartLabel = Sheets("Sheet1").Range("I3")
Application.ScreenUpdating = False
For Each pt In ActiveChart.SeriesCollection(2).Points
pt.ApplyDataLabels xlDataLabelsShowValue
pt.DataLabel.Caption = StartLabel.Value
Set StartLabel = StartLabel.Offset(1)
Next
End Sub
Please Login or Register  to view this content.