Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 34
Default Using SeriesCollection.Extend for a specific Chart Data Series

I have been trying to extend only the second data series in an XY
Scatterchart that has three series in it using the SeriesCollection.Extend
method. The VBA code extends all the data series with the new data, not
just the 2nd series that I want to extend.

My data is laid out in a worksheet called "Sheet1" with the X values in
Column A and the Y values in Column B. Let's assume that Series1 has its
values in rows 1 to 5, Series2 has its values in rows 6 to 10, and Series3
has its values in rows 11 to 15. These values are already charted in a
Chart Sheet called Chart1.

Now I want to use VBA to extend my existing chart. I want to extend Series2
by adding the values in rows 16 to 20. I use the following macro:

Sub TestExtend()

Charts("Chart1").SeriesCollection(2).Select
ActiveChart.SeriesCollection.Extend _
Worksheets("Sheet").Range("A16:B20"), xlColumns, True

End Sub

However, this macro extends all three existing series (1, 2, and 3) with the
new data, not just Series2 as I wanted.

Any ideas?

Please note: I have already determined that the Extend method will only work
with a range and not with an array value so the first three dataseries must
have been entered as ranges, either programmatically or via the Chart ...
Source Data ... Add dialog box.

Thanks,

Frank




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
Extend series using ref cell formula transposed Gnomie Excel Worksheet Functions 10 February 28th 08 04:34 PM
Extend series Traci Excel Worksheet Functions 5 June 17th 06 03:32 AM
chart data series -- plot a table as a single series hjc Charts and Charting in Excel 7 September 20th 05 05:52 PM
How do I color specific data series based on location on data she Havard Charts and Charting in Excel 1 July 1st 05 02:06 PM
how do i extend the series of a portion of a formula? fraustrated Excel Worksheet Functions 2 April 21st 05 10:07 PM


All times are GMT +1. The time now is 03:37 AM.

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"