Trendline Equations

C

Chris.Cazier

Does anyone know how to extract the trendline formula from a chart
object so that the formula is viewable in a cell?
 
J

Joel

ActiveSheet.ChartObjects("Chart 1").Activate
Caption = ActiveChart.SeriesCollection(3).Trendlines(1). _
DataLabel.Caption
ThisWorkbook.Activate
Range("E122").Value = Caption
 
J

Jim Thomlinson

Without getting into VBA you have to create the formula yourself. It is not
that terribly difficult using the slope and intercept formulas...
 
C

Chris.Cazier

Without getting into VBA you have to create the formula yourself. It is not
that terribly difficult using the slope and intercept formulas...
--
HTH...

Jim Thomlinson






- Show quoted text -

Thanks
 
J

Jon Peltier

You can also use LINEST to get the polynomial coefficients into cells.
Bernard Liengme shows how here:
http://www.stfx.ca/people/bliengme/ExcelTips

David Braden wrote the first procedure I know of to extract trendline
coefficients for use in the worksheet. Tushar Mehta made some refinements to
the procedure here (see post 10):
http://groups.google.com/group/microsoft.public.excel.charting/browse_frm/thread/3186b43d9dc84ebd/

In fact, Tushar has written a detailed chapter on the use of Excel with
regression (including his trendline coefficient procedure):

http://tushar-mehta.com/publish_train/data_analysis/16.htm

- Jon
 
Top