As promised (or threatened...) the Interpolate Function code...
<font face=Courier New>
<SPAN style="color:#00007F">Function</SPAN> Interpolate(X <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Double</SPAN>, XRange <SPAN style="color:#00007F">As</SPAN> Range, YRange <SPAN style="color:#00007F">As</SPAN> Range, <SPAN style="color:#00007F">Optional</SPAN> InterpType <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Integer</SPAN> = 0) <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Variant</SPAN>
<SPAN style="color:#007F00">' Function returns interpolated value of "Y" for supplied X, based on supplied ranges of known</SPAN>
<SPAN style="color:#007F00">' X and Y values. Optional "InterpType" argument controls how function responds to X arguments</SPAN>
<SPAN style="color:#007F00">' outside the known X values:</SPAN>
<SPAN style="color:#007F00">' If InterpType is:</SPAN>
<SPAN style="color:#007F00">' = 0: returns an error (default)</SPAN>
<SPAN style="color:#007F00">' = 1: extrapolates based on last two X-Y pairs (either two highest or two lowest)</SPAN>
<SPAN style="color:#007F00">' = 2: extrapolates based on first and last X-Y pair (full range of supplied values)</SPAN>
<SPAN style="color:#007F00">' = 3: extrapolates based on first or last X-Y pair and the origin (0-0)</SPAN>
<SPAN style="color:#007F00">' Other values return an error</SPAN>
<SPAN style="color:#007F00">' Function is based on the "InterpolateVLOOKUP" UDF developed by Myrna Larson, and published in the</SPAN>
<SPAN style="color:#007F00">' Excel Expert's E-Letter, which can be found at: http://www.j-walk.com/ss/excel/eee/eee002.txt</SPAN>
<SPAN style="color:#00007F">Dim</SPAN> blErr <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Boolean</SPAN>
<SPAN style="color:#00007F">Dim</SPAN> iBase <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Integer</SPAN>
<SPAN style="color:#00007F">Dim</SPAN> iComp <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Integer</SPAN>
<SPAN style="color:#00007F">Dim</SPAN> i <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Integer</SPAN>
<SPAN style="color:#00007F">Dim</SPAN> dX0 <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Double</SPAN>
<SPAN style="color:#00007F">Dim</SPAN> dX1 <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Double</SPAN>
<SPAN style="color:#00007F">Dim</SPAN> dY0 <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Double</SPAN>
<SPAN style="color:#00007F">Dim</SPAN> dY1 <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Double</SPAN>
<SPAN style="color:#00007F">Dim</SPAN> Temp <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Variant</SPAN>
<SPAN style="color:#00007F">On</SPAN> <SPAN style="color:#00007F">Error</SPAN> <SPAN style="color:#00007F">Resume</SPAN> <SPAN style="color:#00007F">Next</SPAN>
<SPAN style="color:#007F00">' ensure that XRange is sorted ascending so match function result is reliable</SPAN>
<SPAN style="color:#00007F">For</SPAN> i = 1 <SPAN style="color:#00007F">To</SPAN> XRange.Count - 1
<SPAN style="color:#00007F">If</SPAN> XRange(i + 1) < XRange(i) <SPAN style="color:#00007F">Then</SPAN> blErr = <SPAN style="color:#00007F">True</SPAN>
<SPAN style="color:#00007F">Next</SPAN>
Temp = WorksheetFunction.Match(X, XRange, 1)
<SPAN style="color:#00007F">If</SPAN> IsError(Temp) <SPAN style="color:#00007F">Then</SPAN>
Interpolate = <SPAN style="color:#00007F">CVErr</SPAN>(Temp)
<SPAN style="color:#00007F">Else</SPAN>
iBase = <SPAN style="color:#00007F">CInt</SPAN>(Temp)
<SPAN style="color:#00007F">Select</SPAN> <SPAN style="color:#00007F">Case</SPAN> iBase
<SPAN style="color:#00007F">Case</SPAN> 0
<SPAN style="color:#007F00">'match function did not find a match - X =< min(XRange)</SPAN>
<SPAN style="color:#00007F">Select</SPAN> <SPAN style="color:#00007F">Case</SPAN> InterpType
<SPAN style="color:#00007F">Case</SPAN> 0
<SPAN style="color:#00007F">If</SPAN> X = XRange(1) <SPAN style="color:#00007F">Then</SPAN> <SPAN style="color:#007F00">'X is not "less than" lowest value in range, it is equal</SPAN>
iBase = 1
<SPAN style="color:#00007F">Else</SPAN> <SPAN style="color:#007F00">'X is IS < lowest value in range - represents an error</SPAN>
blErr = <SPAN style="color:#00007F">True</SPAN>
<SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">If</SPAN>
<SPAN style="color:#00007F">Case</SPAN> 1
iBase = 1
iComp = 2
<SPAN style="color:#00007F">Case</SPAN> 2
iBase = 1
iComp = XRange.Count
<SPAN style="color:#00007F">Case</SPAN> 3
iBase = 1
iComp = 0
<SPAN style="color:#00007F">Case</SPAN> <SPAN style="color:#00007F">Else</SPAN>
blErr = <SPAN style="color:#00007F">True</SPAN>
<SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">Select</SPAN>
<SPAN style="color:#00007F">Case</SPAN> XRange.Count
<SPAN style="color:#007F00">'match returns last value in XRange, so X is >= max(XRange)</SPAN>
<SPAN style="color:#00007F">Select</SPAN> <SPAN style="color:#00007F">Case</SPAN> InterpType
<SPAN style="color:#00007F">Case</SPAN> 0
<SPAN style="color:#00007F">If</SPAN> X <> XRange(XRange.Count) <SPAN style="color:#00007F">Then</SPAN> <SPAN style="color:#007F00">'X is IS > highest value in range - represents an error</SPAN>
blErr = <SPAN style="color:#00007F">True</SPAN>
<SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">If</SPAN>
<SPAN style="color:#00007F">Case</SPAN> 1
iComp = iBase - 1
<SPAN style="color:#00007F">Case</SPAN> 2
iComp = 1
<SPAN style="color:#00007F">Case</SPAN> 3
iComp = 0
<SPAN style="color:#00007F">Case</SPAN> <SPAN style="color:#00007F">Else</SPAN>
blErr = <SPAN style="color:#00007F">True</SPAN>
<SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">Select</SPAN>
<SPAN style="color:#00007F">Case</SPAN> <SPAN style="color:#00007F">Else</SPAN>
<SPAN style="color:#007F00">'match returned position of value next larger than X, within XRange</SPAN>
iComp = iBase + 1
<SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">Select</SPAN>
dX0 = XRange(iBase)
dY0 = YRange(iBase)
<SPAN style="color:#00007F">If</SPAN> X = dX0 <SPAN style="color:#00007F">Then</SPAN>
Interpolate = dY0
<SPAN style="color:#00007F">Else</SPAN>
dX1 = XRange(iComp)
dY1 = YRange(iComp)
<SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">If</SPAN>
<SPAN style="color:#00007F">If</SPAN> blErr = <SPAN style="color:#00007F">True</SPAN> <SPAN style="color:#00007F">Then</SPAN>
Err.Raise Number:=11
Interpolate = <SPAN style="color:#00007F">CVErr</SPAN>(Err)
<SPAN style="color:#007F00">'return "div0" error, to ensure that error propagates through s/sheet calculations</SPAN>
<SPAN style="color:#007F00">'XL 2003 does *not* return an error, but coerces the value to 0 (double)</SPAN>
<SPAN style="color:#007F00">'unless the Interpolate data type is set to Variant.</SPAN>
<SPAN style="color:#00007F">Else</SPAN>
Interpolate = (X - dX0) / (dX1 - dX0) * (dY1 - dY0) + dY0
<SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">If</SPAN>
<SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">If</SPAN>
<SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">Function</SPAN>
</FONT>