Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default How do I return the values of a chart's data range?

See John Walkenbach's site:

http://j-walk.com/ss/excel/tips/tip83.htm
A Class Module to Manipulate a Chart SERIES
Excel's object model has a serious flaw: There is no direct way to to use
VBA to determine the ranges used in a chart. This tip contains a useful
class module that can simplify the task of manipulating chart's using VBA.

--
Regards,
Tom Ogilvy



Dave F wrote in message
...
Hi

Excel '2000 SR-1

I have a Line type chart embedded in a worksheet.
It has a single line of information (called a series I believe).

I know how to set the series data range (SetSourceData) , but I'm having a
lot of trouble getting the range.

Please point me in the correct direction.

Thanks in advance

Dave F.








  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 57
Default How do I return the values of a chart's data range?

In the trivial case, in which all series share the same X values and all
ranges (the X and all the Ys) are parallel, starting and ending at the
same row (if by columns, the same column if by rows), you can run
through John's class module, and use Union(Range1, Range2, ...) to get
the chart's data range. As soon as one series has a different X range,
or a different number of points, you can't even get the source data
range manually from the Source Data dialog. Instead, you are told "The
Chart Data Range is too complex to be displayed. If a new Data Range is
selected, it will replace all of the series on the Series Panel."

If you are defining the source data range yourself, why not define a
named range that refers to this range, and use this defined range in
your set source data command:

ChartObjects(1).Chart.SetSourceData _
Source:=Range("DataRange"), _
PlotBy:=xlColumns

where DataRange is the name of a dynamic range in the worksheet.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
http://www.geocities.com/jonpeltier/Excel/index.html
_______

Tom Ogilvy wrote:
See John Walkenbach's site:

http://j-walk.com/ss/excel/tips/tip83.htm
A Class Module to Manipulate a Chart SERIES
Excel's object model has a serious flaw: There is no direct way to to use
VBA to determine the ranges used in a chart. This tip contains a useful
class module that can simplify the task of manipulating chart's using VBA.

--
Regards,
Tom Ogilvy



Dave F wrote in message
...

Hi

Excel '2000 SR-1

I have a Line type chart embedded in a worksheet.
It has a single line of information (called a series I believe).

I know how to set the series data range (SetSourceData) , but I'm having a
lot of trouble getting the range.

Please point me in the correct direction.

Thanks in advance

Dave F.










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
How to return a range of values in a drop-down. Joe Excel Worksheet Functions 7 January 9th 10 06:32 PM
Can you make a chart's data *always* refer to a dynamic range name? Chrisso Charts and Charting in Excel 2 August 24th 07 12:30 PM
How do I use LOOKUP to return a range of values, then SUM values? irvine79 Excel Worksheet Functions 5 August 4th 06 01:33 PM
how do i return a range of values marcus Excel Discussion (Misc queries) 3 October 3rd 05 02:51 PM
how can i getting chart's sourcedate range classpeople Charts and Charting in Excel 1 June 16th 05 02:47 AM


All times are GMT +1. The time now is 03:18 AM.

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"