Page 431 - Excel 2013 All-in-One For Dummies
P. 431
Lookup and Reference 413
Figure 6-2:
Using the HLOOKUP function
to return the price of a bakery item from a Lookup table.
By having the HLOOKUP function use the Price table range to input the price per dozen for each bakery goods item in the Daily Sales list, you make it a very simple matter to update any of the sales in the list. All you have to do is change its Price/Doz cost in this range, and the HLOOKUP function immedi- ately updates the new price in the Daily Sales list wherever the item is sold.
Performing a two-way lookup
In both the VLOOKUP and HLOOKUP examples, Excel only compares a single value in the data list to a single value in the vertical or horizontal Lookup table. Sometimes, however, you may have a table in which you need to per- form a two-way lookup, whereby a piece of data is retrieved from the Lookup table based on looking up a value in the top row (with the table’s column headings) and a value in the first column (with the table’s row headings).
Figure 6-3 illustrates a situation in which you would use two values, the pro- duction date and the part number, to look up the expected production. In the 2013 Production Schedule table, the production dates for each part form the column headings in the first row of the table, and the part numbers form the row headings in its first column of the table.
Book III Chapter 6
Lookup, Information, and Text Formulas