Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
excel chart maximum series should more than 255 series | Charts and Charting in Excel | |||
User Selectable Series and Number of Series for Line Chart | Charts and Charting in Excel | |||
how to plot column chart with one series against multiple series. | Charts and Charting in Excel | |||
Disappearing SERIES() forumla in chart | Excel Worksheet Functions | |||
chart data series -- plot a table as a single series | Charts and Charting in Excel |