• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 193
  • Last Modified:

Add a term to all titles of all the charts on the active worksheet

Dear Experts:

I got more than 50 bar charts on the active worksheet (Excel 2010)

Is it possible by means of macro to alter the titles of these charts as follows:

- Go to the end of each title
- press Shift + Enter to enter a manual line break
- add the following term - New Grading System -

So, for example if one of the titles reads: 'Sales force Appraisal'
After running the macro it should read:

Sales force Appraisal
New Grading System

Help is much appreciated. Thank you very much in advance.

Regards, Andreas
0
Andreas Hermle
Asked:
Andreas Hermle
  • 2
1 Solution
 
Saqib Husain, SyedEngineerCommented:
Sub chttitles()
    For Each shp In ActiveSheet.Shapes
        If shp.Type = 3 Then
            shp.Chart.HasTitle = True
            shp.Chart.ChartTitle.Text = shp.Chart.ChartTitle.Text & Chr(10) & "New grading system"
        End If
    Next shp
End Sub
0
 
Andreas HermleTeam leaderAuthor Commented:
Hi Syed:

thank you very much for your great and professional help. Works like a charm.

Regards, Andreas
0
 
Andreas HermleTeam leaderAuthor Commented:
Hi ssagibh:

great job. Thank you very much! Works great.

Regards, Andreas
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now