# FLIPCELLS

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

**FLIPCELLS**(*range*; *direction*)

* *range* - the range which should be flipped - ***Value type**: range*
* *direction* - the direction in which the range should be flipped - ***Value type**: constant (optional, default: horizontal)*

  Possible values are

  * *horizontal* - flip the range horizontally (reverse order of columns)
  * *vertical* - flip the range vertically (reverse order of rows)
  * *both* - flip the range both horizontally and vertically

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

* This function is particularly useful in combination with MOVECELLS to guarantee that leaf cells of a column-based hierarchy appear in the first column.
* Common use cases include easier retrieval of leaf elements from a column-based hierarchy and quick reversion of row order.


---

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