Solved

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

Posted on 2012-12-29
3
184 Views
Last Modified: 2013-01-03
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
Comment
Question by:AndreasHermle
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 43

Accepted Solution

by:
Saqib Husain, Syed earned 500 total points
ID: 38729102
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
 

Author Comment

by:AndreasHermle
ID: 38735701
Hi Syed:

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

Regards, Andreas
0
 

Author Closing Comment

by:AndreasHermle
ID: 38739283
Hi ssagibh:

great job. Thank you very much! Works great.

Regards, Andreas
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question