Search for a value in a vertically-arranged data set.
Syntax:
VLOOKUP(lookup_key_value, lookup_data:array, column_index:number {, lookup_type:number})
Looks up the lookup_key_value in the first column of the lookup_data array (or range of cells) and returns the corresponding value in that array (or range of cells) from the column specified by column_index.
lookup_data must be a vertically-arranged sorted set of data (an array or range of cells).
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 to lookup_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 to lookup_key_value.
NB lookup_data must be sorted in descending order (largest values at the top).
|