5.0  SPREAD SHEET PACKAGE

5.12 Database management

 


5.12.4 Sorting the Database

 

In this portion you will see the various ways in which you can sort the database.

 

5.12.4.1 Using One Sort Column

 

1.   The simplest way to sort a database is to sort it on one column. You indicate which column Microsoft Excel should use and in turn it re-arranges the rows of the selected range. In the EMPLOYEE database, you will do sorting on the NAME column.

2.   Select the range A5:F16.

3.    Next choose Sort from the Data menu.

4.    Microsoft Excel automatically enters the last selected column in the selection in the Sort by edit box. In case it is not the NAME.

5.   By default, Microsoft Excel selects Ascending as the sort order for the records. Click OK to sort records with the current settings. The EMPLOYEE database is now sorted alphabetically on NAME of the employees.

6.   Take a note that in case of records for the Name MADHU, the records are sequenced as 2, 3 and 11. That is record number 2 is appearing first, followed by number 3 and 11 respectively.

 

5.12.4.2 Using Two Sort Columns

 

You will now take a step further and sort the EMPLOYEE database not only by NAME but also by DEPTT. field.

 

  1. With the range still selected, choose Sort from the Data menu. The previous sort column, NAME, is still entered in the Sort by edit box.In order to add a second sort column, click down arrow to the right of the first then by edit box, select DEPTT.

  2. Click on the OK button. The EMPLOYEE database is now sorted alphabetically by NAME and alphabetically within NAME on the department field DEPTT.

 

Once again take a note that in case of records for the Name MADHU, the records are now sequenced as 11, 2 and 3. That is record number 11 is appearing first, followed by number 2 and 3 respectively. See figure 12.11.

 

5.12.4.3 Using three sort columns

 

You may still want to go further and include one more column. A possible combination could be adding SALARY field. This means that first sorting is on the NAME field, within NAME field DEPTT. Field is sorted and within DEPTT. Further sorting is on SALARY. Follow the steps listed below to accomplish this:


1.   Choose Sort form the Data menu. Once again the Sort dialog box retains the selections from the previous sort.

2.   Click the down arrow to the right of the second Then by edit box, select SALARY and click OK.

You will see that the third column is now included in the sorting. Once again see the new arrangement of records for the Name MADHU. The records are now sequenced as 11, 3 and 2. That is record number 11 is appearing first, followed by number 3 and 2 respectively.  Sequencing of record 3 and 2 signifies that within SALES department, salaries are in ascending order.

 

5.12.5 Basics of List  

As talked above, a database is an organised collection of information. Microsoft Excel uses another name for database. It is called as list. A list is a table of related data with a rigid structure that enables you to easily locate and evaluate individual items of information. Each row of a list is a record that contains all the pertinent information about one component of the list.

Each cell of the list is a field that contains one item of information. All the fields in a particular column contain the same kind of information about their respective records. At the top of each column is a heading called the field name.

You will now explore Microsoft Excel’s list operations. These can be performed by choosing the Form command from the data menu to display a dialog box called a data form.

In the following sections, you will use the options in the data form to find, add, delete and modify records. The steps listed below will help you do so.  

1.       Select cell A5. This should necessarily be the first step before you choose the Form… command.

2.       Next choose Form… from the Data menu. The Data form appears.

 

As you can see the name of the sheet appears in the title bar of the dialog box. The column headings have become the field names and are displayed down the left side of the form. The first record in the list is displayed in the edit boxes adjacent to the field names.

In case a field contains a formula, the data form displays the results of the formula and the not the formula itself. Also the result is not in an edit box, indicating that you cannot edit a formula base field.

 


 

Copyright © 2001 Selfonline-Education. All rights reserved.