Linear Interpolation UDF

G

Guest

Does anyone have a good UDF for linear interpolation?

I want something like

Linterp(KnownXs, KnownYs, NewX)

It will find and use the two points surrounding NewX and linearly
interpolate the Y-value. If NewX is beyond the range of KnownXs, then it
will use either the first or last two to extrapolate an answer.

Please note, I am not asking you to make one for me, I would assume that
many people have already made one for themselves. Also I am not interested
in the LINEST, FORECAST, or TREND functions. They are not the same as linear
interpolation. I know you can use FORECAST if you have the two points you
want to use, but I would like to be able to pick the entire list of X's and
Y's.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top