Extend Method

Applies To

SeriesCollection Collection.

Description

Adds new data points to an existing series collection.

Syntax

object.Extend(source, rowcol, categoryLabels)

object

Required. The SeriesCollection object.

source

Required. Specifies the new data to be added to the SeriesCollection object, either as a Range or an array of data points.

rowcol

Optional. Specifies whether the new values are in the rows (xlRows) or columns (xlColumns) of the given range source. If this argument is omitted, Microsoft Excel attempts to determine where the values are by the size and orientation of the selected range or dimensions of the array. This argument is ignored if the source data is in an array.

categoryLabels

Optional. Ignored if source is an array. True if the first row or column contains the name of the category labels. False if the first row or column contains the first data point of the series. If this argument is omitted, Microsoft Excel attempts to determine the category label location from the contents of the first row or column.

See Also

Add Method (SeriesCollection Collection).

Example

This example extends the series on Chart1 by adding the data in cells B1:B6 on Sheet1.


Charts("Chart1").SeriesCollection.Extend _
        source:=Worksheets("Sheet1").Range("B1:B6")