+ Reply to Thread
Results 1 to 9 of 9

linear interpolation 2-way table

  1. #1
    Registered User
    Join Date
    05-14-2007
    Posts
    16

    linear interpolation 2-way table

    I have a table with horizontal and vertical values. I need to linearly interpolate horizontally to find the table value to the left and to the right of the value calculated. I've tried using hlookup but I keep getting the value to the left of the calculated value. I need to get the value to the right of the calculated value but I can't seem to figure out how to tell Excel to do that.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    I think you'll need an Index/Match ...array formula formulation....

    see my posting in this thread from Post # 8 down... a sample is shown in the last post: http://www.excelforum.com/showthread.php?t=616393

    If you still need more help.. post a sample of your sheet.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Forum Expert
    Join Date
    09-09-2005
    Location
    England
    MS-Off Ver
    2007
    Posts
    1,500
    You need to provide more information and perhaps the spreadsheet attached as an example. but look at index and match functions.

    if the value to look up is in A1, the range of data a2:A10 and the data sorted ascending

    index(a2:a10, match(a1,a2:a10,1)) will get you the lower value

    and

    index(a2:a10, match(a1,a2:a10,1)+1) will get you the higher value

    Regards

    Dav

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    I may have misinterpreted your question...

    I assumed you want to interpolate the next value as in if the value itself is not on your table header, then go to the next larger value....

    If indeed you have an exact match and just want to jump to the next column, then Dav's solution is the one you want...

  5. #5
    Registered User
    Join Date
    05-14-2007
    Posts
    16
    I attached the spreadsheet that I am working with. The cell I am trying to get Excel to insert the correct value into from the table above is highlighted when the spreadsheet is opened.
    Attached Files Attached Files

  6. #6
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    so just to be clear...because I see several tables....

    in cell F252, you want to lookup what? And exactly where? Please indicate by cell references and range references

  7. #7
    Registered User
    Join Date
    05-14-2007
    Posts
    16
    I'm trying to get Excel to look between cells C236 and Q236. Based on the value of cell E252, the value to the left of cell E252 is 10 according to the table above in cell M236. Now I need it to fill in the value in cell F252 which, according to the table above is 20.

    10 12.5 20

    In other words, since 12.5 does not appear in the top table, I need excel to interpolate to find the lower value of 10 and upper value of 20.

  8. #8
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Try:

    =INDEX($D$236:$Q$236,MATCH(TRUE,$D$236:$Q$236>=E252,0))

    this formula must be confirmed with CTRL+SHIFT+ENTER not just ENTER...you'll see { } brackets appear around the formula.

  9. #9
    Registered User
    Join Date
    05-14-2007
    Posts
    16
    That did it. Thanks!

+ 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