> For the complete documentation index, see [llms.txt](https://docs.nedyx.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.nedyx.com/nedyx/clearlines-functions/range-functions/lookup.md).

# LOOKUP

#### Syntax <a href="#syntax.2" id="syntax.2"></a>

**LOOKUP**(*keyColumn*; *rangeKeys; range; orientation*)

* *keyColumn* - the column defining the order how the rows of range are returned - ***Value type**: column range*
* *rangeKeys* - the column to search for the keys of *keyColumn* - ***Value type**: column range*
* *range* - the range from which the rows are returned in the order defined by *keyColumn* - ***Value type**: range*
* *orientation* - the orientation of the LOOKUP operation - ***Value type**: constant (optional, default value: <mark style="color:red;">vertical</mark>)*\
  Possible values are
  1. *<mark style="color:red;">vertical</mark>* - as described above
  2. *<mark style="color:red;">horizontal</mark>* - the LOOKUP function maps columns instead of rows of *range* to the key values. In this case, a row range is used for the parameters *keyColumn* and *rangeKeys*.

#### Remarks <a href="#remarks.1" id="remarks.1"></a>

* If *rangeKeys* has duplicated values,
  * numeric cells are summarized
  * the first non-numeric cell value (from top to bottom) is returned in the return range

#### Example <a href="#examples" id="examples"></a>

![](/files/lIBpxjYZzFfEjIqU4Rp1)
