ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Charts and Charting in Excel (https://www.excelbanter.com/charts-charting-excel/)
-   -   How to display the Chart Name as a Chart Title? (https://www.excelbanter.com/charts-charting-excel/254750-how-display-chart-name-chart-title.html)

EAS[_2_]

How to display the Chart Name as a Chart Title?
 
Is there a formula or way to display the Chart Name as a Chart Title. For
example if I am going to print a worksheet, I can print the Sheet name using
a header formula &[TAB].

Héctor Miguel

How to display the Chart Name as a Chart Title?
 
hi, !

Is there a formula or way to display the Chart Name as a Chart Title.
For example if I am going to print a worksheet, I can print the Sheet name using a header formula &[TAB].


put the name of the chart in a cell and "link" the chart title to that cell
(selecting the chart title and IN FORMULA BAR put '=' and point the cell)

to get the name of the chart in a cell...

op1: (vba) worksheets(1).chartobjects(1).name

op2: using xl4-macro functions
= create/define/... a named formula and *call* this name in "the cell"
name formula (to get the chart name in local language)
miChart1 =index(get.document(42,get.workbook(38+0*now())),1 )

formula (to get the chart name in english)
=get.object(51,index(get.document(42,get.workbook( 38+0*now())),1))

note the "index(...,1)" it is assumed the chart is the *first* embedded object in the worksheet
and... *IF* you assign the chart name by code, either named-forumula returns the same

hth,
hector.




All times are GMT +1. The time now is 04:33 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com