The LOOKUP function searches in a one-row or one-column range for a value and returns a value from the same position in a second one-row or one-column range.
Formula:
= LOOKUP(lookup_value, lookup_vector, [result_vector])
Explanation:
- Lookup_value is required, the value to look for.
- Lookup_vector is required, one data row or one data column.
- Result_vector is optional, a range that contains only one row or column.
Cautions:
- When LOOKUP function can't find the lookup_value, the function returns the largest value in lookup_vector that is less than or equal to the lookup_value.
- When lookup_value is smaller than the smallest value in lookup_vector, function returns the #N/A error value.
- The data range must be in ascending order.
=LOOKUP("Jackson",A1:A6,C1:C6)
Looks up "Jackson " in array A1:A6, and returns the value with the same position in array C1:C6, which is 53308.
=LOOKUP(61877,C1:C6,A1:A6)
Looks up "61877 " in array C1:C6, and returns the value with the same position in A1:A6, which is "Liam".