Search a row or column using LOOKUP
LOOKUP is similar to HLOOKUP and VLOOKUP. The search range for the LOOKUP function is a single sorted row or column. LOOKUP has two forms:
LOOKUP(search_value; search_range; return_range)
The search value is the same as HLOOKUP and VLOOKUP. The search range, however, must be a single row or a single column; for example, A7:A12 (values in column A) or C5:Q5 (values in row 5). If the return_range is omitted, the matched value is returned. Functionally, using LOOKUP without a return range is the same as using HLOOKUP or VLOOKUP with a column index of 1.
The return range must be a single row or column containing the same number of elements as the search range. If the search value is found in the fourth cell in the search range, then the value in the fourth cell in the return range is returned. The return range can have a different orientation than the search range. In other words, the search range can be a row and the return range may be a column.
Use LOOKUP when:
- The search data is sorted in ascending order.
- The search data is not stored in the same row, column, or orientation as the return data.