Dynamically titling Excel charts

H

Henry Boyd

I am creating a spreadsheet tool that will be distributed as a template.
The output will be a chart that will graphically show the performance of a
particular quote. I would like the title of the chart to be driven by the
contents of one of spreadsheet cells. Is that possible?

TIA

Henry Boyd
 
T

Tushar Mehta

I am creating a spreadsheet tool that will be distributed as a template.
The output will be a chart that will graphically show the performance of a
particular quote. I would like the title of the chart to be driven by the
contents of one of spreadsheet cells. Is that possible?

TIA

Henry Boyd
See Dynamic Chart Title
http://www.tushar-
mehta.com/excel/newsgroups/dynamic_chart_title/index.html

--
Regards,

Tushar Mehta
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions
 
A

Andy Pope

Hi,

Maybe something like this VBA code.

Sub DynamicChartTitle()
Dim rngTitleText As Range

Set rngTitleText = ActiveSheet.Range("D7")
With ActiveChart
.HasTitle = True
.ChartTitle.Text = "='" & rngTitleText.Parent.Name & "'!" & _
rngTitleText.Address(ReferenceStyle:=xlR1C1)
End With
End Sub

Cheers
Andy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top