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

That Look Up Values<br />

This chapter discusses various techniques that you can use to look up a<br />

value in a range of data. Excel has three functions (LOOKUP, VLOOKUP,<br />

and HLOOKUP) designed for this task, but you may find that these functions<br />

don’t quite cut it.<br />

This chapter provides many lookup examples, including alternative techniques<br />

that go well beyond the Excel program’s normal lookup capabilities.<br />

Introducing Lookup Formulas<br />

A lookup formula essentially returns a value from a table by looking up another<br />

related value. A common telephone directory provides a good analogy. If you<br />

want to find a person’s telephone number, you first locate the name (look it up)<br />

and then retrieve the corresponding number.<br />

I use the term table to describe a rectangular range of data.<br />

NOTE<br />

The range does not necessarily need to be an “official” table,<br />

as created by Excel’s Insert ➪ Tables ➪ Table command.<br />

Figure 15.1 shows a simple worksheet that uses several lookup formulas. This<br />

worksheet contains a table of employee data, beginning in row 7. This range is<br />

named EmpData. When you enter a last name into cell C2, lookup formulas in<br />

D2:G2 retrieve the matching information from the table. The following lookup<br />

formulas use the VLOOKUP function:<br />

IN THIS CHAPTER<br />

An introduction to formulas that<br />

look up values in a table<br />

An overview of the worksheet<br />

functions used to perform<br />

lookups<br />

Basic lookup formulas<br />

More sophisticated lookup<br />

formulas<br />

D2<br />

E2<br />

F2<br />

G2<br />

=VLOOKUP(C2,EmpData,2,FALSE)<br />

=VLOOKUP(C2,EmpData,3,FALSE)<br />

=VLOOKUP(C2,EmpData,4,FALSE)<br />

=VLOOKUP(C2,EmpData,5,FALSE)<br />

273

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

Saved successfully!

Ooh no, something went wrong!