Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 5th-odr poly coefficients automatically displayed in excel cells?

Would like to create 5th- order polynomial trendline from data set and have
coefficients automatically displayed in excel cells (one in each cell)
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 694
Default 5th-odr poly coefficients automatically displayed in excel cells?

Hi,
The following code adds a trendline (5th-order poly) to the first series on
the active chart:
'--------------------------------------------
Sub test()
Dim c As Chart, t As Trendline
Set c = ActiveChart

'check chart
If c Is Nothing Then
MsgBox "No chart selected"
Exit Sub
End If

'add trendline to series 1
Set t = c.SeriesCollection(1).Trendlines.Add(Type:=xlPolyn omial, _
Order:=5, Forward:=0, Backward:=0, DisplayEquation:=True, _
DisplayRSquared:=False)

End Sub
'------------------------------------------
--
Regards,
Sébastien
<http://www.ondemandanalysis.com


"jason1" wrote:

Would like to create 5th- order polynomial trendline from data set and have
coefficients automatically displayed in excel cells (one in each cell)

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default 5th-odr poly coefficients automatically displayed in excel cells?

jason1 -

Would like to create 5th- order polynomial trendline from data set and
have coefficients automatically displayed in excel cells (one in each
cell) <


(1) Do you actually think there is some real-world data where the underlying
process should be represented with a 5th-order polynomial? Be aware of
possible overfitting the data in which case predictions are of dubious
value.

(2) But if you really want to do it, you could use the LINEST array-entered
worksheet function.

Tushar Mehta has some examples and tutorials at www.tushar-mehta.com.

- Mike
www.mikemiddleton.com


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Extracting Terms and Exponents of a Text Poly Formula ?? monir Excel Worksheet Functions 4 September 28th 09 04:21 PM
Excel: How automatically read coefficients from polynomial fit? M.R. Charts and Charting in Excel 1 May 28th 09 08:37 PM
How do I automatically change displayed sheet in excel? Tim Messenger Excel Discussion (Misc queries) 2 November 11th 08 04:48 PM
I cannot display all the poly equation constants on the chart. daz Charts and Charting in Excel 4 October 17th 07 04:29 PM
Excel option to store trendline's coefficients in cells for use Miguel Saldana Charts and Charting in Excel 9 June 20th 05 08:45 PM


All times are GMT +1. The time now is 10:16 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"