Range.DataSeries method (Excel)
Creates a data series in the specified range. Variant.
Syntax
expression.DataSeries (Rowcol, Type, Date, Step, Stop, Trend)
expression A variable that represents a Range object.
Parameters
Name | Required/Optional | Data type | Description |
---|---|---|---|
Rowcol | Optional | Variant | Can be the xlRows or xlColumns constant to have the data series entered in rows or columns, respectively. If this argument is omitted, the size and shape of the range is used. |
Type | Optional | XlDataSeriesType | The type for the data series. |
Date | Optional | XlDataSeriesDate | If the Type argument is xlChronological, the Date argument indicates the step date unit. |
Step | Optional | Variant | The step value for the series. The default value is 1. |
Stop | Optional | Variant | The stop value for the series. If this argument is omitted, Microsoft Excel fills to the end of the range. |
Trend | Optional | Variant | True to create a linear trend or growth trend. False to create a standard data series. The default value is False. |
Return value
Variant
Example
This example creates a series of 12 dates. The series contains the last day of every month in 1996 and is created in the range A1:A12 on Sheet1.
Set dateRange = Worksheets("Sheet1").Range("A1:A12")
Worksheets("Sheet1").Range("A1").Formula = "31-JAN-1996"
dateRange.DataSeries Type:=xlChronological, Date:=xlMonth
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기