When you work with large sheets containing data such as employees, products, or lists, it is useful to be able to sort and filter the data. Calc provides you with the ability to sort spreadsheet data and also to filter data; in effect, these features (and other database features provided by Calc) allow you to use Calc for database management.
Open Define Range Dialog
The first thing you need to do is identify the database for Calc. Select all the data in your database list including your column headings (these are actually used to identify the column that will be used when sorting the items in the list). Select Data, Define Range. The Define Database Range dialog box opens.
Name Database Range
Type a name for your database in the Name box of the Define Database Range dialog box. You can enter any descriptive name; this is not a filename. The name is used to identify the database (the selected list) only. Click OK.
Open Sort Dialog Box
Now you can sort the database by a particular field (column heading). Click in any cell that is part of the database list that you named in step 2. Select Data, Sort. The Sort dialog box opens.
Select the first field drop-down box to select the field (column heading) that you want to use to sort the list. If you want to select a secondary sort criterion (or even a third), use the additional criteria drop-down lists provided.
Click OK. The database list is sorted based on the criteria that you set.
You can also quickly sort a database or a selected list using the Sort Ascending or Sort Descending buttons on the Main toolbar. Only select the items in the list to use these buttons. Do not select your column headings (the field names that you used to describe the columns such as Name, Address, and so on); they will end up being sorted with the other data.
You can also quickly filter your data; meaning view a subset of the data based on a particular field and its contents. For example, you could view all your clients in Indiana by doing an autofilter of a State field where the criterion is "Indiana".
Select the AutoFilter button on the Main toolbar. A set of drop-down lists appears to the right of each of your column headings. Select a list and choose a field parameter (the drop-down list shows each of the entries that you have entered in that particular field). As soon as you select an entry in the field drop-down box, the database list will be filtered based on the selection.
You can further filter the database by selected parameters for any of the other fields using that field's drop-down list. After you have finished filtering the database list, select the AutoFilter button. The Database list appears in its entirety, and the autofilter drop-down lists for each column heading disappear.
You can also create more complex filters that allow you to filter using conditional statements. To open the Standard Filter dialog box, select Data, Filter, Standard Filter. Select the field or fields that you want to filter the list by and include conditional statements as needed.