You are on page 1of 9

MICROSOFT EXCEL

VLOOKUP/ HLOOKUP/
XLOOKUP
INTRODUCTION - LOOKUP FUNCTION

The Excel LOOKUP function performs an approximate match lookup in a one-column or one-
row range, and returns the corresponding value from another one-column or one-row range.

H
VLOOKUP HLOOKUP XLOOKUP
VLOOKUP is a function which allows you to HLOOKUP searches for a value in the top XLOOKUP function searches a
find a value from one column of data and row of a table or an array of values, and range or an array, and then
returns it’s respective or corresponding then returns a value in the same column returns the item
value from another column. from a row you specify in the table or corresponding to the first
array. match it finds.
The V in VLOOKUP stands for “Vertical."
The H in HLOOKUP stands for "Horizontal."
VLOOKUP - SYNTAX

=VLOOKUP(lookup_value, table_array, column_index_num, [range_lookup])

table_array : The array or range where the lookup


1 lookup_value : The value you want to look
up.
2 value is located. Remember that the lookup value
should always be in the first column in the range for
VLOOKUP to work correctly.

3 column_index_num : The column number in


the range that contains the return value. 4 [range_lookup] : Optionally, you can specify TRUE if
you want an approximate match or FALSE if you want
an exact match of the return value. If you don't specify
anything, the default value will always be TRUE or
approximate match.
EXAMPLES:

1
HLOOKUP - SYNTAX

=HLOOKUP(lookup_value, table_array, row_index_num, [range_lookup])

table_array : The array or range where the lookup


1 lookup_value : The value you want to look
up.
2 value is located. Remember that the lookup value
should always be in the first row in the range for
HLOOKUP to work correctly.

3 row_index_num : The row number in the


range that contains the return value. 4 [range_lookup] : Optionally, you can specify TRUE if
you want an approximate match or FALSE if you want
an exact match of the return value. If you don't specify
anything, the default value will always be TRUE or
approximate match.
EXAMPLES

1 Example 1 - The goal is to look up the


correct level for a numeric rating 1-4. In
cell D5, we put the HLOOKUP formula,
where table is the named range G4:J5. And
the last argument, range_lookup is set to
FALSE to require an exact match.

2 Example 2 - When you want to check a


range of several columns and extract the
first text value found. You can do this with
the HLOOKUP function and the asterisk
wildcard character (*).
In the formula shown, HLOOKUP is
configured like this;
=HLOOKUP(“*”,C5:E5,1,0)
XLOOKUP - SYNTAX
=XLOOKUP(lookup_value, lookup_array, return_array, [if_not_found],
[match_mode], [search_mode]) 

1 lookup_value : The value you want to look


up. 2 lookup_array : The array or range where the lookup
value is located.

3 return_array : The array or range where


the lookup value should return. 4 [if_not_found] : Where a valid match is not found,
return the [if_not_found] text you supply(or it shows
#N/A).

5 [match_mode] : Specify the match type:


0- Exact match. If none found, return #N/A.
6 [search_mode] : Specify the search mode to use:
1- Search starting at the first item. This is the default.
This is the default. -1- Reverse search starting at the last item.
-1- Exact match. If none found, return the 2- Binary search that relies on lookup_array being
next smaller item. sorted in ascending order.
1- Exact match. If none found, return the -2- Binary search that relies on lookup_array being
next larger item. sorted in descending order.
EXAMPLES
2
1

Example 1  uses XLOOKUP to look up a country name in Example 2  looks up employee information based on an
a range, and then return its telephone country code. It employee ID number. Unlike VLOOKUP, XLOOKUP can return
includes the lookup_value (cell F2), lookup_array (range an array with multiple items, so a single formula can return
B2:B11), and return_array (range D2:D11) arguments. both employee name and department from cells C5:D14.
THANK YOU!

You might also like