+ Reply to Thread
Results 1 to 6 of 6

GET the EQN from trendlines.... and more

  1. #1
    Registered User
    Join Date
    07-25-2019
    Location
    Hilliard, OH, US
    MS-Off Ver
    Office 2010
    Posts
    23

    GET the EQN from trendlines.... and more

    I am plotting gas ppm response x,y curves and adding trendlines to fit. I want to access the EQUATIONS on my sheet. I could copy and paste a, b, and c for 100 diferent lines but I would prefer it be done a little faster than that. I know VBA - maybe that could select the best trendline match, given lin, exp, polynomial....

    My chart experiance SUCKs.... just saying...


    Here is sample of data:
    Name ppm Rs/Ro
    Smoke 200 3.9
    1000 3.65
    10000 2.5
    CO 200 4
    1000 3
    10000 1.5
    Met 200 3
    2000 1.5
    10000 6
    R-OH 200 3
    2000 1.5
    10000 6
    H2 200 2
    1000 1
    10000 0.22
    pro 1000 0.8
    200 1.7
    10000 0.27

    I want to get a ppm from a given Rs/Ro ratio - figure eqn is the answer... so how do I automate this?!

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

    Re: GET the EQN from trendlines.... and more

    Are you required to use the chart trendlines for this, because I would do all of this in the spreadsheet (except for the visualization). All of the available trendlines in the chart are linear (or can be made linear), so I would use the LINEST() function to get parameters for each trendline that I wanted to try (https://support.office.com/en-us/art...a-fa7abf772b6d ), measure "best fit" (not sure how you want to measure goodness of fit), then choose the desired trendline from that.

    I'm not sure of all your requirements for this, but I would try to do most or all of the work in the spreadsheet. The chart would be useful for visualization of the result, if you want to visualize it at the end.
    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
    07-25-2019
    Location
    Hilliard, OH, US
    MS-Off Ver
    Office 2010
    Posts
    23

    Re: GET the EQN from trendlines.... and more

    No... the line is polynomial most of the time... i have 14 sensors going into this box that a partially sensitive to a handful of overlapping gases in air. I am surprised no-one has made a decent library to idenifty the gas from it's effect on a certain subset of sensors.

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

    Re: GET the EQN from trendlines.... and more

    I'm not sure I understand your objection. The LINEST() function handles polynomials just fine. As explained in the help file I linked to previously (second to last bullet point before the Examples):
    Quote Originally Posted by Excel help
    In addition to using LOGEST to calculate statistics for other regression types, you can use LINEST to calculate a range of other regression types by entering functions of the x and y variables as the x and y series for LINEST. For example, the following formula:

    =LINEST(yvalues, xvalues^COLUMN($A:$C))

    works when you have a single column of y-values and a single column of x-values to calculate the cubic (polynomial of order 3) approximation of the form:

    y = m1*x + m2*x^2 + m3*x^3 + b
    LINEST() can perform regressions for any linear function -- which extend way beyond straight line y=mx+b equation.

    Is there some reason you cannot use the LINEST() function for these regressions? I still think LINEST() will be the easiest way.

  5. #5
    Registered User
    Join Date
    07-25-2019
    Location
    Hilliard, OH, US
    MS-Off Ver
    Office 2010
    Posts
    23

    Re: GET the EQN from trendlines.... and more

    I'll try that...

  6. #6
    Registered User
    Join Date
    07-25-2019
    Location
    Hilliard, OH, US
    MS-Off Ver
    Office 2010
    Posts
    23

    Re: GET the EQN from trendlines.... and more

    No. I need a y=m3x^3+m2x^2+m1x+b style.... they are pretty straight lines on exponential axiss

+ 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. Trendlines
    By jtj10003 in forum Excel General
    Replies: 11
    Last Post: 09-10-2015, 10:52 AM
  2. Trendlines
    By marionette in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 03-02-2014, 03:50 PM
  3. Excel Trendlines and RSQ is there a Bug?
    By smkallakuru in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 03-14-2011, 01:55 AM
  4. 3D trendlines?
    By sjvuser in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 12-04-2007, 06:05 PM
  5. Trendlines?!
    By kevindubrow in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 10-03-2006, 03:24 AM
  6. trendlines
    By agmoore in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 06-15-2006, 05:00 PM
  7. trendlines
    By A.Gray in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 04-05-2005, 01:06 PM
  8. Trendlines
    By Chris in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 02-15-2005, 03:06 AM

Tags for this Thread

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