0% found this document useful (0 votes)
54 views

Excel 2000 Data-Management

Jjklp

Uploaded by

Timbul Muncul
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
54 views

Excel 2000 Data-Management

Jjklp

Uploaded by

Timbul Muncul
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

Excel Data Management

Academic Computing Services


A Division of Information Services
www.ku.edu/acs

Abstract: This document introduces users to using Microsoft Excel as a


database. This handout will guide a user on how to utilize
Excel’s data forms, filter lists of data, use the subtotals feature,
work with outlines, manage windows, and link data and or
formulas. It is used in conjunction with the Excel Data
Management workshop.

Contents
Introduction ....................................................................................................................... 2
Objectives ......................................................................................................................... 2
Prerequisites ..................................................................................................................... 2
Related Training Available from ACS................................................................................ 2
Using Excel As A Database .............................................................................................. 2
Data Forms ....................................................................................................................... 6
Filtering Data..................................................................................................................... 8
Subtotals ......................................................................................................................... 11
Managing Windows......................................................................................................... 14
Linking Data .................................................................................................................... 15
Getting Additional Help ................................................................................................... 16

© 2003 University of Kansas. All rights reserved


ACS Computer Training
Excel Data Management

Introduction
This class is designed for students who want to learn how to sort, manage and filter data
in Excel. Students will also learn how to expertly use the lookup and database functions.

Objectives
The goal of this workshop is to use the database capabilities of the Excel program. After
today's workshop, participants will be able to:
• Sort a database
• Extract database information
• Use the subtotal function
• Adjust the spreadsheet windows

Prerequisites
It is assumed that the participants in this workshop have either taken the Excel
Introduction workshop or have equivalent skills.

Related Training Available from ACS


All workshops offered by Academic Computing Services (ACS), a division of
Information Services, are free to KU students, staff, faculty, and approved affiliates. The
general public is also welcome to most workshops, but some ACS workshops require a
registration fee for them.
To learn more about or register for workshops, receive automatic announcements of
upcoming workshops, and track workshops you’ve registered for and have attended, visit
the ACS Web site at www.ku.edu/acs/train. You can also check our online schedule at
www.ku.edu/acs/schedule for a list of class offerings and their availability. For further
workshop related questions, please email [email protected].

Using Excel As A Database


A database is a tool for organizing, managing, and retrieving information. In Excel, the
worksheet is used as a database or list to easily store and manipulate complex data. A
database may be used to:
• Search or query to find specific data
• Sort data alphabetically and numerically by rows or columns in ascending or
descending order
• Extract subsets of the data based on defined criteria
• Perform statistical calculations on the data for analysis and decision-making
• Print data organized for specific purposes
Academic Computing Services -2- © 2003 The University of Kansas
A Division of Information Services
ACS Computer Training
Excel Data Management

Parts of a database/list
A database/list is made up of several parts. It is important to understand the terms
describing these parts:

Term Definition

Field Each column in a list is a separate field, and each of the cells within a
column is a field. A different field is used for each item that needs to be
accessed separately.

Field Name A field name is a name that identifies the data stored in a field. The top
row of a database must contain the field names.

Record A record is a single row in a database. Each record contains the same
categories of data as every other record in the database.

Computed A field containing formulas or functions.


Field

Database A range is a rectangular group of worksheet cells defined as the list or


Range database.

Creating a Database/list
After deciding on the design for a list, create the list by entering the data according to the
following guidelines:
List size: A list can be as large as an entire worksheet, but it is best to put only one list on
a worksheet. In addition make sure that there is a blank column and blank row between
the list and any other data on the worksheet. (This is not absolutely necessary but allows
Excel to select the list automatically.)
Field name location: The first row of the database must contain the field names.
Allowed values in field names: Field names must be text constants. If the field name
contains numbers, they must be formatted as text. Do not insert extra spaces at the
beginning of an entry into a field as this affects sorting and searching.
Field name length: A field name may contain a maximum of 255 characters. A field
name must not contain spaces.
Records: Every record must have the same fields, although data does not have to be
entered into each of the fields.
Capitalization: Use either uppercase or lowercase letters. Excel ignores capitalization
when searching a database.
Formulas: A field entry may include a worksheet formula that calculates field values
from other field values in the list.

Academic Computing Services -3- © 2003 The University of Kansas


A Division of Information Services
ACS Computer Training
Excel Data Management

Naming the list


If you plan to use the list within a larger worksheet plan, naming the list allows you to
use a name (ex: database) when referring to the list instead of the complete range (e.g.,
$A$3:$J$32).

Note: If you name the list ‘database’, Excel always identifies the first row of the
list as labels or field names. When working with the AutoFilter feature,
Excel automatically names the database for you so this step is not necessary.

To name a list:
1. Select the list area.
2. Click into the Name Box, and type
the name that you want to refer to the
list.
3. Press Enter to accept the change.

Note: If the column or row label of your worksheet is the same as the range name
you want to create, select the area and then choose Create… from the Name
submenu and Excel applies the appropriate label name to the range
automatically.

To redefine an existing list:


1. Click the Insert menu,
choose Names, and select
Define.
2. Click the name of the list in
the input area you want to
redefine.
3. Click the Hide button.
4. Click and drag the new
range of cells.
5. Click the Show button.
6. Click the OK button.

Academic Computing Services -4- © 2003 The University of Kansas


A Division of Information Services
ACS Computer Training
Excel Data Management

To delete an existing list


1. Click the Insert menu, select Names, and select Define.
2. Click the name of the list in the input area you want to delete.
3. Click the Remove Button

Sorting
After a database or list is created, Excel can organize or format the information quickly.
Sorting organizes the data in a list alphabetically, numerically, chronologically or in any
order you want. Sorting rearranges the rows (records) according to the contents of the
field (column). It is also possible to sort multiple fields as well as data within a single
column.

Note: If you sort data within a single column, it only sorts the data in that field. It
will not rearrange the rows.

To perform a simple sort


To perform a simple sort, click any cell in the database list in the column
that you want to sort. Use the Sorting buttons on the Standard toolbar to
sort the information in your list. When you sort in this manner, Excel will
sort the entire list according to the column you were in.

To sort by multiple columns


1. Select a single cell within the column you
want to sort.
2. Click on the Data menu and choose
Sort….

Note: The entire list is automatically


selected. If you have labels in
the first row, Excel excludes
them for the selected area but
those labels are used to select
the Sort by column.

3. Click the down arrow next to the first Sort


by input box to choose the primary sort
field.
4. Next select whether the sort should be ascending or descending by clicking
the radio buttons opposite those options.
5. Repeat steps #3 and #4 to define secondary and tertiary sorts if necessary.
6. Click the OK button.
Academic Computing Services -5- © 2003 The University of Kansas
A Division of Information Services
ACS Computer Training
Excel Data Management

Data Forms
Excel has a built in form feature that allows you to input data into a list. Let’s say that
you have a list of data that contains over 500 records. In order to add to the list you
would either have to scroll down to the bottom of the list or insert rows somewhere
within the list each time you wanted to add a new record. Let’s also say that there are
times when you quickly want to search for a record that you know meets a certain
criteria. Searching 500 records would be very time consuming. The built in form feature
can do away with that and help you easily input data as well as search for records
meeting criteria.

Adding Data Using the Data Form


To add records using the Form, you can do the following:
1. Click somewhere within your data list.
2. Click on the Data menu and choose Form….

3. A data form will open and you’ll see the first record from your list in the form.

4. To add a record to the database list, click on the New button and the
fields will open up for you to type in your information.
5. To move from field to field, press the Tab key.
6. Once you’ve finished entering the first record, you can press Enter to enter another
new record or you can click the Close button to close the form.

Note: The Delete button will permanently delete the record that
is showing in the form. If you click this button, you will not be able to
use undo to retrieve the record.

Academic Computing Services -6- © 2003 The University of Kansas


A Division of Information Services
ACS Computer Training
Excel Data Management

The Restore button restores all the fields to be blank


again if you are entering a record and decide you don’t want the
record while entering. It will also restore an existing record if you
changed the record information, but have not moved off the record.
If you have fields that are based on formulas, such as a Total column,
you will not be able to enter any data into that field in the form. It will
appear grayed out.

Finding Records Using Criteria


You can also use the data form to find records that meet certain criteria. For instance, if
you want to find all employees that contribute at least $2000 a year to their retirement
plan, you could use the data form to enter in the criteria and find the records that meet
that criteria.
1. Click anywhere in your database list.
2. Click on the Data menu and click on Forms….

3. Click on the Criteria button.


4. When you do this, all of the fields will open up and the word Criteria will appear
above the New button.
5. Click in the field that you want to type criteria into and type in your criteria.

6. Click on the Find Next to find the first record that meets your criteria.
Continue to click on Find Next until you have found the record(s) you want.

Note: You can also use the Find Previous button if you want to go
back up your list.
You cannot use this form to modify existing records when using the criteria
feature.

Types of Criteria
There are many different types of criteria you can use in your data form, including
operators. Here is a table of the different operators you can use and what they mean.

Operator Meaning

> Greater than

< Less than

>= Greater than or equal to

<= Less than or equal to

Academic Computing Services -7- © 2003 The University of Kansas


A Division of Information Services
ACS Computer Training
Excel Data Management

* Wildcard takes the place of as many characters as needed

If you enter criteria into more than one field, Excel will use an implied And, which
means that the record must meet all of the criteria to be shown.

Filtering Data
One way of showing data from a list that meets certain conditions is by using filters.
Filtering extracts data from the list by identifying the subset of the data based on the
criteria you choose. There are two ways to filter for data in Excel, AutoFilter and
creating an Advanced Filter.

AutoFilter
A quick way to filter data contained in a list is by using AutoFilter. This filter
automatically provides certain criteria that can be used to extract a subset of data.
If the criteria provided do not list the options you need to create your data subset, it is
possible to create the criteria using the Custom… option. This option allows you to
customize your data so that you can display items that contain either of two values or
rows that contain values within a certain range. To create a filtered list using AutoFilter,
do the following:
1. Select any cell within your list.
2. Click on the Data menu, point to Filter, and choose AutoFilter from the submenu.

3. The AutoFilter will turn on and black drop-down arrows will automatically appear
beside every field name in your list.
4. Click on the drop-down arrow to choose filter criterion for a field.
5. When the criterion has been chosen, only rows that meet the criterion will be
displayed. The arrow beside the field name you chose and the numbers of the rows
will both turn blue.
Academic Computing Services -8- © 2003 The University of Kansas
A Division of Information Services
ACS Computer Training
Excel Data Management

6. If you need to filter for another field, you can continue to select criterion. Continuing
to do this creates an ‘and’ condition; therefore, in order for a row to show, it must
meet all of the criteria that you choose.
Once you have finished and are ready to display all of your data, click on the blue drop
down arrow of the field you had set criteria for and choose (All). If you chose more than
one criterion, you can click on the Data menu, point to Filter, and choose Show All.

Note: If you want to filter a list using only selected columns, choose only
those labels from those columns before applying the AutoFilter
command. You can only select adjacent columns.

Advanced Filters
Sometimes you might find the need to create more specialized filters that use the
operators “Or” or “And” and look for multiple criteria from several fields. Using
Advanced Filters in Excel can help you accomplish this. To create this type of filter in
Excel, you have to do two things: (1) set up the criteria and (2) execute the filter.

Setting up the Criterion


The first thing to do before filtering a list of data is to set up the criterion range. The
criterion range consists of at least two things:
• The field name from the list that you’re using criteria from
• The criterion that must be met
There are different types of criteria that you can use for filters, and you can always use
more than one field and criterion. The following lists several criterion examples and
shows different ways of setting up the criterion in your worksheet.

Criteria with Operators


There are many different operators you can also use when creating criteria, such as
greater than (>), less than (<), greater than or equal to (>=), less than or equal to (<=), and
any combination of those. In this example, not only are operators being used, but the
implied And operator is also used because the all of the criteria are appearing on the
same row.

And
Sometimes you might find you need to find records that meet more than one criterion.
Anytime you place criteria on the same row, Excel uses the implied And operator. The
picture shown above represents the use of And. Here is another example as well.

Academic Computing Services -9- © 2003 The University of Kansas


A Division of Information Services
ACS Computer Training
Excel Data Management

Or
Another option is to search for records that meet any criteria that you choose. This is
useful when you want to search for multiple records that don’t necessarily have to meet
the same criteria. Using the above example, here is what changes it to an implied Or.

Notice that while the criteria and field names remained the same, the way in which the
criteria was created was changed. Instead of the criteria being on the same row, the
criteria for an implied Or was placed on different rows.

Complex Criteria
There might be times when you need to use both And and Or combinations in your
criteria range. For example, you might have the need to see employees from a certain
department that use the Lincoln Financial retirement plan or individuals from a different
department that use the TIAA-CREF retirement plan. Here is an example using our
movie data:

Executing the Filter


Once you’ve set up the criteria range, you’re now ready to execute the filter.
1. Click anywhere in your list of information (database
list). Click on the Data menu, place your mouse over
Filter, and choose Advanced Filter….
a. List Range: This is the database range and will
appear as an absolute reference.
b. Criteria Range: This is the criterion that you set
up before going through the advanced filter. To
select the criterion range, first click in the criteria
range field, then click and drag the range inside of
the worksheet where the range lies, and it will
appear as an absolute reference.
c. Action: The default action is to filter the list in
place. You can also choose to copy the list to a
different location. If you choose this option, you’ll need to click in the Copy to:
field, and then click on the cell within the same worksheet where you want the
information to start.

Note: If you choose to copy the filtered list to a different location, it must be
in the same worksheet that the original list is in. You cannot copy the
filtered list to a different worksheet.

Academic Computing Services - 10 - © 2003 The University of Kansas


A Division of Information Services
ACS Computer Training
Excel Data Management

2. Click on OK once you’ve finished.


a. If you chose to filter the list in place, any rows (records) that don’t meet the
criteria you selected will hide. The number(s) of the row(s) that does (do) meet
the criterion will turn blue.
b. If you chose to copy the rows (records) that meet the criterion to another
location, each record that meets the criterion you set will be copied.
3. If you filtered the list in place, to return to the original database list, click on the Data
menu, hover your mouse over Filter, and choose Show All. If you copied the
filtered list, simply delete the rows that contain the records.

Special Features for Filtered Lists


There are many different reasons to filter a list of data. Here are just a few:
• Charting only data that meets certain criteria
• Using functions, such as AutoSum, or other types of calculations
• Printing only filtered data
• Formatting only data that meets certain criteria
• Deleting only those records

Subtotals
Excel's Subtotal feature quickly summarizes data within a database or list. Based upon
the data you have selected, Excel can automatically calculate both subtotals and grand
totals within your list. Subtotals are based on organized or sorted groups of data.

Organizing Data for Subtotals


For example, if you have a list of employees in different departments and you want to
know how many employees are in each department, you would first need to group the
departments together by sorting. Once you’ve sorted and have created groups, you’re
ready to use the subtotal feature.
When you create your subtotal, the sort column you specify as your primary sort must be
the column on which you want to base your subtotals.

Note: That does not mean the subtotal must be added to that column. It means that
for the At each change in: field, you must use the column name that you
sorted by.

Using the above example again, in this case, the column you would also apply the
subtotal to would be the department column. The number of times the department name
appears would tell you how many people worked in each department. Because you’re
subtotaling text (how many times the department name appears), you’re counting the
department name, so you would use the count function.

Academic Computing Services - 11 - © 2003 The University of Kansas


A Division of Information Services
ACS Computer Training
Excel Data Management

If you want to subtotal more than one column, use the second and third level sort options
to organize the list in the subtotal order.
Using the above example, you could count not only how many people are in each
department, but also how many people in a particular department use the Lincoln
Financial retirement plan. To do this, you would set the primary sort on department with
a secondary sort on retirement plans before using the subtotal feature. The first subtotal
would be based on a department field. The second subtotal would be based on a
retirement plan field, and would not replace the first one.

Displaying a Subtotal
Once you’ve organized your data, by at least a primary
sort, you’re ready to use Excel’s subtotal feature.
1. Select a cell within your list of data.
2. Click on the Data menu and click Subtotals….
3. In the At each change in: field, click on the drop
down arrow and select the field that is your primary
sort.
4. In the Use function: field, click on the drop down
arrow and choose which function you want to use.
This is the summary function you’d like to calculate
on your data.
5. To determine which values to calculate using the
function you selected, check one or more fields in
the Add subtotal to: field.
6. By default, Replace current subtotals and
Summary below data are checked. If you want the summary (total for each group)
to appear first and the details for each record appear next, uncheck the summary
below data box. If want to print each group on a separate page, check Page break
between groups.
7. Once you’ve selected your options, click OK.

Academic Computing Services - 12 - © 2003 The University of Kansas


A Division of Information Services
ACS Computer Training
Excel Data Management

Nested Subtotals
You can have multiple levels of subtotals, subtotals for smaller groups, within your
primary (original) subtotals groups. If you want another subtotal inside of the one you
just did, go back through steps #1 through #6, but for the At each change in: field,
choose the secondary sorted field. Also, make sure that you uncheck Replace current
subtotals so it doesn’t replace the one you previously did. These are called nested
subtotals.

Using More Than One Summary Function on a Column


You can calculate the values within a column using more than one function. For
example, if you want to sum a column and also count the number of values in that same
column.
To use more than one summary function on one column,
1. Select the Data menu and choose Subtotals….
2. Select the first function in the Use function: field.
3. Click OK.
4. Go back through the Data menu again and select Subtotals….
5. Select another function in the Use function: field.
6. Clear the Replace current subtotals check box.
7. Click OK.
You can repeat this procedure to calculate using additional functions.

Academic Computing Services - 13 - © 2003 The University of Kansas


A Division of Information Services
ACS Computer Training
Excel Data Management

Subtotal Outlines
When you subtotal, rows are added to display the subtotals, and the data list is organized
in outline format. At the top left, level markers display at the top of the worksheet
window and at the left, icons display that allow you to expand (+) and collapse (-)
individual groups.

• To expand individual groups, click the plus sign (+) at


the left of the spreadsheet window.
• To collapse individual groups click the minus sign (-) at
the left of the spreadsheet window.
• To display only the grand totals, click the 1 at the top
left of the spreadsheet window.
• To display all levels of the outline, click the 3 (or largest
number) at the top left of the spreadsheet window.
• To display only subtotals of the outline, click the 2 (or
additional numbers) at the top left of the spreadsheet
window.

Removing Subtotals
To remove subtotals from your database list, click on the Data menu and click
Subtotals…. When the subtotal dialog box opens, there is a Remove All
button at the bottom. When you click on this button, the dialog box will automatically
close and all of your subtotals will be removed.

Managing Windows
Every document is viewed in a window. There can be many windows for the same
document open on the screen or there can be one window for each of several documents
opened at the same time. When working with a database and using the Advanced Filter,
it is convenient to view the criteria in one window and the database in another.
To open another window for the same document:
1. Make sure that the window for the worksheet is active.
2. Choose New Window (Window menu). Excel uses the same worksheet name for
both the windows but adds a number to the name.
To activate a window, click anywhere in the window. All the windows that are
currently available are listed in the Window menu. Choosing any of these names
can also activate the window.
To move a window, drag it by its title bar. To move a window without activating it, hold
down the command key while dragging it by the title bar.

Academic Computing Services - 14 - © 2003 The University of Kansas


A Division of Information Services
ACS Computer Training
Excel Data Management

Note: If the document title bar is not visible, click the Restore button by the
menu bar to create a moveable window.

Splitting Windows
Rather than creating another window and scrolling each independently, a single window
can be split into panes by dragging either of the split bars to another location. Split bars
are located directly above the up arrow key on the vertical scroll bar, and directly left of
the left arrow key on the horizontal scroll bar. After splitting a window, its pane size
may be changed by dragging the split bar.

Remove a horizontal split by dragging the split bar to the top or bottom of the vertical
scroll bar. Remove a vertical split by dragging the split bar left or right on the horizontal
scroll bar.

Linking Data
If you want to link cells between spreadsheets, one way to do this is by using the Paste
Special dialog box.
1. Select the data you want to copy.
2. Use any copying commands or methods to copy the data to the clipboard (Ctrl -C,
Copy icon on toolbar, Edit menu).
3. Access the worksheet where you want to copy the data and select the appropriate cell.
4. Select the Edit command, select Paste Special, and click Paste Link button at the
lower right corner of the dialog box.
5. The link displays the value of the copied cell. Note however the formula in the
Formula bar. The formula displays the full path name of the copied cell.

Note: Linked cells are updated when the workbook that contains the linked cell is
opened.

Academic Computing Services - 15 - © 2003 The University of Kansas


A Division of Information Services
ACS Computer Training
Excel Data Management

Getting Additional Help


ACS provides consulting and Q&A help in a variety of ways:
785/864-0200
[email protected]
www.ku.edu/acs/help

Last Update: 10/23/2002

Academic Computing Services - 16 - © 2003 The University of Kansas


A Division of Information Services

You might also like