Peter Davison
Active Member
- Joined
- Jun 4, 2020
- Messages
- 451
- Office Version
- 365
- Platform
- Windows
I have a Pivot Table called PivotTable1
I have a chart called Cluster Review
The range is dynamic can be different by import
I want to add data labels to each series automatically (bearing in mind the number of series can change
I have seen this code that someone else used and have inserted my Table and Chart name
I am not sure what the [Project '#] bit is after the PivotTable1 name does or if it is part of the other guys table name?
It hasn't got a start and end sub because it is part of a larger macro.
ActiveSheet.ChartObjects("Cluster Overview").Activate
ActiveChart.FullSeriesCollection(1).DataLabels.Select
For i = 1 To Range("PivotTable1[Project '#]").Count
ActiveChart.FullSeriesCollection(1).Points(i).DataLabel.Select
Selection.Formula = Range("PivotTable1[Project '#]").Cells(i, 1)
Next i
Any help you can give will be great.
I have a chart called Cluster Review
The range is dynamic can be different by import
I want to add data labels to each series automatically (bearing in mind the number of series can change
I have seen this code that someone else used and have inserted my Table and Chart name
I am not sure what the [Project '#] bit is after the PivotTable1 name does or if it is part of the other guys table name?
It hasn't got a start and end sub because it is part of a larger macro.
ActiveSheet.ChartObjects("Cluster Overview").Activate
ActiveChart.FullSeriesCollection(1).DataLabels.Select
For i = 1 To Range("PivotTable1[Project '#]").Count
ActiveChart.FullSeriesCollection(1).Points(i).DataLabel.Select
Selection.Formula = Range("PivotTable1[Project '#]").Cells(i, 1)
Next i
Any help you can give will be great.