이 페이지가 유용했습니까?
이 콘텐츠에 대한 여러분의 의견은 중요합니다. 의견을 알려주십시오.
추가 의견
1500자 남음
내보내기(0) 인쇄
모두 확장

SeriesCollection.Add Method (Excel)

Office 2010

Adds one or more new series to the SeriesCollection collection.

.Add(Source, Rowcol, SeriesLabels, CategoryLabels, Replace)

A variable that represents a SeriesCollection object.

Parameters

Name

Required/Optional

Data Type

Description

Source

필수

Variant

The new data as a Range object.

Rowcol

선택

XlRowCol

. Specifies whether the new values are in the rows or columns of the specified range.

SeriesLabels

선택

Variant

True if the first row or column contains the name of the data series. 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 location of the series name from the contents of the first row or column.

CategoryLabels

선택

Variant

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 location of the category label from the contents of the first row or column.

Replace

선택

Variant

If CategoryLabels is True and Replace is True, the specified categories replace the categories that currently exist for the series. If Replace is False, the existing categories will not be replaced. The default value is False.

Return Value

A Series object that represents the new series.

This method does not actually return a Series object as stated in the Object Browser. This method is not available for PivotChart reports.

This example creates a new series in Chart1. The data source for the new series is range B1:B10 on Sheet1.

Charts("Chart1").SeriesCollection.Add _ 
 Source:=ActiveWorkbook.Worksheets("Sheet1").Range("B1:B10")

This example creates a new series on the embedded chart on Sheet1.

Worksheets("Sheet1").ChartObjects(1).Activate 
ActiveChart.SeriesCollection.Add _ 
 Source:=Worksheets("Sheet1").Range("B1:B10")
표시:
© 2015 Microsoft