Microsoft Office Tutorials and References
In Depth Information
Specialized Lookup Formulas
Figure 8-16: This workbook demonstrates a table lookup using linear interpolation.
The worksheet also contains a chart that depicts the relationship between the x range and the y
range graphically. As you can see, there is an approximate linear relationship between the
corresponding values in the x and y ranges: As x increases, so does y. Notice that the values in the x
range are not strictly consecutive. For example, the x range doesn’t contain the following values:
3, 6, 7, 14, 17, 18, and 19.
You can create a lookup formula that looks up a value in the x range and returns the
corresponding value from the y range. But what if you want to estimate the y value for a missing x value? A
normal lookup formula does not return a very good result because it simply returns an existing y
value (not an estimated y value). For example, the following formula looks up the value 3 and
returns 18.00 (the value that corresponds to 2 in the x range):
In such a case, you probably want to interpolate. In other words, because the lookup value (3) is
halfway between existing x values (2 and 4), you want the formula to return a y value of 21.00 —
a value halfway between the corresponding y values 18.00 and 24.00.
Formulas to perform a linear interpolation
Figure 8-17 shows a worksheet with formulas in column B. The value to be looked up is entered
into cell B1. The final formula, in cell B16, returns the result. If the value in B3 is found in the x
range, the corresponding y value is returned. If the value in B3 is not found, the formula in B16
returns an estimated y value, obtained using linear interpolation.
Search JabSto ::

Custom Search