Chart Title

Rossjp

Board Regular
Joined
Nov 14, 2005
Messages
67
Is there a way to have a chart title pick up the info from a cell on the spreadsheet? for example, I want the title to include a date entered into the chart as well as the name of the individual the spreadsheet contains.

Can anyone help me with this, please?

John
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
john.

welcome to the board!

try this code out -- i'm sorry that i don't know of another way to do this. let me know if you have any questions!

ben.
Code:
Sub CreateChartTitle()

    Dim MyChartTitle As String
    Dim MyChartTitleCell As Range

    Set MyChartTitleCell = Range("A1") '<--Change to your range
    MyChartTitle = MyChartTitle.Value

    With ActiveChart
        .HasTitle = True
        .ChartTitle.Characters.Text = MyChartTitle
    End With

End Sub
 
Upvote 0
review the excel help file entry for 'Link a chart title or text box to a worksheet cell'
 
Upvote 0
Rossjp said:
Is there a way to have a chart title pick up the info from a cell on the spreadsheet? for example, I want the title to include a date entered into the chart as well as the name of the individual the spreadsheet contains.

Suppose the date is in cell D2 and the name in E2. In F2 write a formula that concatenates this information into the label you need. Something like

=E2&CHAR(10)&"("&TEXT(D2,"DD-MMM-YY")&")"

Select the chart title so it has a thick gray border, press the = key, then click onto cell F2. The formula bar will indicate the link:

=Sheet1!$F$2

and the title will update when the contents of D2 and E2 change.
 
Upvote 0

Forum statistics

Threads
1,213,527
Messages
6,114,150
Members
448,552
Latest member
WORKINGWITHNOLEADER

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top