PaulClarke
New Member
- Joined
- Aug 13, 2021
- Messages
- 2
- Office Version
- 2019
- Platform
- Windows
I need to automate the operation described in the Microsoft Support page Rename a data series
I need to do this only on Box and Whisker charts.
For example:
To get from the chart above to the chart below is easily performed manually
Recording a macro of the operation of that example gives:
*****
Sub Macro3()
' Macro3 Macro
ActiveChart.FullSeriesCollection(2).Select
Application.CutCopyMode = False
ActiveChart.FullSeriesCollection(1).Name = "=""1"""
ActiveChart.FullSeriesCollection(2).Name = "=""2"""
ActiveChart.FullSeriesCollection(3).Name = "=""3"""
End Sub
*****
When played back, the macro does not complete (it hangs part way through).
This example includes only 3 values. My projects involve dozens of values to rename in the same B&W chart - in order to reduce the size of the legend (deleting the repetition of the word ‘Series’) – and many, many charts.
If anyone can help with a macro that works, I can then add lines of code to handle the repetitions.
Here's hoping !
With thanks,
Paul
I need to do this only on Box and Whisker charts.
For example:
To get from the chart above to the chart below is easily performed manually
Recording a macro of the operation of that example gives:
*****
Sub Macro3()
' Macro3 Macro
ActiveChart.FullSeriesCollection(2).Select
Application.CutCopyMode = False
ActiveChart.FullSeriesCollection(1).Name = "=""1"""
ActiveChart.FullSeriesCollection(2).Name = "=""2"""
ActiveChart.FullSeriesCollection(3).Name = "=""3"""
End Sub
*****
When played back, the macro does not complete (it hangs part way through).
This example includes only 3 values. My projects involve dozens of values to rename in the same B&W chart - in order to reduce the size of the legend (deleting the repetition of the word ‘Series’) – and many, many charts.
If anyone can help with a macro that works, I can then add lines of code to handle the repetitions.
Here's hoping !
With thanks,
Paul