Sort
Sort the rows of a range, an Excel table or the used area by one column and an optional second column, ascending or descending, keeping a header row in place; or sort only that column's cells.
Command in the Excel toolkit · id ooa.excel/sort_range · 11 inputs (1 required), no outputs
Inputs
| Input | Type | Required | Default | What it is |
|---|---|---|---|---|
| Column | Any | Yes | Sort column: letter, 1-based sheet column number, or header name. | |
| Descending | Boolean | No | false | Sort from largest to smallest. |
| First row is the header | Boolean | No | The first row is a header and stays at the top; the workbook's open setting (true by default) when empty. | |
| Range | String | No | Range to sort; the used area when empty. | |
| Sheet | String | No | Sheet name; active sheet when empty. | |
| Session | String | No | excel | Workbook session. |
| Then by | Any | No | Second sort column used when the first column's values are equal: letter, number or header name. | |
| Then descending | Boolean | No | false | Sort the second column from largest to smallest. |
| Table | String | No | Excel table name, e.g. Table1: sort that table's rows (its header row stays); sheet and range are then not used. | |
| Only column | Boolean | No | false | Sort only the cells of the sort column and leave the other columns as they are (rows no longer stay together). |
| Sort as | String | No | auto | auto keeps numbers before text as Excel does; number sorts numbers written as text by their value; text sorts everything as text. |