Paste Method (SeriesCollection Collection)

Applies To

SeriesCollection collection object.

Description

Pastes data from the Clipboard into the specified series collection.

Syntax

expression.Paste(Rowcol, SeriesLabels, CategoryLabels, Replace, NewSeries)

expression Required. An expression that returns a SeriesCollection object.

Rowcol Optional Variant. Specifies whether the values corresponding to a particular data series are in rows or columns. Can be one of the following XlRowCol constants: xlRows or xlColumns. The default value is xlColumns.

SeriesLabels Optional Variant. True to use the contents of the cell in the first column of each row (or the first row of each column) as the name of the data series in that row (or column). False to use the contents of the cell in the first column of each row (or the first row of each column) as the first data point in the data series. The default value is False.

CategoryLabels Optional Variant. True to use the contents of the first row (or column) of the selection as the categories for the chart. False to use the contents of the first row (or column) as the first data series in the chart. The default value is False.

Replace Optional Variant. True to apply categories while replacing existing categories with information from the copied range. False to insert new categories without replacing any old ones. The default value is True.

NewSeries Optional Variant. True to paste the data as a new series. False to paste the data as new points in an existing series. The default value is True.

See Also

Add method (SeriesCollection collection), ChartWizard method, Copy method, Cut method, Extend method.

Example

This example copies data to the Clipboard from cells C1:C5 on Sheet1 and then pastes the data into Chart1 as a new series.

Worksheets("Sheet1").Range("C1:C5").Copy
Charts("Chart1").SeriesCollection.Paste