Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default Codename equivalent for Series


I am trying to get something like this, which obviously
fails

Sname = ActiveChart.SeriesCollection(1).CodeName

In a new unmodified chart I would expect Sname to
be "Series1". But if say Series1 has been deleted Sname
might be "Series2". I just need the number in this string.

If the Series is selected the series number (not
necessarily same as index) can be obtained with an Excel4
macro (thanks Stephen Bullen). However I am looking for
an equivalent without having to select the series.

There seems to be some similarity in the way Excel manages
both Worksheets and Series as regards to Index, Name and
CodeName. Except of course CodeName doesn't apply for
Series, but I guess something similar must be lurking.

Having searched this NG I'm not optimistic but would be
delighted if anyone has a solution.

TIA
Sandy

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 20
Default Codename equivalent for Series

Sandy,
I'm not positive here, but I just hit "F1" while the cursor was on
SeriesCollection, and from the help file, activechart.seriescollection(1)
returns you a Series object, which has a Name property,ie
Sname = ActiveChart.SeriesCollection(1).Name, but this seems to be the only
identifier type property for the series object.

hth.


--

__________________________________________________ __________________________
________________
Please reply to newsgroup so everyone can benefit.
Email address is not valid (see sparkingwire.com)
__________________________________________________ __________________________
________________

"Sandy V" wrote in message
...

I am trying to get something like this, which obviously
fails

Sname = ActiveChart.SeriesCollection(1).CodeName

In a new unmodified chart I would expect Sname to
be "Series1". But if say Series1 has been deleted Sname
might be "Series2". I just need the number in this string.

If the Series is selected the series number (not
necessarily same as index) can be obtained with an Excel4
macro (thanks Stephen Bullen). However I am looking for
an equivalent without having to select the series.

There seems to be some similarity in the way Excel manages
both Worksheets and Series as regards to Index, Name and
CodeName. Except of course CodeName doesn't apply for
Series, but I guess something similar must be lurking.

Having searched this NG I'm not optimistic but would be
delighted if anyone has a solution.

TIA
Sandy



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default Codename equivalent for Series

Hi Mike,

Thanks for replying. Unfortunately the series name is not
what I need.

Sname = ExecuteExcel4Macro("SELECTION()")
This XLM would return "S1" if the first original and
entire series is selected.

Typically "S1" would refer to Series(1) but not
necessarily, an observation pointed out by Jon Peltier.
I could work with series names if they were guaranteed
unique, but they are not.

To side-track, the same macro is suggested to advise users
of the selected series & point (eg "S1S4"). Whilst it
returns the correct point, the returned series index might
not be correct.

I still think a static object identifier (if that's the
right term) must exist for each series. I have
studied "Macrofun.hlp" re this and other XLM's for clues
but to no avail (a quick search finds MS's download link
for this help file).

The XLM gets what I want but only if selected.
But how does it get that identifier!

With regards,
Sandy

PS I've been monitoring but only just seen your reply
today (25th) although it's dated the 22nd, odd. I
received a "friendly notification" of it from "Developers
Dex", as I have sometimes in the past, first time one has
been useful!

-----Original Message-----
Sandy,
I'm not positive here, but I just hit "F1" while the

cursor was on
SeriesCollection, and from the help file,

activechart.seriescollection(1)
returns you a Series object, which has a Name property,ie
Sname = ActiveChart.SeriesCollection(1).Name, but this

seems to be the only
identifier type property for the series object.

hth.


--

_________________________________________________ _________

__________________
________________
Please reply to newsgroup so everyone can benefit.
Email address is not valid (see sparkingwire.com)
_________________________________________________ _________

__________________
________________

"Sandy V" wrote in message
...

I am trying to get something like this, which obviously
fails

Sname = ActiveChart.SeriesCollection(1).CodeName

In a new unmodified chart I would expect Sname to
be "Series1". But if say Series1 has been deleted Sname
might be "Series2". I just need the number in this

string.

If the Series is selected the series number (not
necessarily same as index) can be obtained with an

Excel4
macro (thanks Stephen Bullen). However I am looking for
an equivalent without having to select the series.

There seems to be some similarity in the way Excel

manages
both Worksheets and Series as regards to Index, Name and
CodeName. Except of course CodeName doesn't apply for
Series, but I guess something similar must be lurking.

Having searched this NG I'm not optimistic but would be
delighted if anyone has a solution.

TIA
Sandy



.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 20
Default Codename equivalent for Series

Hi Sandy,

perhaps you can use a for each... next loop to loop through each series,
select it, and then run the xlm macro on each of the series?

Beyond that, I don't think I can help you, perhaps one of the real gurus out
there can.


"Sandy V" wrote in message
...
Hi Mike,

Thanks for replying. Unfortunately the series name is not
what I need.

Sname = ExecuteExcel4Macro("SELECTION()")
This XLM would return "S1" if the first original and
entire series is selected.



Typically "S1" would refer to Series(1) but not
necessarily, an observation pointed out by Jon Peltier.
I could work with series names if they were guaranteed
unique, but they are not.

To side-track, the same macro is suggested to advise users
of the selected series & point (eg "S1S4"). Whilst it
returns the correct point, the returned series index might
not be correct.

I still think a static object identifier (if that's the
right term) must exist for each series. I have
studied "Macrofun.hlp" re this and other XLM's for clues
but to no avail (a quick search finds MS's download link
for this help file).

The XLM gets what I want but only if selected.
But how does it get that identifier!

With regards,
Sandy

PS I've been monitoring but only just seen your reply
today (25th) although it's dated the 22nd, odd. I
received a "friendly notification" of it from "Developers
Dex", as I have sometimes in the past, first time one has
been useful!



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
string to codename rk0909 Excel Discussion (Misc queries) 4 September 25th 08 10:57 PM
EQUIVALENT for this FORMULA , please ytayta555 Excel Worksheet Functions 1 July 3rd 08 10:25 PM
Series equivalent in Excel 2000 Gert Charts and Charting in Excel 2 March 4th 06 12:34 PM
series graph -- one series being added to another series rich zielinski via OfficeKB.com Charts and Charting in Excel 3 March 30th 05 06:23 PM
Referencing worksheet CODENAME in a chart object. Bing Excel Discussion (Misc queries) 1 February 15th 05 01:01 AM


All times are GMT +1. The time now is 05:39 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"