+ Reply to Thread
Results 1 to 4 of 4

Add / Edit Chart Title while using Macros

  1. #1
    Registered User
    Join Date
    04-10-2012
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    2

    Add / Edit Chart Title while using Macros

    Hi everyone,

    I am desperate for help and really hoping someone will be able to shed some light on this for me.
    I'm new to Excel so be gentle please.

    I have to create a Macro for a basic year to date sales chart.

    For some reason it wont let me change the "chart title" while recording.
    Everything else works great.

    Am I doing something wrong ?
    Can you suggest anything I can try to get it to work ?

    Thanks.

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Add / Edit Chart Title while using Macros

    Hi,

    I don't seem to find that limitation. However the code you may want is

    Please Login or Register  to view this content.
    Alternatively you can link the chart title to a cell. Select the chart title box and in the formula bar enter =A1 (or whatever cell holds the title). This will avoid the need for macro code unless of course you want to use a macro to change the A1 variable cell.
    Last edited by Paul; 04-10-2012 at 08:28 AM.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Registered User
    Join Date
    04-10-2012
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Add / Edit Chart Title while using Macros

    Thank you so much for the response Richard, much appreciated.

    So there is a way to do it without having to play with the code ?
    I must be trying to do it the wrong way or something.

    I've just noticed something else on there that I'm going to try.
    Hopefully that will be the correct way to do it and I can breathe a sigh of relief.

    Thanks again.

  4. #4
    Spammer
    Join Date
    01-26-2010
    Location
    Worcester MA
    MS-Off Ver
    Excel 2003
    Posts
    184

    Re: Add / Edit Chart Title while using Macros

    Richard didn't tell you how to link a chart text element to a cell. Here's the trick, which works for chart titles, axis titles, data labels, and text boxes.

    Select the text element so it is highlighted but not in edit mode. Click in the formula bar, type =, then click on the cell and press Enter. You will get a formula like:

    =Sheet1!$A$1

    You can only have a link to a single cell, not formulas that do computations.
    Jon Peltier
    http://PeltierTech.com/

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1