Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 252
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 860
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 252
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to do a Linear interpolation in excel? Ines Excel Worksheet Functions 1 May 17th 07 07:10 PM
Matrix and linear interpolation [email protected] Excel Discussion (Misc queries) 1 October 25th 06 02:06 PM
Automating Linear Interpolation smurray444 Excel Discussion (Misc queries) 0 January 24th 06 04:25 PM
I am looking for a function for linear interpolation azad Excel Discussion (Misc queries) 1 July 17th 05 09:18 PM
linear interpolation Taha Excel Discussion (Misc queries) 3 January 31st 05 02:12 PM


All times are GMT +1. The time now is 12:01 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"