+ Reply to Thread
Results 1 to 9 of 9

Export Graph Trend Line Equation

  1. #1
    Registered User
    Join Date
    01-17-2014
    Location
    Ohio
    MS-Off Ver
    Excel 2010
    Posts
    7

    Export Graph Trend Line Equation

    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.

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Export Graph Trend Line Equation

    The LINEST function will return the coefficients of a trendline to a worksheet.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    01-17-2014
    Location
    Ohio
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Export Graph Trend Line Equation

    What if the function is not linear? I am using a second order polynomial.

  4. #4
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP, 2007, 2024
    Posts
    16,369

    Re: Export Graph Trend Line Equation

    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.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  5. #5
    Registered User
    Join Date
    01-17-2014
    Location
    Ohio
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Export Graph Trend Line Equation

    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?

  6. #6
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP, 2007, 2024
    Posts
    16,369

    Re: Export Graph Trend Line Equation

    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).

  7. #7
    Registered User
    Join Date
    01-17-2014
    Location
    Ohio
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Export Graph Trend Line Equation

    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?

  8. #8
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP, 2007, 2024
    Posts
    16,369

    Re: Export Graph Trend Line Equation

    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.

  9. #9
    Registered User
    Join Date
    01-17-2014
    Location
    Ohio
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Export Graph Trend Line Equation

    I see how it works. Thank you. Sorry for my ignorance.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Using trend line equation to estimate
    By daisytay in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 02-02-2013, 02:43 PM
  2. Using the Trend Line Equation
    By ubh_65 in forum Excel General
    Replies: 8
    Last Post: 07-29-2011, 10:38 AM
  3. how to use the log. trend line equation
    By oddcarout in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 07-20-2011, 06:31 PM
  4. Trend Line - Equation
    By Rich 80105 in forum Excel General
    Replies: 3
    Last Post: 06-03-2006, 04:10 AM
  5. [SOLVED] Trend Line Equation Coefficients
    By Jake in forum Excel General
    Replies: 4
    Last Post: 04-17-2006, 03:50 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1