Sorting records

From Wiki
Jump to navigationJump to search



Sorting arranges the visible cells on the sheet. In Calc, you can sort by up to three criteria, with each criterion applied one after the other. Sorts are handy when you are searching for a particular item, and become even more powerful after you have filtered data.

In addition, sorting is often useful when you add new information. When a list is long, it is usually easier to add new information at the bottom of the sheet, rather than adding rows in the proper places. After you have added information, you can then sort it to update the sheet.

You can sort by highlighting the cells to be sorted, then selecting Data > Sort.

File:DataSort-Criteria.png
Customizing a sort of data


The selected cells can be sorted by the order of information in up to three columns or rows, in either ascending (A-Z, 1-9) or descending (Z-A, 9-1) order.

On the Options tab (below) you can choose the following options:

File:DataSort-Options.png
Options for a sort of data

Case sensitive

If two entries are otherwise identical, one with an upper case letter is placed before one with a lower case letter in the same position.

Range contains column labels

Does not include the column heading in the sort.

Include formats

A cell's formatting is moved with its contents. If formatting is used to distinguish different types of cells, then use this option.

Copy sort results to

Sets a spreadsheet address to which to copy the sort results. If a range is specified that does not have the necessary number of cells, then cells are added. If a range contains cells that already have content, then the sort fails.

Custom sort order

Select the box, then choose one of the sort orders defined in Tools > Options > Spreadsheet > Sort Lists from the drop-down list.

Language

Select the dictionary that you want to use for your document and depending which dictionary you choose there may be other options to choose.

Direction

Sets whether rows or columns are sorted. The default is to sort by columns unless the selected cells are in a single column.


Documentation note.png If you only select some of the data in your spreadsheet you may see the following dialog. You can choose a 'range' by extending the selection to include more or all data or you can just choose the current selected information.
File:DataSortRange.png
Choosing a range for a sort of data


Content on this page is licensed under the Creative Common Attribution 3.0 license (CC-BY).

nl:NL/Documentation/OOo3_User_Guides/Getting_Started/Sorting_records