Trendlines Method

Returns an object that represents a single trendline or a collection of all the trendlines for the series.

expression.Trendlines(Index)

expression Required. An expression that returns one of the objects in the Applies To list.

Index Optional Variant. The name or number of the trendline.

Example

This example adds a linear trendline to series one.

myChart.SeriesCollection(1).Trendlines.Add Type:=xlLinear