Syntax

LOOKUP(match-value, table-name, match-column, return-column)

Description

LOOKUP() scans the table named by table-name for rows in which the value of the column named by match-column matches match-value, and returns the value of the column named by return-column from one of the matching rows.

match-value will be compared to values of the column named by match-column with = (equals). match-value will be interpreted with DECIMAL(), NUMBER(), or TEXT() as appropriate before comparison if its type differs from that of column match-column.

table-name, match-column, and return-column must be a literal Text values; they cannot be expressions.

Commonly, match-column and return-column are names that have special meanings to AppSheet internals, such as date, n, t, text, time, and others. Whenever AppSheet encounters such a name as literal, unquoted text, it may produce an error indicating the expression "could not be parsed due to exception: #VALUE!". To avoid or fix this problem, enclose the problematic text in quotes.

LOOKUP() is analogous to the VLOOKUP() formula in many spreadsheet applications.

Return Value

The value from the column named by return-column from one arbitrarily-chosen row of those with a value matching match-value in the column named by match-column of the table named by table-name.

Did this answer your question?