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.13<br />

This workbook performs a lookup by using information in two columns (D and E).<br />

The lookup table contains automobile makes and models and a corresponding code for each. The worksheet<br />

uses named ranges, as shown here:<br />

F2:F12<br />

B1<br />

B2<br />

D2:D12<br />

E2:E12<br />

Code<br />

Make<br />

Model<br />

Makes<br />

Models<br />

The following array formula displays the corresponding code for an automobile make and model:<br />

{=INDEX(Code,MATCH(Make&Model,Makes&Models,0))}<br />

This formula works by concatenating the contents of Make and Model and then searching for this text in an<br />

array consisting of the concatenated corresponding text in Makes and Models.<br />

Determining the cell address of a value within a range<br />

Most of the time, you want your lookup formula to return a value. You may, however, need to determine the<br />

cell address of a particular value within a range. For example, Figure 15.14 shows a worksheet with a range<br />

of numbers that occupies a single column (named Data). Cell B1, which contains the value to look up, is<br />

named Target.<br />

287

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

Saved successfully!

Ooh no, something went wrong!