Chart SeriesCollection Names

E

EPL

Is there a way to check to see if a certain series has been displayed on a
chart? I have several data sets that can be plotted depending on a user
selection. I have 5 data sets to be plotted on the secondary Y axis, one of
which has a high maximum scale value. I want to check to see if this series
has been plotted and if so, delete it before plotting the others. It may not
really matter since the larger scale series will simply disappear off the
screen when the lower axis scale is set.
 
J

Joel

If you know where the source data is locted you can get each of the series
source data range and then use intersect to see if the series source address
falls into the range where the data is located. I can help if this is the
method you want to use.
 
J

Jon Peltier

Dim srs As Series
For Each srs In ActiveChart.SeriesCollection
If srs.Name = "Name of series I want to delete" Then
srs.Delete
End If
Next

- Jon
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top