11.08.2013 Views

Excel's Formula - sisman

Excel's Formula - sisman

Excel's Formula - sisman

SHOW MORE
SHOW LESS

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

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

228<br />

Part II: Using Functions in Your <strong>Formula</strong>s<br />

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

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

F2:F12 Code<br />

B1 Make<br />

B2 Model<br />

D2:D12 Makes<br />

E2:E12 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<br />

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

Determining the 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<br />

determine the cell address of a particular value within a range. For example, Figure 8-14 shows a<br />

worksheet with a range of numbers that occupy a single column (named Data). Cell B1, which<br />

contains the value to look up, is named Target.<br />

The formula in cell B2, which follows, returns the address of the cell in the Data range that contains<br />

the Target value:<br />

=ADDRESS(ROW(Data)+MATCH(Target,Data,0)-1,COLUMN(Data))

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

Saved successfully!

Ooh no, something went wrong!