Is there a way to get an equation for a trend line and have excel automatically export the equation to a cell where it can be used. The only way i currently know how to do this is to manually type the equation. Please help.
Is there a way to get an equation for a trend line and have excel automatically export the equation to a cell where it can be used. The only way i currently know how to do this is to manually type the equation. Please help.
The LINEST function will return the coefficients of a trendline to a worksheet.
Entia non sunt multiplicanda sine necessitate
What if the function is not linear? I am using a second order polynomial.
Every available trendline in the chart (except moving average) is "linear" (linear in this context refers to a linear equation in the more advanced linear algebra sense, so it refers to much more than straight lines). The LINEST() help file http://office.microsoft.com/en-us/ex...in=HA010277524 has an example for a third order polynomial (just before example 1 about half way down), it should be easy to adapt it to a 2nd order polynomial.
Originally Posted by shg
That worked for the first variable. How do I get the other variable so show in excel? Is there a trick to make them read out in another cell?
If I understand correctly, this is usually because you have failed to follow the appropriate "array formula protocol" for entering an array formula like LINEST().
Select an appropriate horizontal range of cells, enter the LINEST() formula, the confirm with ctrl-shift-enter (not just enter). If you put TRUE of the fourth argument, then you need to select a larger block of cells to output the additional statistics (examples are in the help file above).
So my formula looks like this
{=LINEST($M$9:$M$20,($L$9:$L$20)^{1,2},TRUE,TRUE)}
This cell I have it in give me "a" out of the 2nd order polynomial: ax^2+bx+c. My question is how to display "b" and "c" in different cells?
Assuming no typos, you refer to "this cell" singular -- suggesting that you have only selected one cell when entering the LINEST() function. For a 2nd order polynomial (3 parameters) with additional statistics, you will need to select a 4 row x 3 column (=12 cells) block before array-entering the LINEST() function. If you only select one cell, then you only get the upper left entry in the LINEST() array.
I see how it works. Thank you. Sorry for my ignorance.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks