Owner manual

Chapter 9 Reference Functions 217
LOOKUP
The LOOKUP function nds a match for a given search value in one range, and then
returns the value in the cell with the same relative position in a second range.
LOOKUP(search-for, search-where, result-values)
 search-for: The value to nd. search-value can contain any value type.
 search-where: The collection containing the values to be searched. search-where is
a collection containing any value type.
 result-values: An optional collection containing the value to be returned based on
the search. result-values is a collection containing any value type.
Usage Notes
Both  search-where and result-values are normally included and are specied as either
multiple columns or multiple rows, but not both (one dimensional). However, for
compatibility with other spreadsheet applications, search-where can be specied as
both multiple columns and multiple rows (two dimensional) and result-values can
be omitted.
If  search-where is two dimensional and result-values is specied, the topmost row or
leftmost column, whichever contains more cells, is searched and the corresponding
value from result-values is returned.
If  search-where is two dimensional and result-values is omitted, the corresponding
value in the last row (if the number of columns included in the range is larger) or
column (if the number of rows included in the range is larger) is returned.
Examples
Given the following table:
=LOOKUP(”C”, A1:F1, A2:F2) returns 30.
=LOOKUP(40, A2:F2, A1:F1) returns D.
=LOOKUP(”B”, A1:C1, D2:F2) returns 50.
=LOOKUP(”D”,A1:F2) returns 40, the value in the last row that corresponds to “D.”