PDA

View Full Version : Changing Chart Titles



Bigbaddaboom
07-01-2011, 02:28 AM
Hello everyone,

I have a number of charts in a workbook and i am looking to change one word in each title to another.

The titles currently include the word "Written" and i would like to replace them with the word "Earned".

Unfortunately the word "Written" does not apear in exactly the same position in each chart title.

Could anyone help?

Many thanks in advance.

Bob Phillips
07-01-2011, 03:35 AM
Dim ws As Worksheet
Dim ch As ChartObject

With ActiveWorkbook

For Each ws In .Worksheets

For Each ch In ws.ChartObjects

ch.Chart.ChartTitle.Text = Replace(ch.Chart.ChartTitle.Text, "Written", "Earned")
Next ch
Next ws
End With