+ Reply to Thread
Results 1 to 7 of 7

Getting the Value of "a" and "b" from a Trendline Formula , with a formula

  1. #1
    Registered User
    Join Date
    04-28-2015
    Location
    Sydney, Australia
    MS-Off Ver
    Office 365
    Posts
    61

    Getting the Value of "a" and "b" from a Trendline Formula , with a formula

    I Have a Sheet with a chart showing a trendline and a trendline label. I use the values for "a" and "b" shown in the trendline formula label to calculate further data.

    Is there anyway to calculate the values of "a" and "b" in the cells on the spreadsheet from the data automatically. so i dont have to enter them manually in the sheet. See attached example.

    Thanks
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,843

    Re: Getting the Value of "a" and "b" from a Trendline Formula , with a formula

    The LINEST() function is probably the most straightforward way to get the trendline constants: https://support.office.com/en-us/art...a-fa7abf772b6d In your case, where you are using ln(x) as the independent variable (rather than straight x), you will need to include the LN() function in the known_x argument =LINEST(known_ys,LN(known_xs))
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  3. #3
    Registered User
    Join Date
    04-28-2015
    Location
    Sydney, Australia
    MS-Off Ver
    Office 365
    Posts
    61

    Re: Getting the Value of "a" and "b" from a Trendline Formula , with a formula

    Thanks iv e got the variable "a" by using =LINEST(D5:D7,LN(C5:C7)) what do I use to get "b"
    Last edited by qwertyyy; 09-13-2018 at 10:16 PM.

  4. #4
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,843

    Re: Getting the Value of "a" and "b" from a Trendline Formula , with a formula

    As explained in the "notes" (buried somewhere in the middle) section of the help file, LINEST() is an array function (a function that returns an array of values), and must therefore be entered as an array function. Select the required cells (a horizontal array of 2 cells if you are not returning the additional statistics) and confirm entry of the function using ctrl-shift-enter.

  5. #5
    Registered User
    Join Date
    04-28-2015
    Location
    Sydney, Australia
    MS-Off Ver
    Office 365
    Posts
    61

    Re: Getting the Value of "a" and "b" from a Trendline Formula , with a formula

    Thanks , but {=LINEST(L54:L56,LN(K54:K56))} gives me "a" just need the formula for "b"
    Last edited by qwertyyy; 09-13-2018 at 11:41 PM.

  6. #6
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,843

    Re: Getting the Value of "a" and "b" from a Trendline Formula , with a formula

    Can you explain exactly how you are using the LINEST() function? It should give you both a and b. If it is only giving you a, then I suspect that you selected only one cell when entering the function. The LINEST() function returns an array, so you need to select two adjacent cells (horizontal, not vertical) and array enter the function.

    If it helps, this post has an example of LINEST(). It's for a 6th order polynomial rather than a straight line, but you can see how he enters the LINEST() function across the range A2:G2: https://www.excelforum.com/excel-for...ml#post4769062

  7. #7
    Registered User
    Join Date
    04-28-2015
    Location
    Sydney, Australia
    MS-Off Ver
    Office 365
    Posts
    61

    Re: Getting the Value of "a" and "b" from a Trendline Formula , with a formula

    Got it thanks for that much appreciated

+ 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. Replies: 5
    Last Post: 02-05-2019, 12:03 AM
  2. Replies: 4
    Last Post: 06-11-2017, 02:03 PM
  3. [SOLVED] Column X-Ref list - Sheet1 Col A "pages", Col B:FL "Req" to Sheet2 ColA "req", ColB "page"
    By excel-card-pulled in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 04-07-2017, 09:30 AM
  4. [SOLVED] How to USE """"" cells count """"" change font color
    By austin123456 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-09-2013, 06:14 AM
  5. [SOLVED] Formula needed to display "Pass" or "Fail" if a column contains any values other than "yes
    By andreindy in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 03-26-2013, 05:49 PM
  6. Replies: 5
    Last Post: 10-12-2010, 06:46 AM
  7. If changed array formula reduce ""\""\""\ - signs to #Missing, will it make ...
    By Maria J-son in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-05-2006, 08:25 AM

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