Get the axis label from a selected serie in a Chart

JuanPa

New Member
Joined
Jun 9, 2010
Messages
32
If I select a specific point from serie in a chart, I get three parameters:
- ElementID, the selected item, in my case, xlSeries
- Arg1, the SeriesIndex
- Arg2, the PointIndex

So, if I want to know the description of the Serie,
Code:
? ActiveChart.SeriesCollection(Arg1).Name
But, if I want to know the Axis description for this point, I suppose
Code:
? ActiveChart.SeriesCollection(Arg1).Points(Arg2).Name
My problem is that the result there is something like "S2P1" (Serie, Point).

How can I get the axis label for a selected point? Something more like "Europe" (category name). Thanks!
 
Last edited:

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
Hi
Welcome to the board

Try:

Code:
Dim vXValues As Variant
 
vXValues = ActiveChart.SeriesCollection(Arg1).XValues
 
MsgBox vXValues(Arg2)
 
Upvote 0

Forum statistics

Threads
1,215,038
Messages
6,122,798
Members
449,095
Latest member
m_smith_solihull

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