You are on page 1of 13

ACS Microcomputer Workshop

Intermediate Excel

Introduction
Excel is an integrated spreadsheet that has built-in graphics and database
functions. The program has basically the same user interface for the PC and
Macintosh. This workshop will introduce participants to the database and graph
capabilities of the program.

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.
create a chart using the ChartWizard.
edit a chart.
adjust the spreadsheet windows.

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

ACS Microcomputer Workshop

Intermediate Excel Outline


USING EXCEL AS A
DATABASE
What is 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.

Parts of a database/list

print data organized for specific purposes.

A database/list is made up of several parts. It is important to


understand the terms describing these parts:
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 Field: A field containing formulas or functions.
Database Range: A range is a rectangular group of worksheet
cells defined as the list or 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.

Intermediate Excel

1998 University of Kansas

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.

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
(ex:$A$3:$J$32). Hint: 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. Select Names from the Insert menu.
3. Select Define and type the name of the list in the input
area.
4. Check the Refers to: input area at the bottom of the dialog
box to make sure the selected area is correct. If not, use
the cursor to highlight the correct area with the Define
Name dialog box still open. The selected range is
displayed.
5. Click the OK button.
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.

Sorting the list

Intermediate Excel

After a database or list is created, Excel can organize or


format the information quickly. Sorting organizes the data in
a list alphabetically, numerically, or chronologically. Sorting
rearranges the rows (records) according to the contents of the
fields (columns). It is also possible to sort selected rows or
data within a single column.

1998 University of Kansas

To perform a sort:
1. Select a single cell within the list.
2. Choose Sort from the Data menu. 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.
Note: There are only three levels of sort available with this
feature. If additional sorts are needed, start with the lowest
level sort field and perform several sorts. It is possible to
change the sort order of the first key sort from alphabetical to
a predefined list, i.e. months of the year. To change the sort
type, access the Options dialog box after selecting Sort from the
Data menu.

FILTERING DATA
WITH AUTOFILTER

Excel also allows you to filter your list. Filtering extracts


data from the list, i.e., identifies a subset of the data. The
Autofilter feature is a quick way to filter your data. The filter
automatically provides certain rules or criteria that are used
to extract or create a subset of data. If the Autofilter feature
does not provide the options you need to create you data
subset, it is possible to create the rules yourself.
To create a filtered list using AutoFilter:
1. Select one cell within your list. Note: This assumes that 1)
at least one blank row and one blank column exist between the database list and other data on the spreadsheet
and 2) you have labels in the first row of your list.
2. Select Filter from the Data menu and then choose
AutoFilter. Excel places drop-down arrows directly on
the column labels of the list.

3.

Intermediate Excel

Click the arrow beside one of the lists to choose from a


list of unique items in that column. This selected item is
called the filter criterion. When an item is selected, Excel
displays only rows that meet the criterion.

1998 University of Kansas

4.

5.

Filter Notes

Continue selecting criterion (#3) if desired. If more than


one criterion is selected, you are creating an 'and'
condition. In other words, a row must contain all values
identified as filter criterion in order to be displayed.
To again display all rows, first select Filter (Data menu)
and then Show All. This action keeps the drop-down
arrows beside the column labels. If you want to turn off
the AutoFilter arrows, select the Filter command (Data
menu) and select AutoFilter.

When you select a single cell within the list, all column labels
are selected when you choose AutoFilter. If you want to filter a
list using only selected columns, choose only those labels
from those columns before applying the AutoFilter command.
To find rows with blank cells in a column, select Blanks from
the drop-down list. To display all rows that contain data,
select Nonblank from the drop-down list.
If you want to remove the criteria for a single column (not the
entire list), select All from the drop-down list.
The 'custom criteria' option for each column 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. For example you can display rows
that contain conditions, i.e., 'June or July'. In addition you can
find rows that contain values that fall within a range, such as
a value in a Total column that is greater than 1000 but less
than 5000.

USING ADVANCED
FILTER

It is also possible to define your own database and create


your
own criteria if the AutoFilter feature does not meet your needs.
In order to create your own rules for extracting data, you
have to complete several steps:
1. You need to manually identify the database or list area on
your spreadsheet.
2. In a separate area of the spreadsheet, type the rules or
criteria that you want used in extracting the data. Special
instructions for setting up the criteria range follow.
3. Select the Advanced Filter from the Data menu and filter the
database.
Below are listed details of these steps.

Intermediate Excel

1998 University of Kansas

Defining a Database

Enter the fields and records of the database. If you followed


the rules for entering a list (see "Creating a database/list"),
Excel automatically selects the list area if your cursor is
located within the boundaries of the list before accessing any
of the list filtering options.
If your list does not have a surrounding blank row or column,
you can either select the database area before accessing either
filtering option (AutoFilter or Advanced Filter) or you can
name the range "database" manually. See "Naming the List".

Criteria Ranges

Once a database is defined, a set of search conditions can be


constructed to find, extract, or delete a subset of the database
records. These search conditions are called criteria. Criteria are
used to find individual records or to extract all records

Types Of Criteria

The criteria range allows you to filter data using two kinds of
complex criteria: comparison criteria and computed criteria.

Comparison criteria Comparison criteria is used to find records whose field contents
defined either match or fall within specified limits For example, you can
match a series of characters such as January or you can create
Note: If you are using only one or two comparison criteria, the
Custom option in the AutoFilter command should be used instead
of a manual setup.
Computed Criteria Computed criteria is used to find records that meet criteria based
defined on a formula. Use a formula when a database does not contain
the fields that would allow the use of a comparison criteria.
Computed criteria evaluates a selected field against values not
contained in the list. For example, to display only rows where the
total value is less than the yearly average, the criteria might be
represented by: =Total<$G$80. The $G$80 represents an
absolute address on your spreadsheet where the yearly average of
all total sales is computed.
Types of You can use the following types of comparison criteria in a criteria
comparison criteria range:
Series of Characters: To find records that contain an exact value,
type the text, number, date, or logical value in the cell below the
criteria label. As an example, if the criteria label was ZipCode and
you wanted to find all records where the zip code was equal to
66044, you would enter the zip code 66044 in the criteria range.
ZipCode

66044

Intermediate Excel

1998 University of Kansas

Wildcards: Wildcards can be used to find text that share some


characters but not others. The question mark(?) stands for any
single character in the same position. The asterisk(*) stands for
any number of characters at the same position; and, the tilde (~)
followed by a ?, *, or ~, find actual occurrences of the question
mark, asterisk, or tilde.
Compared Quantities: To display only rows that fall within certain
limits, type a comparison operator, followed by a value, in the cell
below the criteria label. For example to find movies that cost less
than $2.00 to rent, type <200 under the Price label in the criteria
range. Any of the following operators can be used: =, < , > , <= ,
<>, or >=.
Comparison examples The placement of criteria and criteria labels determine how Excel
tries to extract the records..
Type all criteria in the same row to find records that meet all
criteria in that row. This is an AND condition.
Rating
Price
G
<2.00
Use a column label more than once if you want to find records
that meet one criterion for the same column, for example, price
greater than $2.00 and less than $3.00.
Price
Price
>2.00
<5.00
Type criteria in different rows to find records that meet all criteria
in either row. This is an OR condition.
Zipcode

66044
66601

Types of Computed You can use both a computed criteria and a comparison criteria in
Criteria the same criteria range.
1.

The formulas must produce the logical value TRUE or FALSE.


If the formula originally equates to TRUE, only rows that
produce TRUE values are displayed when the list is filtered; if
the formula originally equates to FALSE, only rows that
produce FALSE values are displayed when the list is filtered..
YrAvg

=3F > average($3$F:$36$F)

Intermediate Excel

1998 University of Kansas

The previous example would display a TRUE or FALSE


depending on whether the value in 3F was larger or smaller
than the value of the average of all cells within the range
3F:36F.

Filter the list using Advanced


Filter

2.

The formula must refer to at least one column in the list.

3.

If you label the computed criterion formula, use text other


than an existing column label as a criterion label. Otherwise
Excel might use the result of the computed formula as a
comparison criteria.

Once the database range and the criteria range are created, use the
Advanced Filter command (Data menu) to copy rows that meet the
complex criteria to another worksheet location.
To find the records:
1. Select Advanced Filter from the Data menu.

Removing an Advanced Filter

Intermediate Excel

2.

If the database list is not selected correctly, reselect the list


area on the worksheet. The dialog box stays open while you
scroll and select.

3.

Select the Criteria area. Again, use the mouse to select the
cells on the worksheet that represent the label(s) and the
formula(s) that determine the criteria area.

4.

If you want records copied to another location on the


worksheet, select the Copy to Another Location option button
under Action and specify the new location to copy the rows
that meet the criteria.
If you select one cell, Excel copies the rows starting with
that cell, including all column labels from the list.
If you specify a range of cells as the range to copy, Excel
copies only the rows that fit within that range.
If you specify a range that contains only a limited number
of column labels, Excel copies only those columns that match
the column labels.

In order to display any rows hidden with the Advanced Filter


command, choose the Filter command from the Data menu and
then select Show All. This turns off the Filter mode.

1998 University of Kansas

Special editing and formatting


in a filtered list

There are several features and functions that work when you are
working in filter mode. (You are working in Filter mode as long
as Filter Mode displays on the status bar and/or the row
headings of your list are blue - on a colored monitor.)
To print a list: Choose Print from the File menu to print a filtered
list. If you use AutoFilter, Excel does not print the arrows on the
column labels.
To delete a list: Choose Delete Row from the Edit menu. (With
Filter mode on, the delete command becomes Delete Row.) You
can delete only the whole rows on a worksheet that contains a
filtered list.
To format cells: Select any format options using the Cells
command (Format menu). Excel formats only the visible cells in
the selection.
To copy a filtered list: Select Copy from the Edit menu. Excel
copies only visible cells in the selection.
To create an AutoSum: If the AutoSum button is used to total a
range of data in a filtered list, Excel displays a total value for only
the displayed data. Changing the filter or selecting the Show All
command (Data menu), changes the calculated total.

USING 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.

Intermediate Excel

1998 University of Kansas

To activate a window just 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.
Windows 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.

CHARTS

A chart is a graphic representation of worksheet data. Excel offers


14 types of charts: 8 two-dimensional (2-D) chart types and 6
three-dimensional (3-D) chart types. There are a number of builtin formats for each chart type or custom formatting is available to
create exactly the chart desired. A chart may be created on a
worksheet or in a separate document. A chart created on a
worksheet is a graphic object called an embedded chart and is saved
as part of the worksheet that created it. A chart that is created in
its own window is referred to as a chart sheet. Both types of charts
are linked to the source worksheet and are updated when the
source data is edited.
Excel provides three ways to create a chart, all of these can be
saved later as a separate chart:

Intermediate Excel

The ChartWizard tool on the standard toolbar creates


embedded charts.

Use the Chart toolbar to create an embedded chart on a


worksheet.

To create a chart document in a separate window, use the


Chart command (Insert menu) and select Chart.

10

1998 University of Kansas

Creating an Embedded Chart


Using the ChartWizard Tool

The ChartWizard tool is a fast and easy way to create an


embedded chart in Excel. The ChartWizard creates a chart in five
steps. Samples are displayed that show how the completed chart
will look. (To change the look of the chart at any time, backup
with the Back button.)
The finished chart has the following elements:
Chart Title

Legend

Y-axis
(value axis)
Chart Data Series

Tick mark
X-axis (category axis)

To create an embedded chart using the ChartWizard tool:


Note: Actions and commands available within the Chart
Wizard may vary depending on the version of Excel.
1.

Select the range of the worksheet cells that contains the


data to plot, including any worksheet column or row
labels that can be used in the chart as descriptions.

2.

Click the ChartWizard tool

3.

Point where the corner of the chart is to be located and


drag until the rectangle is the size and shape desired for
the chart. To make a perfect square hold down the shift
key while dragging. To align the chart to the cell grid,
hold down the Alt key in Windows; on the Macintosh,
press the command key.

on the standard toolbar.

Note: Depending on the Excel version, the Chart Wizard


by automatically display without creating a chart size.
4.

Intermediate Excel

The Chart Wizard Step #1 identifies the chart type. You


can select from a variety of chart formats. Select a type
and then click the Next button to continue.

11

1998 University of Kansas

5.

The second step displays confirms the source of the chart


data. Enter a new range if it is not displayed correctly in
the dialog box. Click on Next to continue.

6.

Step #3 of the ChartWizard prompts for information


about the location of the data on the chart. Click on Next
to continue.

7.

Step #4 determines the chart location. Select the radio


button beside "As an object" if you want the chart to
display as an object on the current spreadsheet. Select the
radio button beside "On a sheet" if you want the chart ot
display on its own sheet within your work book. Click OK
to create the chart.

Note: If the data that you want included in a chart is not


located in one range, use the Ctrl key when selecting noncontiguous areas. Select one range of data and then hold
down the Ctrl key while selecting additional areas.

Creating a Window for an


Embedded Chart

A chart currently saved as an object on a spreadsheet can be saved


on a separate page within your workbook.
To open an embedded chart into a window:
1. Double-click the chart so that the border displays on the
chart.
2. Select Copy from the Edit menu.
3. Press the F11 key. This function key creates a new chart
sheet.
Note: To save the chart in a separate file and on its own sheet,
select New from the File menu after step #2 above. Continue
with the remaining instructions.

HELP
Phone numbers

Online help

Intermediate Excel

Besides the Help options within the Excel program, Academic


Computing Services provides consulting and Q&A help in a
variety of ways:
Phone Consulting
785/864-0410
Help Center
785/864-0200
Online question account: question@ukans.edu
Online documentation:
http://www.cc.ukans.edu/acs/docs

12

1998 University of Kansas

listserv signup

To receive automatic announcements of upcoming computer


training, send the following message to the e-mail address
below:
message: SUB COMPUTER-TRAINING your name
address: listproc@ ukans.edu
Note: Substitute your name above for your real name, i.e. Jane
Smith, not your login name. Example:
SUB COMPUTER TRAINING Jane Smith
The University of Kansas
June 1999
Prepared by: Jerree Catlin 785/864-0446
Academic Computing Services
catlin@ukans.edu

Intermediate Excel

13

1998 University of Kansas

You might also like