Page 328 - Excel 2007 Bible
P. 328
20_044039 ch15.qxp 11/21/06 11:07 AM Page 285
Creating Formulas That Look Up Values
FIGURE 15.11
Using multiple formulas to calculate a GPA.
Formulas in column E calculate the weighted values. The formula in cell E2 is
=D2*B2
Cell B8 computes the GPA by using the following formula:
=SUM(E2:E6)/SUM(B2:B6)
The preceding formulas work fine, but you can streamline the GPA calculation quite a bit. In fact, you can
use a single array formula to make this calculation and avoid using the lookup table and the formulas in 15
columns D and E. This array formula does the job:
{=SUM((MATCH(Grades,{“F”,”D”,”C”,”B”,”A”},0)-1)*CreditHours)
/SUM(CreditHours)}
Performing a two-way lookup
Figure 15.12 shows a worksheet with a table that displays product sales by month. To retrieve sales for a
particular month and product, the user enters a month in cell B1 and a product name in cell B2.
FIGURE 15.12
This table demonstrates a two-way lookup.
285