Sorting Data

In the simple example shown below, the data consist of the names and countries of a number of mountains together with their height above sea level. Calligra Sheets can sort data such as this in different ways.


Screenshot of sorted data

We may want the data sorted so that the names are in alphabetical order. To do this select the area containing the data (A2:C7 in this case) and choose Sort... from the Data menu. This opens the Sort dialog box.

Sorting is done alphanumerically, and the default is case sensitive, numbers coming before uppercase letters which come before lowercase letters, so that cells containing the entries Cat, bar, 77 and Bat would be sorted into the following order: 77 Bat Cat bar.

In the Direction area of this dialog box select to sort in rows or columns. If you check the First row contains column headers or First column contains row headers box data in the first row or column will not be included in the sort operation.

The rows or columns are sorted in the specified order, which can be changed using the Move Up and Move Down buttons. Using the example in the above screenshot, choosing column B as the first key and column C as the second would sort the data by country and, for each country, by height.

Uncheck the option Case Sensitive to get a sort not depending on capitalization and switch the sort order between Ascending and Descending by clicking on the cells in the column Sort Order.

The Details >> extension of the dialog allows you to sort using the order of items in a custom list such as January, February... instead of alphanumerically. The cell format is moved with the cell content, if you select Copy cell formatting (Borders, Colors, Text Style).