Syntax
| Parameter | Description |
|---|---|
| lookup_value | Parameter of the LOOKUP function. |
| lookup_vector | Parameter of the LOOKUP function. |
| [result_vector] | (Optional.) Parameter of the LOOKUP function. |
Examples
Grade lookup
=LOOKUP(85, {0,60,70,80,90}, {"F","D","C","B","A"})
Price tier
=LOOKUP(A1, B1:B10, C1:C10)
Last non-empty value
=LOOKUP(2, 1/(A1:A100<>""), A1:A100)
Common Errors
Occurs when the lookup value is smaller than the smallest value in the lookup range. No match can be found.
Occurs when the result vector is a different size than the lookup vector.
Tips
LOOKUP always does an approximate match on sorted ascending data. If your data isn't sorted or you need exact match, use VLOOKUP with FALSE or XLOOKUP.
=LOOKUP(2,1/(range<>""),range) is a popular formula to find the last non-empty cell. It works because 1/TRUE=1 and LOOKUP finds the last 1.
LOOKUP is a legacy function. XLOOKUP (or VLOOKUP with exact match) is more flexible, doesn't require sorted data, and handles errors better.
Try LOOKUP in Viztab
Import your data and use LOOKUP with 370+ other formulas. No signup required.
Open Viztab