Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Add Series to a chart failure and Disappearing Series

I have an Excel 2000 macro that puts several series of XY data on a
scatter chart, and it then computes XY data too add a final series to the
chart. I originally tried to use the Add method of the SeriesCollection
object to add the final series. Since the number of points in the final
series is computed and is not known prior to run time, I counted the rows and
used:
Set rng = Sheets("New Data"). _
Range ("A1").Resize(norws,2)
rng.Name = "NewSer"
to name the range.
I then used the named range in the Source parameter of the Add method.
Instead of using the X data from the named range, the point numbers were
used. The Y values were correct. For example, if there were 8 points in
the new series with XValues ranging from 2.1 to 67.5, the XValues used by
Excel were the integers 1 to 8. I am guessing that Excel decided the new
series was a Line format instead of XY format. When I repeated code that
the chart was XYScatterLine, I got the Error Message "Parameter Not Found"
for the named range, "NewSer".
I decided to try the NewSeries method and assign the Values and XValues
as named ranges. This method works fine except that the last series of the
original data occasionally disappears when the new (final) series is added.
If I step through the code, the code always works as intended.
Can anyone explain this behavior for both the Add method and the New
Series method and suggest solutions?
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
excel chart maximum series should more than 255 series kameking Charts and Charting in Excel 5 August 22nd 10 10:52 AM
User Selectable Series and Number of Series for Line Chart Dave in NJ Charts and Charting in Excel 2 February 23rd 09 12:18 AM
how to plot column chart with one series against multiple series. svenkateshmurthy Charts and Charting in Excel 2 October 16th 07 09:09 PM
Disappearing SERIES() forumla in chart fruitticher Excel Worksheet Functions 0 September 18th 07 05:18 PM
chart data series -- plot a table as a single series hjc Charts and Charting in Excel 7 September 20th 05 05:52 PM


All times are GMT +1. The time now is 08:54 PM.

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

About Us

"It's about Microsoft Excel"