home.gif next.gif prev.gif



LOOKUP

See also A-Z Spreadsheet Function List


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)

lookup_value is the value for which to search in the first range.

lookup_range is the first range to search and contains only one row or one column.

bullet.gif The range can contain numbers, text, or logical values.

bullet.gif To search lookup_range correctly, the expressions in the range must be placed in ascending order (e.g., -2, -1, 0, 1, 2...A through Z, False, True). The search is not case-sensitive.

result_range is 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.

See Also HLOOKUP , INDEX , and VLOOKUP functions

ug17_lkp.gif

Examples In the preceding spreadsheet:

         LOOKUP(“North”, A2:A7, B2:B7) returns Detroit

         LOOKUP(“Alabama”, A2:A7, B2:B7) returns #N/A