18.11.2014 Views

Microsoft Office

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Creating Formulas That Look Up Values 15<br />

The array formula that follows is in cell B2. This formula does a case-sensitive lookup in Range1 and returns<br />

the corresponding value in Range2.<br />

{=INDEX(Range2,MATCH(TRUE,EXACT(Value,Range1),0))}<br />

The formula looks up the word DOG (uppercase) and returns 300. The following standard LOOKUP formula<br />

(which is not case sensitive) returns 400:<br />

=LOOKUP(Value,Range1,Range2)<br />

NOTE<br />

When entering an array formula, remember to use Ctrl+Shift+Enter.<br />

Choosing among multiple lookup tables<br />

You can, of course, have any number of lookup tables in a worksheet. In some situations, your formula may<br />

need to decide which lookup table to use. Figure 15.9 shows an example.<br />

This workbook calculates sales commission and contains two lookup tables: G3:H9 (named CommTable1)<br />

and J3:K8 (named CommTable2). The commission rate for a particular sales representative depends on two<br />

factors: the sales rep’s years of service (column B) and the amount sold (column C). Column D contains formulas<br />

that look up the commission rate from the appropriate table. For example, the formula in cell D2 is<br />

=VLOOKUP(C2,IF(B2

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

Saved successfully!

Ooh no, something went wrong!