Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro to find a charts data source
What property can I refer to in a macro to get the data source of a chart.
Any data source would do, be it a title or value anything that refers to one or some of the cells a chart gets it data from.. Thanks, Kevin |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro to find a charts data source
DataSeries is the plot values.
"Kevin" wrote: What property can I refer to in a macro to get the data source of a chart. Any data source would do, be it a title or value anything that refers to one or some of the cells a chart gets it data from.. Thanks, Kevin |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro to find a charts data source
Hi,
To discover the ranges used in a charts data series you would need to parse the Formula property of the series. John Walkenbach has a class for parsing the formula. http://spreadsheetpage.com/index.php..._chart_series/ Activechart.seriescollection(1).Formula which will return you something like this. =SERIES(Sheet1!$B$1,Sheet1!$A$2:$A$5,Sheet1!$B$2:$ B$5,1) You can read the .Values and .XValues of the series in to variant arrays. But this will be numbers not cell addresses. Cheers Andy -- Andy Pope, Microsoft MVP - Excel http://www.andypope.info "Kevin" wrote in message ... What property can I refer to in a macro to get the data source of a chart. Any data source would do, be it a title or value anything that refers to one or some of the cells a chart gets it data from.. Thanks, Kevin |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro to find a charts data source
THANK YOU!!!
I knew it had to be something simple. :-) Kevin "Andy Pope" wrote: Hi, To discover the ranges used in a charts data series you would need to parse the Formula property of the series. John Walkenbach has a class for parsing the formula. http://spreadsheetpage.com/index.php..._chart_series/ Activechart.seriescollection(1).Formula which will return you something like this. =SERIES(Sheet1!$B$1,Sheet1!$A$2:$A$5,Sheet1!$B$2:$ B$5,1) You can read the .Values and .XValues of the series in to variant arrays. But this will be numbers not cell addresses. Cheers Andy -- Andy Pope, Microsoft MVP - Excel http://www.andypope.info "Kevin" wrote in message ... What property can I refer to in a macro to get the data source of a chart. Any data source would do, be it a title or value anything that refers to one or some of the cells a chart gets it data from.. Thanks, Kevin |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Multiple charts from 1 source data | Charts and Charting in Excel | |||
Editing Source Data in Charts | Charts and Charting in Excel | |||
extending source data in several charts | Charts and Charting in Excel | |||
Macro to Update Charts Source Data | Charts and Charting in Excel | |||
Charts not recognizing source data if original linked data is changed. | Charts and Charting in Excel |