Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Linear Interpolation UDF
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. |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Linear Interpolation UDF
The following links have what you ask.
http://www.sulprobil.com/html/interpolate.html http://www.tushar-mehta.com/excel/ne...ion/index.html Despite what you say LINEST, FORECAST and TREND are the same as linear interpolation and IMHO are, when used correctly, better than UDF and VBA solutions. HTH Martin "Sloth" wrote in message ... 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. |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Linear Interpolation UDF
Thank you for the quick response.
"MartinW" wrote: The following links have what you ask. http://www.sulprobil.com/html/interpolate.html http://www.tushar-mehta.com/excel/ne...ion/index.html Despite what you say LINEST, FORECAST and TREND are the same as linear interpolation and IMHO are, when used correctly, better than UDF and VBA solutions. HTH Martin "Sloth" wrote in message ... 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. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to do a Linear interpolation in excel? | Excel Worksheet Functions | |||
Matrix and linear interpolation | Excel Discussion (Misc queries) | |||
Automating Linear Interpolation | Excel Discussion (Misc queries) | |||
I am looking for a function for linear interpolation | Excel Discussion (Misc queries) | |||
linear interpolation | Excel Discussion (Misc queries) |