Académique Documents
Professionnel Documents
Culture Documents
Records
2009
Page 2
Each column of a list is a field of related information describing some characteristic of the object, person,
or place. Each row is called a record, which contains the fields that collectively describe a single object,
person, or place.
Consider the example from Employee4.xls. Notice that each column contains only one type of
information and the first row contains the labels or column headings. The columns of information include
a. ID – employee’s identification numbers
b. First name/ Last name – employees’ first and last name
c. Department – employees’ department name
d. Title – employees’ titles
e. Salary – annual salary
f. Hire date – employees’ hire dates
g. Birth Date – employees’ birth dates
h. Gender – gender
i. Clearance – None, Secret, Top Secret
Step 1: Click any cell within the list. Click Data on the menu bar
and then click Form to display the Employee Data form. The
form displays the total number of records in the list (32).
In the data form, click New button to clear the text boxes.
Notice that the “New Record” appears where the record number
and total record count were previous.
Step 2: You are about to enter a new record.
- Type 4123 in the ID text box and then press Tab to move to
the next text box.
Tip: If your press Enter, Excel displays a blank data form
and stores the previous information. Click the Find Prev button to return to the record you were
working on and then continue entering information.
- Type Steve in the First Name text box and then press Tab
- Type Ballmer in the Last Name text box and then press Tab
- Type Engineering in the Title text box and then press Tab
- Type 42900 in the Salary text box and then press Tab
- Type 5/1/2002 in the Hire Date text box and then press Tab
- Type 4/14/1970 in the Birth Date text box and then press Tab
- Type M (Uppercase) in the Gender text box and then press Tab
- Type N (Uppercase) in the Clearance text box and then press Tab
- Press the Enter key to add the record to the list. Excel automatically adds the record to the end
of the current data list and displays an empty data form
- Click the Close button to close the data form and return to the worksheet
Page 3
Click any cell within the list. Click Data on the menu bar and then click Form to display the Employee
Data form.
- In the data form, click Criteria button. Excel blanks all form’s text boxes
- Click the First name text box and type Kenny to specify the search criteria
- Click the Find Next button. Kenny’s record appears in the data form. Or you can click Find
Next repeatedly until you locate the record that you want to find.
Sorting a list
The employee list is kept in Hire Date order. When a new employee joins the company, his or her record
is placed at the end of the list. Assuming that you are a manager, you have a meeting to discuss
retirement benefits of the employees of each departments. You want to have the list in order by
department and salary.
Step 1: Click any cell within the list. Click Data on the menu bar and then click Sort.
Often, sorting a list on only one field is not adequate because
larger lists frequencetly have groups of entries that are identical
in a particular field. A tie exists when one or more records have
the same value for a field. When tie occur, your must sort the
groups of records that tie on a particular field by another field—
the secondary sort field—to break the tie.
Step 2: In this case, you want the employee list sorted in order by
department and then by salary within each department.
- Click the Sort by list arrow to display the list’s column
headings. Click column heading corresponding to the
primary sort field, which is Department, and click the Ascending or Descending option button.
- Click the first Then by list arrow to display the list’s column headings. Click the column
heading of the secondary sort field, which is Salary, and then click the Ascending or
Descending option button for the second sort field.
Page 4
Filtering
From the meeting, you have been assigned to analyse the salary of employees by department and/or
Title. Data filtering enables you to view just a portion of the list and hide selected rows. You want to
view the range of salary for engineers, managers, etc.
Step 1: Click any cell within the list. Click Data on the menu bar, point to Filter, and click AutoFilter
to turn each column into a list box with a list arrow beside each label.
Step 2: Click the list arrow next to the label you want to use as a filter. Then, click the criteria in the
drop-down list by which you want to filter the list.
Tips: - You can remove the filter by click Data on the manu bar, Point to Filter, and click
AutoFilter again. If you click Show All instead of AutoFilter, all records reappear, but
the AutoFilter list arrows remain next to each column heading.
- With any criteria in effect, you can refine your query by using several AutoFilter drop-
down filters in tandem. Doing so further restricts the rows that appear in the filtered list.
For example, you can filter for Security Engineers who are F (female).
In some case, you may want to define your own criteria for filtering. For example, you want to send out
mailers to all male employees who were born in the 1960s because a company policy change affects their
health benefits. Custom AutoFilters can be used to select appropriate records.
Step 1: With all criteria cleared but the AutoFilter list
arrows still visible click Birth date column list arrow.
The criteria filter list appears below the Birth Date
column heading.
Step 2: Click Custom… to display the Custom AutoFilter
dialog box
Step 3: Click the top left list box and then click is greater
than or equal to. Click the top right list box and then
type 1/1/1960. Then click And option button.
Step 4: Click the bottom left list box and then click is less than or equal to. Click the bottom right list
box and then type 12/31/1969 in the list box. Then click OK to apply custom filter.
Using Subtotals to analyse a list
Page 5
When you have an Excel list data whose columns each contain one type of data, you can produce
summary information about the numeric columns. With data arranged in order by department or title, you
can insert a function to compute the total salary of each department or title. However, for a list with
thousands of records, it takes minutes or hours to do so. Subtotals offers several list summary features
including count, sum, average, minimum and maximum. Subtotals command automatically creates the
appropriate formula when it senses a change in the value of a specified field. Assuming that you want to
know the total salary of each department, you can simply insert subtotal in the employee list.
Step 1: Click Data on the menu bar and then click Subtotals.
Step 2: In the Subtotal dialog box, click the AT each change in
list box and then click Department in the drop-down list to
tell Excel to create subtotals by department.
Step 3: Click the Use function list box and then click Sum.
Tip: In order to use Subtotals feature, you must sort the list on the
a selected field. You can remove subtotals by repeating step 1 and
click Remove All.
Assuming that you want to know which department has the highest average salary. You can use a pivot
table to report.
Step 1: Click any cell within the list. Click Data on the
menu bar, and then click PivotTable and PivotChart
Report to launch the PivotTable and PivotChart Wizard.
Specify Microsoft Office Excel or database as a source
of data and select PivotTable. Then click the Next
button.
PivotTable PivotTable
drag-and- Field List
drop area
Page 7
Step 5: Click and drag Salary field from Pivot Table filed list to the Drop Data Items Here of the pivot
table framework.
Step 6: Click anywhere inside the pivot table
framework and then click the Field Settings
button on the PivotTable toolbar. The
PivotTable Field dialog box opens. (You
can also find Field Settings button on your
right click on the mouse anywhere in the
pivot table framework.)
Step 7: Click Average in the Summarise by list
box. Click the OK button to return to the
PivotTable report.
Tips: - You can format values in the pivot table by clicking the Number… button on the PivotTable
Field before clicking the OK button. If you did not do it, you can use Field Settings button to do
it later.
- You can replace column and row fields in the pivot table by dragging new fields into the areas.
Alternatively, you can click on the row or column headings and select Hide from the PivotTable
Toolbar. Hide removes data from the pivot table area. Hide is also available on a right click on
the row or column headings.
You also want to analyse average salaries of male and female in each department. You add another field
to a pivot table.
Acknowledgement: The content of this tutorial has been adapted from Microsoft Office Excel 2003: Complete by
S. Haag ad J. Perry (McGraw-Hill)
Checking figures:
1. Camembert Pierrot = 1577 units
2. Côte de Blaye = $141,396
3. The following sales orders are discounted at 25%
31179 25.00%
31168 25.00%
31150 25.00%
31130 25.00%
31096 25.00%
31041 25.00%
31021 25.00%
31015 25.00%
31003 25.00%
30969 25.00%
30962 25.00%
30946 25.00%
30941 25.00%
30905 25.00%
30904 25.00%
30873 25.00%
30858 25.00%
30822 25.00%
30817 25.00%
30800 25.00%
30793 25.00%
30792 25.00%
30783 25.00%
30754 25.00%
30749 25.00%
30746 25.00%
30743 25.00%
30713 25.00%
30705 25.00%
30698 25.00%
30564 25.00%
30563 25.00%
30534 25.00%
30382 25.00%
30528 25.00%
30475 25.00%
4. The following sales orders have the top ten highest value
30968 $16,387.50
31084 $15,810.00
31133 $12,615.05
30992 $11,380.00
30520 $11,188.40
30920 $10,952.84
31000 $10,835.24
30582 $10,495.60
30643 $10,191.70
30794 $10,164.80