# 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)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.nedyx.com/nedyx/clearlines-functions/range-functions/lookup.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
