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

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
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,516
Messages
6,125,285
Members
449,218
Latest member
Excel Master

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