in excel, a data base is referred to as a list. a list consists of a set of column headers and rows...

10
In Excel, a data base is referred to as a list. A list consists of a set of column headers and rows of data beneath the column headers. Excel 2003 includes new commands for creating lists. While these commands are most useful for users who are working from a common data base, we will employ them in our applications. Creating a List in Excel Creating a List in Excel, Slide 1 Copyright © 2004, Jim Schwab, University of Texas at Austin

Upload: garry-gaines

Post on 18-Jan-2016

228 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: In Excel, a data base is referred to as a list. A list consists of a set of column headers and rows of data beneath the column headers. Excel 2003 includes

In Excel, a data base is referred to as a list. A list consists of a set of column headers and rows of data beneath the column headers.

Excel 2003 includes new commands for creating lists. While these commands are most useful for users who are working from a common data base, we will employ them in our applications.

Creating a List in Excel

Creating a List in Excel, Slide 1 Copyright © 2004, Jim Schwab, University of Texas at Austin

Page 2: In Excel, a data base is referred to as a list. A list consists of a set of column headers and rows of data beneath the column headers. Excel 2003 includes

Entering column headers

We enter the column headers for the fields in row 1 as shown.

The columns have been autofitted so that the full text for the headers is visible.

We enter the column headers for the fields in row 1 as shown.

The columns have been autofitted so that the full text for the headers is visible.

Creating a List in Excel, Slide 2 Copyright © 2004, Jim Schwab, University of Texas at Austin

Page 3: In Excel, a data base is referred to as a list. A list consists of a set of column headers and rows of data beneath the column headers. Excel 2003 includes

Creating the list

First, select the column headers for the list in cells A1 through F1.

First, select the column headers for the list in cells A1 through F1.

Second, select the Create List command from the Data > List menu.

Second, select the Create List command from the Data > List menu.

Creating a List in Excel, Slide 3 Copyright © 2004, Jim Schwab, University of Texas at Austin

Page 4: In Excel, a data base is referred to as a list. A list consists of a set of column headers and rows of data beneath the column headers. Excel 2003 includes

The create list dialog box

The create list dialog box show us the cell range that will be included in the list. Since all we have include thus far are the column headers is the entries in cell A1 through F1, the range address is correct.

The create list dialog box show us the cell range that will be included in the list. Since all we have include thus far are the column headers is the entries in cell A1 through F1, the range address is correct.

Since we entered headers in row 1, we mark the check box My list has headers. If we do not tell Excel our list has headers, it will add headers in row 1 which it will name Column1, Column2, etc.

Since we entered headers in row 1, we mark the check box My list has headers. If we do not tell Excel our list has headers, it will add headers in row 1 which it will name Column1, Column2, etc.

Click on the OK button to complete the create list command.

Click on the OK button to complete the create list command.

Creating a List in Excel, Slide 4 Copyright © 2004, Jim Schwab, University of Texas at Austin

Page 5: In Excel, a data base is referred to as a list. A list consists of a set of column headers and rows of data beneath the column headers. Excel 2003 includes

The list in the worksheet - 1

On the worksheet, the list is identified as the column headers, plus one additional row with an asterisk in the first column.

On the worksheet, the list is identified as the column headers, plus one additional row with an asterisk in the first column.

Excel also opened the List tool bar, which we can close because it does not contain the commands that we will use.

Excel also opened the List tool bar, which we can close because it does not contain the commands that we will use.

The cell with the asterisk is the starting cell for adding a new record.

The cell with the asterisk is the starting cell for adding a new record.

Creating a List in Excel, Slide 5 Copyright © 2004, Jim Schwab, University of Texas at Austin

Page 6: In Excel, a data base is referred to as a list. A list consists of a set of column headers and rows of data beneath the column headers. Excel 2003 includes

The list in the worksheet - 2

To the right of each column header, Excel added a drop down arrow for a list of commands to use with the list.

To the right of each column header, Excel added a drop down arrow for a list of commands to use with the list.

The first two commands are for sorting the list in either ascending or descending order.

The first two commands are for sorting the list in either ascending or descending order.

The additional commands under the separator bar support filtering or extracting a subset of cases that satisfy some criteria. The list of criteria will grow as new values are added to that column.

We will explore filtering in a later tutorial.

The additional commands under the separator bar support filtering or extracting a subset of cases that satisfy some criteria. The list of criteria will grow as new values are added to that column.

We will explore filtering in a later tutorial.

Creating a List in Excel, Slide 6 Copyright © 2004, Jim Schwab, University of Texas at Austin

Page 7: In Excel, a data base is referred to as a list. A list consists of a set of column headers and rows of data beneath the column headers. Excel 2003 includes

Entering data in the list - 1

Click in cell A2 to begin entering the first record and type in the first Id number, 1001. The new entry replaces the asterisk.

Click in cell A2 to begin entering the first record and type in the first Id number, 1001. The new entry replaces the asterisk.

When we press the Tab key to go to Sex, the second data field, Excel adds the new row to the list, and drops the row with the asterisk down one row.

When we press the Tab key to go to Sex, the second data field, Excel adds the new row to the list, and drops the row with the asterisk down one row.

We ended our entry with the Tab key to go to the cell on the right. Had we ended it with an Enter key, we would go to the next row.

We ended our entry with the Tab key to go to the cell on the right. Had we ended it with an Enter key, we would go to the next row.

Creating a List in Excel, Slide 7 Copyright © 2004, Jim Schwab, University of Texas at Austin

Page 8: In Excel, a data base is referred to as a list. A list consists of a set of column headers and rows of data beneath the column headers. Excel 2003 includes

Entering data in the list - 2

Note that when we are working with our list, Excel surrounds it with a thick blue border so that we can easily see what is in our list. Our list now includes three rows: one with the column headers, one for the record with an id of 1001, and one with the asterisk for entering additional records.

Note that when we are working with our list, Excel surrounds it with a thick blue border so that we can easily see what is in our list. Our list now includes three rows: one with the column headers, one for the record with an id of 1001, and one with the asterisk for entering additional records.

If we are working with worksheet cells not included in our list, the list is surrounded with a thin blue border.

If we are working with worksheet cells not included in our list, the list is surrounded with a thin blue border.

Creating a List in Excel, Slide 8 Copyright © 2004, Jim Schwab, University of Texas at Austin

Page 9: In Excel, a data base is referred to as a list. A list consists of a set of column headers and rows of data beneath the column headers. Excel 2003 includes

Entering data in the list - 3

We complete the entries for case 1001. Note that age is calculated using a formula and is not entered by the user.

The formula for age subtracts the birth date from today’s date to find the number of days between today and the date of birth. The number of days is divided by the average number of days in a year 365.25, and the answer is truncated to remove the decimal places. This calculates an approximate age for the case that will not be exactly correct in all cases.

We complete the entries for case 1001. Note that age is calculated using a formula and is not entered by the user.

The formula for age subtracts the birth date from today’s date to find the number of days between today and the date of birth. The number of days is divided by the average number of days in a year 365.25, and the answer is truncated to remove the decimal places. This calculates an approximate age for the case that will not be exactly correct in all cases.

Creating a List in Excel, Slide 9 Copyright © 2004, Jim Schwab, University of Texas at Austin

Page 10: In Excel, a data base is referred to as a list. A list consists of a set of column headers and rows of data beneath the column headers. Excel 2003 includes

Entering data in the list - 4

For the second case, I have deliberately entered incorrect data in a number of fields to demonstrate how easy it would be to make mistakes that undermine the very purpose of the list, to store data for future analysis.

Fortunately, Excel has commands that will enable us to do some checking of user entries to minimize the number of incorrect items that are entered in the worksheet. In another tutorial, we will look at validating data entry.

For the second case, I have deliberately entered incorrect data in a number of fields to demonstrate how easy it would be to make mistakes that undermine the very purpose of the list, to store data for future analysis.

Fortunately, Excel has commands that will enable us to do some checking of user entries to minimize the number of incorrect items that are entered in the worksheet. In another tutorial, we will look at validating data entry.

Creating a List in Excel, Slide 10 Copyright © 2004, Jim Schwab, University of Texas at Austin