Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Henry Boyd
 
Posts: n/a
Default Dynamically titling Excel charts

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
  #3   Report Post  
Andy Pope
 
Posts: n/a
Default

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

Henry Boyd wrote:
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


--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
EXCEL Hyperlink to Charts Questions.. URGENT.. =( kaci Excel Discussion (Misc queries) 4 August 1st 05 02:34 PM
Excel Charts Larry Excel Charts and Charting in Excel 1 July 30th 05 06:38 PM
My Y-axis label is cut off in Excel charts tex_brazil Charts and Charting in Excel 1 May 26th 05 12:25 PM
Displaying charts from excel 2003 in excel 2002? nick_h Excel Discussion (Misc queries) 0 May 9th 05 02:41 AM
Why will my Excel charts not print in color? cyncha Charts and Charting in Excel 2 December 5th 04 06:56 PM


All times are GMT +1. The time now is 10:54 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"