1: 2: 3: 4: 5:
Function ForecastValue(rgValues As Range) As Double Dim n As Long n = rgValues.Cells.Count ForecastValue = Evaluate("TREND(" & rgValues.Address(external:=True) & ",," & (n + 1) & ")")(1) End Function