Syntax

expression.Trendlines(Index)

expression A variable that represents a Series object.

Parameters

Name Required/Optional Data Type Description
Index Optional Variant The name or number of the trendline.

Return Value
Object

Example

This example adds a linear trendline to series one in Chart1.

Visual Basic for Applications
Charts("Chart1").SeriesCollection(1).Trendlines.Add Type:=xlLinear
Change all trendlines on my graph? How do I refer to a trendline in a chart? Modify a particular trendline on my line chart? Trendline objects trendlines Trendlines Method

See also: