Solved

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

Posted on 2012-12-29
3
182 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
  • 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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

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.

Question has a verified solution.

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

This tutorial explains how to create a series of drop-down lists that are dependent upon prior selections to guide (“force”) the user to make the correct selection and reduce data errors within Microsoft Excel. Excel 2010 was used for this tutorial;…
Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
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…
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

830 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