Skip to main content
Version: Streamsheets 3.0

STACK.SORT

This function uses the criteria range to select and copy one or multiple rows from the StackRange to the TargetRange. Optionally it deletes all found records after the extract operation (remaining rows all move up!)

Syntax

=STACK.SORT(StackRange, SortSettingsRange)

Arguments

NameTypeDescription
StackRangeRangeRange, where the source range items are added to. The first row of the StackRange is a title range and remains unchanged.
SortSettingsRangeRangeThe SortSettingsRange has two rows. In the first row you have all or part of the labels of the StackRange (may be in another order). The cells in the second row either contain TRUE or FALSE. TRUE is ascending, FALSE is descending. If you have more than two rows in the SortSettingsRange then it is first sorted after the field name in the second row, then after the field name in the third row, etc.

Return

TypeDescription
Boolean or ErrorTRUE, if no error occurred, otherwise error value.

Examples

ABCD
1NameAgeCityStreet
2TRUE
3
4NameAgeCityStreet
5Maier43SidneyMain Street
6Miller53SidneySouth Street
7Jones45SidneyWest Street
8Maier35SidneyHigh Street
FormulaResultComment
=STACK.SORT(A4:D8, A1:D2)
After calling STACK.DROP