Sub Add_Trendlines()
With ActiveChart
For i = 1 To .SeriesCollection.Count
.SeriesCollection(i).Trendlines.Add Type:=xlLinear, Name:="Linear Trend - " + .SeriesCollection(i).Name
Next i
End With
End Sub
Option Explicit
Sub Add_All_Trendlines()
Dim I As Integer, chtobj As ChartObject
For Each chtobj In ChartObjects
With chtobj.Chart
For I = 1 To .SeriesCollection.Count
.SeriesCollection(I).Trendlines.Add Type:=xlLinear, Name:="Linear Trend - " + .SeriesCollection(I).Name
Next I
End With
Next chtobj
End Sub