Peter -
It depends on a number of factors.
An XY series has its own numerical X values.
If the chart has a category axis, this variant array contains the category
labels:
vLabels = ActiveChart.Axes(xlCategory, xlPrimary).CategoryNames
I suppose you could compare vLabels to
vXValues = ActiveChart.SeriesCollection(1).XValues
which returns the X values but no information about the range containing
these values. If the series has no specified X values, the above simply
returns the array {1,2,3,...}. To extract the range, or to determine if the
X values are unspecified, you have to parse the series formula (or use John
Walkenbach's Chart Series class module:
http://www.j-walk.com/ss/excel/tips/tip83.htm)
In any case, the first series in the axis group supplies the CategoryNames
array. Series which go with category axes use the category names array, even
if they have different X values. In an XY chart, the X values of the first
series become the CategoryNames array, even though this is decoupled from
the axis scaling, and even though each series can have distinct X values
which are treated independently.
- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
http://PeltierTech.com
_______
"Peter T" <peter_t@discussions wrote in message
...
Hi All,
First to pre-empt confusion, there's a potential difference between terms
XValues and x-values in the following.
Typically series XValues are 1st or 2nd Category X-axis labels. However in
some types of charts the XValues are actual x-values, not labels.
In the chart wizard category labels are shown at the bottom of the dialog.
Labels are common to the chart rather than individual series. If a series
does not have its 'own' x-values it's XValues are labels related to its
AxisGroup (xlPrimary or xlSecondary).
X-values are shown in the box between Name & Y-Values, mid right of the
dialog (the box only appears if the series is capable of having its 'own'
x-values). These are unique to the series.
If a series has XValues I want to determine if these are its own x-values
as
distinct from common category labels.
Regards,
Peter T