LisaCalc: Sorting

There is a way of sorting in LisaCalc. Let's say, for example, that you
wanted to sort a column of numbers (B1:B35) in Ascending order. To do this,
you need to set up an additional column of formulas like this:

In the first cell (C1), put

search(B1:B35,cell<result,500,cell)

In the next cell (C2), put

search(B1:B35,cell<result and cell>C1,500,cell)

Now, Paste Adjust it to C3:C35, adjusting the C1. This will search the
range B1:B35 and sort them in ascending order. The 500 value is any number
larger then the largest number in the range. To sort in Descending order, the
formulas would look like this:

In the first cell (C1), put

search(B1:B35,cell>result,1,cell)

In the next cell (C2), put

search(B1:B35,cell>result and cell<C1,1,cell)

and then Paste Adjust it to C3:C35, adjusting the C1.

Please keep a couple of things in mind when sorting:

1. This method will only sort a single row or column, NOT entire rows or
columns as in LisaList.
2. If there are repeats of numbers in the range you are sorting, they will
show up as NAs at the end of the list.
Published Date: Feb 18, 2012