ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Excel Function to Interpolate a List (https://www.excelbanter.com/excel-programming/277439-re-excel-function-interpolate-list.html)

Tom Ogilvy

Excel Function to Interpolate a List
 
This doesn't do any checking to determine if you Y=320000 is outside the
range of the data, but this should do what you describe:

=FORECAST(E37,OFFSET(B37,MATCH(E37,C37:C45,-1)-1,0,2,1),OFFSET(C37,MATCH(E37
,C37:C45,-1)-1,0,2,1))

--
Regards,
Tom Ogilvy

Mark wrote in message
om...
Need a function to return a X value corresponding to a Y using a list
of known X's and Y's.

Example: Find the X for Y=320000 interpolating between the known Y's
above and below the Y in question.
The list looks like this:
X Y
0 832900
5 498008
8 390988
10 340000
12 300000
15 255525
18 222355
20 204822
30 148614

The function should return X=11.

Known X's are in B37:45 and known Y's are in C:37:C45.
The Y in question is in E37.
I'd like the corresponding X to be in cell F37.
As I understand how VB functions work, the formula in F37 should be
something like =myfunction(B37:B45,C37:C45,E37).

Seems like a simple common problem and I'd appreciate suggestions
anyone may have.

Thanks, Mark





All times are GMT +1. The time now is 05:30 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com