Vous êtes sur la page 1sur 9

Microsoft Excel for Windows (Tutorial #1)

Objectives of this tutorial


This tutorial is designed to further strengthen your skills in using Excel. This will assist you to work with
and maintain lists/databases for further business analysis. In this tutorial, you will learn to:
• work with lists/ databases
• manipulate lists for further business analysis
• create and use pivot tables to analyse data

Working with Lists/ databases


Sometimes it is easier to store and work with data in spreadsheet format than to use a database package.
In this exercise, you will need to copy another file from https://203.131.208.148/registrar/login.asp This
file contains some employee data for CS Inc. – we will use the data to manage a list and learn how to
manipulate the list into a meaningful order.
In this section you will learn how to work with and maintain lists/database.
Before you begin working with lists/databases in Excel, it is important to understand basic ideas of
lists/databases.
A list is a collection of data arranged in columns and rows in which each column displays one particular
type of information. In spreadsheet software, a list processes the following characteristics:
• Each column has only one type of information.
• The first row in the list contains the labels or column headings.
• The list does not contain any blank rows.
• The list is bordered on all four sides by blank rows and blank columns.

Fields: e.g. Employee ID

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

Adding a new record to the list

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

Searching and deleting a record


In a large list that containing perhaps 500 records or more, looking for a particular employee’s record
could be very difficult. The procedure you follow to search or to delete a record form a list is similar to
updating a record.

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.

You decide to delete Kenny’s record.


- In the data form, click Delete button and then click the OK button to confirm the deletion. Excel
deletes the record and automatically shifts rows up.

Manipulating Lists for further business analysis


Lists can be manipulated in a more meaningful format for business analysis. Manipulating lists include
sorting, filtering, and subtotalling the lists.

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.

AutoFilter list arrow

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.

Collapse (+)/ Expand (-)


Symbols allow display
of more or fewer details
Page 6

Creating and Using Pivot Tables


Pivot Tables provide a three-dimensional view of data that is often too complicated to understand in its
raw list form. For example, you want to compute the salaries paid to male and female in each department.
You may use combinations of Sort and Subtotals commands to do the task. One way or the other, the
combinations can only show two-dimension views of data, which are the subtotals of salaries by gender
or by department. Another question that you may want to answer is which department has the highest
average salaries. Try using what you have learned in the previous sections and answer the questions
above. A pivot table is an interactive table enabling you quickly to group and summarise large amounts
of data. Instead of passively reading the report, anyone with an Excel pivot table can alter or move
variables around to make the views that is easily to be understood.

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.

Step 2: In the second PivotTable Wizard dialog box, you


specify the exact cell range containing the list to
summarise. Then click the Next button.

Step 3: Click New worksheet option. Then click


Finish. Excel creates an empty pivot table and
pivot chart as new worksheets.

PivotTable PivotTable
drag-and- Field List
drop area
Page 7

PivotTable appears when you create a pivot

Step 4: Click and drag Department


field from Pivot Table filed list
to the Drop Row field area of
the pivot table framework
Tips: You can also set department
field as column fields too.

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.

Step 8: Drag Gender field button from the


PivotTable Field List to the to Drop Column
Field Here. (Or where “Total” is presented.)
Release the mouse. Excel displays the newly
rearranged format table, containing two
column fields, to display average salaries
broken out by Department and Gender.
Page 8

Using page Fields


You can use a pivot table’s Page field to hide and unhide one or more data items. Page fields provide a
slice, or cross section, of your data. For example, you want to add Clearance filed as a column field in
the pivot table. The table is overloaded with the detail.

You can slice Gender or Clearance to create a


unique view of a specific value. The following
picture shows the pivot table that use Gender
as Page Fields. This can be done by dragging
the Gender field button to the Drop Page
Fields Here area.

Sorting on a pivot table


You may want to see average salaries of
each department sorted from the highest to
the lowest. This cannot be done by using a
normal Sort command.
Step 1: Click Department column in the
pivot table framework and then click the
Sort and Top 10… button on the PivotTable
toolbar. The PivotTable Sort and Top 10
dialog box opens.
Step 2: Click Descending in the AutoSort
Options area. Then select Average of Salary from the Using field. (For a larger data, you may select to
view only top ten items by clicking On in the Top 10 AutoShow area.) Click the OK button.

Acknowledgement: The content of this tutorial has been adapted from Microsoft Office Excel 2003: Complete by
S. Haag ad J. Perry (McGraw-Hill)

In your own time


In this exercise, you will need to copy another file from Excel4_SaleDiscount.xls Name the file
SaleDiscount4.xls This file contains sales data for CD supermarket, Inc. You need to analyse this data to
answer the following business questions:
1. Which are my best selling products by volume?
2. Which products generate the most revenue?
3. On average, which sales order are discounted the most?
4. What are the top ten sales order values and how much are they?
Page 9

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

Vous aimerez peut-être aussi