Search for a value in a vertically-arranged data set.
Syntax:
VLOOKUP( lookup_key_value, lookup_data:Range or Array, column_index:Number {, lookup_type:Number} )
Looks up the lookup_key_value in the first column of the lookup_data range of cells (or array) and returns the corresponding value in that range of cells (or array) from the column specified by column_index.
lookup_data must be a vertically-arranged sorted set of data (a range of cells, or an array).
column_index=1
would return a value obtained from the first column of lookup_data,
column_index=2
would return a value obtained from the second column, and so on.
The lookup process is controlled by the optional lookup_type:
lookup_type | VLOOKUP action |
---|---|
1 (or omitted) |
VLOOKUP finds the largest value which is less than or equal tolookup_key_value. NB lookup_data must be sorted in ascending order (largest values at the bottom). |
0 |
VLOOKUP finds the value which exactly matches lookup_key_value. |
-1 |
VLOOKUP finds the smallest value which is greater than or equal tolookup_key_value. NB lookup_data must be sorted in descending order (largest values at the top). |