Interpolation/extrapolation and lookup problem

L

LouisR

Hello,

I'm trying to interpolate a value from an array, but must, given
desired x, only interpolate between the nearest x-y pairs. I have ha
little success with some functions I found online.

My tables could either be listed in ascending or descending order
depending on the given application.

Attached below is an example of a table I would like to obtain dat
from. I should be able to do the nesting once I sort the interpolatin
and extrapolating out.

Basically, what I would like to do is find the closest x-y values abov
and below the x value requested in the input cell, then use the slope(
function, and add the slope * (x requested - x below) to (y below)
Extrapolating would involve substracting or adding from the last slop
available.

One problem I've had with some interpolating formulas out in the ope
is the sometimes significantly incorrect result returned whe
requesting an x value already in the table. I guess putting an equa
somewhere in the value below selection might solve that issue.

Thanks in advance,

Loui

Attachment filename: todistance.gif
Download attachment: http://www.excelforum.com/attachment.php?postid=56467
 
Top