# SORT

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

**SORT**(*range;* *sortColumn1;* *sortOrder1;* …; *sortColumnN;* *sortOrderN*)

* *range* - the range which is to be sorted - ***Value type**: range*
* *sortColumn1-N* - the column which is used to sort *range* - ***Value type**: a column range*
* *sortOrder1-N* - the sort order - ***Value type**: constant*
  * <mark style="color:red;">up</mark> - *range* is sorted ascending
  * <mark style="color:red;">down</mark> - *range* is sorted descending

#### Example <a href="#example.4" id="example.4"></a>

In this example, the SORT function returns the content of table1, sorted upwards by the values in its second column:

<figure><img src="https://3148043601-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FL43fiRbeRtPnTjMpbGNO%2Fuploads%2Fgit-blob-5a4569e6e3ce8bc9ea1c1baffc9bf29f86389bd0%2Fgrafik%20(340).png?alt=media" alt=""><figcaption></figcaption></figure>
