View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
joeu2004 joeu2004 is offline
external usenet poster
 
Posts: 2,059
Default Linear Interpolation

The following provides a __linear__ interpolation between two data points.
If you chart your data, you will see that it is not linear. However,
without an equation for the data, you cannot interpolate along the curve. A
linear interpolation might be sufficient if the known data points are close
enough.

The formula for interpolating (x2,y2) between (x1,y1) and (x2,y2) is:
y1 + (y3-y1)*(x2-x1)/(x3-x1)

If your data are in A2:B7 and the intermediate data point (27.662) is in D2,
then the corresponding SHGC value is:

=VLOOKUP(D2,$A$2:$B$7,2) +
(INDEX($B$2:$B$7,1+MATCH(D2,$A$2:$A$7)) - VLOOKUP(D2,$A$2:$B$7,2)) *
(D2 - VLOOKUP(D2,$A$2:$A$7,1)) /
(INDEX($A$2:$A$7,1+MATCH(D2,$A$2:$A$7)) - VLOOKUP(D2,$A$2:$A$7,1))

It would be more efficient if you computed the repeated INDEX and VLOOKUP
functions in helper cells, say F2:G2 for x1 and x3 and H2:I2 for y1 and y3.
If you do that, then you can use the TREND function as follows:

=TREND(H2:I2,F2:G2,D2)


----- original message -----

"Harish" wrote in message
...
Hi,

I have a table:

A SHGC
0 0.86
40 0.84
50 0.82
60 0.78
70 0.67
80 0.42

For example, I want to find the SHGC value for the corresponding A
value of 27.662, How can i use a function in excel to do that
interpolation?