LOOKUP


Description Searches for a value in one range and returns the contents of the corresponding position in a second range.

Syntax LOOKUP ( lookup_value, lookup_range, result_range )
Argument Description
lookup_value The value for which to search in the first range.
lookup_range The first range to search and contains only one row or one column. The range can contain numbers, text, or logical values. To search lookup_range correctly, the expressions in the range must be placed in ascending order (for example, -2, -1, 0, 1, 2 ... A through Z, False, True). The search is not case-sensitive.
result_range A range of one row or one column that is the same size as lookup_range.

Remarks If lookup_value does not have an exact match in lookup_range, the largest value that is less than or equal to lookup_value is found and the corresponding position in result_range is returned. When lookup_value is smaller than the data in lookup_range, #N/A is returned.

Examples The following examples use this worksheet.


This function returns Detroit:

LOOKUP("North", A2:A7, B2:B7)

This function returns #N/A:

LOOKUP("Alabama", A2:A7, B2:B7)

See Also HLOOKUP, INDEX (non-array type), VLOOKUP