How can i access to XValue & YValue for selected point?

aryan_hr

Board Regular
Joined
Feb 19, 2002
Messages
222
Dear Mr Excel (or Mr. Macro)

I am very glad that finally I could find a very good site about excel...........

I have written program in Excel(VBA). For my work I need to access to X value & Y value for a point in excel chart.
I know all the values in the series are in "AtiveChart.SeriesCollection(1).Values" and all x values for a chart series are in "AtiveChart.SeriesCollection(1).XValues", and also "Point(index)" represents a single point in a series in a chart.
But when I select a point (not select a chart) I can not access the its INDEX , its Value(Y) and its XValue(X).
How can I access them?

Thanks for your good site.
Best wishes for you and also Mr. Excel's


P.S.: Also I have sent this E-mail to consult@MrExcel.com
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
Values and XValues are properties of the Series object, which is an object of the SeriesCollection collection. These properties return or set an array of values or xvalues (not a single value). Remember that when you select a series, all points are selected, not being possible to select singular points.
On the other hand, by using Points method of the Series object, you access a singular point, based on an index as in:

SeriesCollection(1).Points(1)

I would recommend to use always Microsoft Visual Basic Help when in doubt or not clear how to access certain properties or methods of different objects. That is one of the biggest challenges in Excel programming.
 
Upvote 0

Forum statistics

Threads
1,214,648
Messages
6,120,726
Members
448,987
Latest member
marion_davis

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top