A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Charts and Charting
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Walk over all the points in a series and extract the X value?



 
 
Thread Tools Display Modes
  #1  
Old August 14th, 2009, 09:13 AM posted to microsoft.public.excel.charting
Chrisso
external usenet poster
 
Posts: 92
Default Walk over all the points in a series and extract the X value?

Hi

I am using a standard clustered column chart in Excel 2003.

I would like to be able to walk over all the points in a series and
extract the X value for inspection.

Is this possible? I cannot see how to do this.

Thanks in advance,
Chrisso
  #2  
Old August 14th, 2009, 04:58 PM posted to microsoft.public.excel.charting
Chrisso
external usenet poster
 
Posts: 92
Default Walk over all the points in a series and extract the X value?

On 14 Aug, 09:13, Chrisso wrote:
Hi

I am using a standard clustered column chart in Excel 2003.

I would like to be able to walk over all the points in a series and
extract the X value for inspection.

Is this possible? I cannot see how to do this.

Thanks in advance,
Chrisso


I should have stated that I have the code to walk over the points - I
just cannot see how to extract the X value for each point:

Dim cht As Chart, ser As Series
Set cht = ActiveChart
Set ser = cht.SeriesCollection(1)
Dim pt As Point
For Each pt In ser.Points
' ## how do I get the X value for pt?
Next pt

Cheers
Chrisso
  #3  
Old August 14th, 2009, 06:11 PM posted to microsoft.public.excel.charting
Tushar Mehta
external usenet poster
 
Posts: 69
Default Walk over all the points in a series and extract the X value?

Use
Dim cht As Chart, ser As Series
Set cht = ActiveChart
Set ser = cht.SeriesCollection(1)
Dim I As Integer
For I = 1 To ser.Points.Count
Debug.Print I & ": " & ser.XValues(I)
Next I

On Fri, 14 Aug 2009 08:58:12 -0700 (PDT), Chrisso
wrote:

On 14 Aug, 09:13, Chrisso wrote:
Hi

I am using a standard clustered column chart in Excel 2003.

I would like to be able to walk over all the points in a series and
extract the X value for inspection.

Is this possible? I cannot see how to do this.

Thanks in advance,
Chrisso


I should have stated that I have the code to walk over the points - I
just cannot see how to extract the X value for each point:

Dim cht As Chart, ser As Series
Set cht = ActiveChart
Set ser = cht.SeriesCollection(1)
Dim pt As Point
For Each pt In ser.Points
' ## how do I get the X value for pt?
Next pt

Cheers
Chrisso

Regards,

Tushar Mehta
Microsoft MVP Excel 2000-present
www.tushar-mehta.com
Excel and PowerPoint tutorials and add-ins
  #4  
Old August 28th, 2009, 12:20 PM posted to microsoft.public.excel.charting
Chrisso
external usenet poster
 
Posts: 92
Default Walk over all the points in a series and extract the X value?

Thanks Tushar - just what I needed.

Chris

On 14 Aug, 18:11, Tushar Mehta ng-underscore-poster-at-tushar-hyphen-
mehta.see-oh-em wrote:
Use
* * Dim cht As Chart, ser As Series
* * Set cht = ActiveChart
* * Set ser = cht.SeriesCollection(1)
* * Dim I As Integer
* * For I = 1 To ser.Points.Count
* * * * Debug.Print I & ": " & ser.XValues(I)
* * * * Next I

On Fri, 14 Aug 2009 08:58:12 -0700 (PDT), Chrisso





wrote:
On 14 Aug, 09:13, Chrisso wrote:
Hi


I am using a standard clustered column chart in Excel 2003.


I would like to be able to walk over all the points in a series and
extract the X value for inspection.


Is this possible? I cannot see how to do this.


Thanks in advance,
Chrisso


I should have stated that I have the code to walk over the points - I
just cannot see how to extract the X value for each point:


* *Dim cht As Chart, ser As Series
* *Set cht = ActiveChart
* *Set ser = cht.SeriesCollection(1)
* *Dim pt As Point
* *For Each pt In ser.Points
* * * *' ## how do I get the X value for pt?
* *Next pt


Cheers
Chrisso


Regards,

Tushar Mehta
Microsoft MVP Excel 2000-presentwww.tushar-mehta.com
Excel and PowerPoint tutorials and add-ins- Hide quoted text -

- Show quoted text -


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


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


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