VLOOKUP

The VLOOKUP function searches a range for specified value and return specified column data.

For example, assume a data table like below:

332

Use formula =VLOOKUP(7, A2:E6, 2) to search this table for index 7:

333

Result is:

334

When index value 7 was found, return the second column data from the specified range – “Windows XP”.

High Importance-20 There is some notes when using VLOOKUP function:

  1. Data in first column of search table should be sorted (ascending or descending)
  2. Search target column can only be the first column in search table (cannot specify to search other columns)
  3. Search target column can contains number or text, but must be sorted
  4. If specified index value cannot be found, ReoGrid returns the most similar value, see example below

Example: when specified index value cannot be found

When specified index value cannot be found, ReoGrid returns the most similar value in the search table, for example, use formula =VLOOKUP(4, A2:E6, 2) search the data table above, index value 4 doesn’t exist in first column of search table.

335

Result is:

336

‘Windows 2000’ was displayed, the value in row of index value 3, the most similar to specified index value 4 in formula. To exact match the specified index value, see the next section.

Exact match specified value

To force ReoGrid exact match specified index value, set VLOOKUP function 4th argument to TRUE, for example:

337

Result is:

338

Nothing returned from VLOOKUP function because specified index value was not found in search table.


Return to Formula Functions