Interpolate on lookup table

eastwynd

New Member
Joined
Mar 9, 2007
Messages
4
I have a table of values that I want to lookup on but need the returned values to be interpolated if they're not exact matches, e.g.

Age Comp
0 0.01
3 0.02
6 0.03
9 0.04
12 0.05
24 0.10
36 0.13
48 0.12
60 0.10
90 0.09

So, if a person were, say, 65 years old, Excel will return a VLOOKUP value of 0.10. I want it to perform a simple linear interpolation between 0.10 and 0.09 based on the difference between 60 and 90 in the Age column.

Props and thanks in advance!
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
This appears to work.

=VLOOKUP(C1,A2:B11,2)

C1 has 65 and A2:B11 the ages/comps.
 
Upvote 0
I have a table of values that I want to lookup on but need the returned values to be interpolated if they're not exact matches, e.g.

Age Comp
0 0.01
3 0.02
6 0.03
9 0.04
12 0.05
24 0.10
36 0.13
48 0.12
60 0.10
90 0.09

So, if a person were, say, 65 years old, Excel will return a VLOOKUP value of 0.10. I want it to perform a simple linear interpolation between 0.10 and 0.09 based on the difference between 60 and 90 in the Age column.

Props and thanks in advance!
aaLinearInterpolation eastwynd.xls
ABCDEFGHI
1AgeComp
200.0165600.1900.090.098333333
330.02990.0490.040.04
460.039.790.04120.050.042333333
590.04
6120.05
7240.1
8360.13
9480.12
10600.1
11900.09
Sheet1


E2:

=LOOKUP(D2,$A$2:$A$11)

F2:

=LOOKUP(D2,$A$2:$A$11,$B$2:$B$11)

G2:

=INDEX($A$2:$A$11,MATCH(D2,$A$2:$A$11,1)+IF(D2< MAX($A$2:$A$11),LOOKUP(D2,$A$2:$A$11)<>D2,0))

H2:

=INDEX($B$2:$B$11,MATCH(D2,$A$2:$A$11,1)+IF(D2< MAX($A$2:$A$11),LOOKUP(D2,$A$2:$A$11)<>D2,0))

I2, the result cell:

=F2+IF(E2=G2,0,IF(D2>E2,(D2-E2)/(G2-E2)*(H2-F2),0))
 
Upvote 0
Thank you for your reply; here's what I came up with shortly before you posted:

[Removed incomplete HTML~VP]
 
Upvote 0

Forum statistics

Threads
1,215,523
Messages
6,125,318
Members
449,218
Latest member
Excel Master

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top