Hi All,
How to get the selected series index number of a chart?
Thanks for the help,
Rgds,
Balumail75.
Printable View
Hi All,
How to get the selected series index number of a chart?
Thanks for the help,
Rgds,
Balumail75.
two ways you can check out and test:
Code:Sub dlah()
If TypeName(Selection) = "Series" Then
Set ch = ActiveChart.SeriesCollection
For I = 1 To ch.Count
If ch(I).Name = Selection.Name Then MsgBox "index is " & I
Next I
' also:
aa = Selection.Formula
bb = Mid(aa, InStrRev(aa, ",") + 1)
MsgBox "also, index is " & Left(bb, Len(bb) - 1)
End If
End Sub