This page provides details of the Vlookup function syntax and rules of use.
You might find it useful to bookmark this page to refer back to, during later sections of the tutorial.
This will be followed by practical examples of the Vlookup function to help you to put this information to use.
The syntax of the Excel Vlookup function is:
where the function arguments are:
lookup_value | - | The value that you want to search for. | ||||||
table_array | - |
The array of data that is to be searched for the lookup_value. Note: The Vlookup function searches in the left-most column of this array. |
||||||
col_index_num | - | An integer, specifying the column number of the supplied table_array, that you want to return a value from. | ||||||
[range_lookup] | - |
An optional logical argument that describes what the function should return in the event that it does not find an exact match to the lookup_value. The [range_lookup] can be set to TRUE or FALSE, meaning:
|
A reminder of the Vlookup syntax, in the form of a handy Vlookup Quick Reference Card, can be printed from the Microsoft Office website.
It is important that you understand the following rules when using the Vlookup function in Excel:
Rules for the Vlookup Using an Exact MatchIf the [range_lookup] argument is set to FALSE, the Vlookup searches for an exact match to the lookup_value. If an exact match is not found, the function returns the #N/A error. In this case, the following rules apply:
|
Rules for the Vlookup Using the Closest MatchIf the [range_lookup] argument is set to TRUE (or omitted), the lookup_value is matched to the closest value below or equal to this value. In this case, the following rules apply:
|
The next two sections of the Vlookup tutorial describe two Vlookup examples, in which an exact match is required and a closest match is required.