+ Reply to Thread
Results 1 to 5 of 5

how to copy a trendline formula into an active cell ?

  1. #1
    bushra
    Guest

    how to copy a trendline formula into an active cell ?

    Is there a way to copy the trendline equation to an active cell outsite the
    chart ?

  2. #2
    Registered User
    Join Date
    12-22-2003
    Location
    Texas
    Posts
    90
    assuming it is a straighht line you can use the SLOPE and INTERCEPT function with the data taht was used to create the chart.

    the eqation would look like this

    =slope(B1:B20,A1:A20) * x + intercept(B1:B20,A1:A20)

    where x is either a number or a cell reference to a number
    Barrfly

  3. #3
    Forum Contributor
    Join Date
    03-13-2005
    Posts
    6,195
    Quote Originally Posted by bushra
    Is there a way to copy the trendline equation to an active cell outsite the
    chart ?
    Hi,

    To view the specific formula for a trendline, on the chart, rightmouse the Data Series (to the window that lets you 'Add Trendline'), and one of the 'Trendline' options is 'View Formula on Chart', otherwise you can follow barrfly's post.

    hth
    ---
    Si fractum non sit, noli id reficere.

  4. #4
    Registered User
    Join Date
    11-25-2006
    Posts
    1
    You can use the LINEST function to generate the same formula which is used to plot the trend line in a graph. LINEST an array formula, but I prefer to use the INDEX function to get data from it.

    INDEX(LINEST (known Y's;known X's;;TRUE)1,2) returns the intercept value,
    INDEX(LINEST (known Y's;known X's;;TRUE)1,1) retuns the multiplication factor
    INDEX(LINEST (known Y's;known X's;;TRUE)3,1) retuns the R2 for the regression

    If your function is non-linear you'll have to linearise and pass the linearised x and y value to the formula. The inverse linearisation on the result generates the desired values.

    for example for a power function:

    y = ax^b

    ln(y) = ln(a) + b*ln(x)

    passing ln(x) as [known x's] and ln(y) as [known y's]
    will give ln(a) as intercept (thus exp(ln(a)) = a)
    and b as multiplication factor.

  5. #5
    Registered User
    Join Date
    07-10-2016
    Location
    USA
    MS-Off Ver
    16
    Posts
    1

    Re: how to copy a trendline formula into an active cell ?

    Thanks Barrfly, your suggestion worked great.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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