+ Reply to Thread
Results 1 to 6 of 6

how to do linear interpolation

  1. #1
    Registered User
    Join Date
    01-28-2015
    Location
    florida
    MS-Off Ver
    2007
    Posts
    46

    how to do linear interpolation

    hi, I need to use linear interpolation, but I see that excel doesn't have a function for it. it does have trend, but i believe that's for linear extrapolation.
    ive provided an example sheet. im looking for the answer of 1939, but trend gives me ~1907
    any ideas for a formula?

    thanks
    TrendExample.xlsx

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

    Re: how to do linear interpolation

    Trend performs a linear regression on the overall dataset, then finds the corresponding value.

    Sometimes I think the easiest way to do this would be to buy QuattroPro and use the built in @LINTERP() function available in that spreadsheet application. Since this is an Excel forum, I probably should not say such a thing though, lest I be ousted from the community for speaking such heresy.

    Since Excel does not offer a built in function, you need to build the different parts. Locate interval containing the desired unkown, then compute the linear trend for that interval to determine the desired unkown. If you are interested, I generated an example of one approach in this post: http://www.excelforum.com/excel-char...ml#post3904113 This example is in ln(y) vs ln(x) space, but it should adapt readily to regular y vs. x type problems. It consists of:"

    1) a LINEST() function to determine slope and intercept for each pair of points.
    2) a lookup function to return the slope and intercept specific to the desired unkown.
    3) simple algebra to compute the desired unkown.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  3. #3
    Forum Expert
    Join Date
    12-09-2014
    Location
    Trakai, Lithuania
    MS-Off Ver
    2016
    Posts
    1,292

    Re: how to do linear interpolation

    Test the following formula.
    Formula: copy to clipboard
    Please Login or Register  to view this content.

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

    Re: how to do linear interpolation

    Another way:

    Row\Col
    A
    B
    C
    D
    E
    F
    G
    2
    X
    62.0
    66.2
    70.0
    62
    F2: Input
    3
    4
    Y
    1939
    2615
    3416
    1939
    F4: =PERCENTILE(B4:D4, PERCENTRANK(B2:D2, F2, 6))
    Entia non sunt multiplicanda sine necessitate

  5. #5
    Registered User
    Join Date
    01-28-2015
    Location
    florida
    MS-Off Ver
    2007
    Posts
    46

    Re: how to do linear interpolation

    wow great responses thank you! ill play with them all.

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

    Re: how to do linear interpolation

    BTW, the formula I posted only works for a monotone ascending function. There's a different (similar) one for a descending function, and a different one yet (using a UDF) for non-monotone functions.

+ 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. 2D linear interpolation
    By mochen in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-12-2012, 05:01 AM
  2. Linear Interpolation
    By mikethemonster in forum Excel General
    Replies: 0
    Last Post: 07-04-2011, 02:27 PM
  3. VBA Linear Interpolation
    By WAW in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-25-2010, 04:55 PM
  4. Linear interpolation
    By bruteforce in forum Excel General
    Replies: 0
    Last Post: 04-25-2009, 01:11 PM
  5. Linear Interpolation
    By Metalmaniac in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 06-03-2005, 10:05 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