18.11.2014 Views

Microsoft Office

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Creating Formulas That Look Up Values 15<br />

FIGURE 15.11<br />

Using multiple formulas to calculate a GPA.<br />

Formulas in column E calculate the weighted values. The formula in cell E2 is<br />

=D2*B2<br />

Cell B8 computes the GPA by using the following formula:<br />

=SUM(E2:E6)/SUM(B2:B6)<br />

The preceding formulas work fine, but you can streamline the GPA calculation quite a bit. In fact, you can<br />

use a single array formula to make this calculation and avoid using the lookup table and the formulas in<br />

columns D and E. This array formula does the job:<br />

{=SUM((MATCH(Grades,{“F”,”D”,”C”,”B”,”A”},0)-1)*CreditHours)<br />

/SUM(CreditHours)}<br />

Performing a two-way lookup<br />

Figure 15.12 shows a worksheet with a table that displays product sales by month. To retrieve sales for a<br />

particular month and product, the user enters a month in cell B1 and a product name in cell B2.<br />

FIGURE 15.12<br />

This table demonstrates a two-way lookup.<br />

285

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!