Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.charting
|
|||
|
|||
Finding series index if I know the Series Name
I have the following code to find the series index #, but it's not working.
What am I doing wrong. Dim Series As Series Dim SeriesNum As Integer Dim SeriesName As String SeriesName = "Y axis Labels" Debug.Print CHARTNAME.SeriesCollection.Count For Each Series In CHARTNAME.SeriesCollection 'On Error Resume Next Debug.Print Series.Name Debug.Print Series.Index <~~~~it doesn't like this. If Series.Name = SeriesName Then Debug.Print Series.Index Exit For End If Next Series Thanks! |
#2
Posted to microsoft.public.excel.charting
|
|||
|
|||
Finding series index if I know the Series Name
Hi,
There is no index property. You would need to increment your own counter. The order is dependent on 3 things. ChartType, Plot/Series Order and Axis. What exactly are you trying to achieve? Cheers Andy Barb Reinhardt wrote: I have the following code to find the series index #, but it's not working. What am I doing wrong. Dim Series As Series Dim SeriesNum As Integer Dim SeriesName As String SeriesName = "Y axis Labels" Debug.Print CHARTNAME.SeriesCollection.Count For Each Series In CHARTNAME.SeriesCollection 'On Error Resume Next Debug.Print Series.Name Debug.Print Series.Index <~~~~it doesn't like this. If Series.Name = SeriesName Then Debug.Print Series.Index Exit For End If Next Series Thanks! -- Andy Pope, Microsoft MVP - Excel http://www.andypope.info |
#3
Posted to microsoft.public.excel.charting
|
|||
|
|||
Finding series index if I know the Series Name
You could also try the .PlotOrder of the series.
- Jon ------- Jon Peltier, Microsoft Excel MVP Tutorials and Custom Solutions http://PeltierTech.com _______ "Andy Pope" wrote in message ... Hi, There is no index property. You would need to increment your own counter. The order is dependent on 3 things. ChartType, Plot/Series Order and Axis. What exactly are you trying to achieve? Cheers Andy Barb Reinhardt wrote: I have the following code to find the series index #, but it's not working. What am I doing wrong. Dim Series As Series Dim SeriesNum As Integer Dim SeriesName As String SeriesName = "Y axis Labels" Debug.Print CHARTNAME.SeriesCollection.Count For Each Series In CHARTNAME.SeriesCollection 'On Error Resume Next Debug.Print Series.Name Debug.Print Series.Index <~~~~it doesn't like this. If Series.Name = SeriesName Then Debug.Print Series.Index Exit For End If Next Series Thanks! -- Andy Pope, Microsoft MVP - Excel http://www.andypope.info |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Chart -- Source Data... -- Series dialog window | Charts and Charting in Excel | |||
Help needed in finding specific series via row. | Excel Worksheet Functions | |||
finding the row index for the last value > than some value | Excel Worksheet Functions | |||
How to change Series order in a Combination Chart? | Charts and Charting in Excel | |||
series graph -- one series being added to another series | Charts and Charting in Excel |