# AGGREGATE

#### Syntax

**AGGREGATE**(*range;* *aggregateCondition*)

* *range* - the range where rows should be aggregated - ***Value type**: range*
* *aggregateCondition* - the criteria defining which rows should be aggregated - ***Value type**: row range (optional, first row of range as default)*

The function returns a copy of range, where all rows (or columns) which have the same according value in *aggregateCondition* are aggregated (combined).

#### Remarks

* If the cells of the aggregated rows contain numerical values, they are added up.

**Examples**

In this example, the second parameter can be omitted, because by default the AGGREGATE function uses anyway the first column of *range* as *aggregateCondition*.

<figure><img src="/files/fIMQwOFqxaEetd1T7Wt7" alt=""><figcaption></figcaption></figure>


---

# 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/aggregate.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.
