Professional Documents
Culture Documents
VLookup and HLookup PDF
VLookup and HLookup PDF
tip
The LOOKUP function uses specific criteria to search for a value in a single
column or row of a table, and then it displays a value from the corresponding
position in a second table. For example, suppose you had a worksheet in
which one column contains a room number and the second column con-
tains the room type. You could perform a lookup for room 102 in the first
column. Excel would then return the room type stored in the correspond-
ing column. For example, a lookup for room 102, located in the third row
of the first column, would return Single Room/Queen Bed from the third
row of the second column. The chief advantage of the LOOKUP function
is that you do not need to know the row or column position where the
desired lookup information is stored.
Argument Description
lookup_value The value to be found in the row or the column.
The lookup value can be a constant value, a text
contact enclosed in quotation marks, or the ad-
dress or name of a cell that contains a numeric or
text constant.
table_array The table of information in which data is looked
up. This can be the row-and-column coordinates
of the table or the name of a range.
row_index_num The numeric position of the row that is to be
searched (used only for HLOOKUP).
col_index_num The numeric position of the column that is to be
searched (used only for VLOOKUP).
range_lookup If the function is to return the nearest value, even
if there is no match, this value should be set to
TRUE. If an exact match is required, this value
should be set to FALSE.
Be careful not to insert any spaces 1 Open the Employee History Bonus workbook.
when you type this formula. 2 Click cell E7, and type =vlookup(d7,bonustable,2).
Cell D7 contains the number of years worked, which is the lookup
Bonustable has already been defined value. VLOOKUP looks for a match to the D7 value in the bonustable
as a range name for cells A20:C28.
You can verify this by clicking the range (A20:C28), and then it looks in the second column, where it
Name down arrow and clicking finds the match.
Bonustable. Arguments used in a
VLOOKUP or HLOOKUP function are 3 Press Enter.
not case-sensitive, so you can type
them in either uppercase, lowercase, The result of the function ($1000.00) appears in cell E7.
or any combination of uppercase and 4 Click cell E7, and drag the fill handle down to cell E15.
lowercase characters. Also the
VLOOKUP and HLOOKUP function The bonuses for the other employees are calculated.
names are not case-sensitive.
tip
If you have trouble remembering the syntax for an HLOOKUP or VLOOKUP
function, you can use the Function Arguments dialog box to help you
enter the lookup information. On the Insert menu, click Function or click the
Insert Function button next to the Formula bar to display a list of catego-
ries and function names. In the categories list, click Lookup & Reference. In
the function list, click VLOOKUP or HLOOKUP, and click OK. Excel will then
prompt you for the information required to perform the lookup.