You are on page 1of 8

Advanced Microsoft Excel

Introduction:

In this session we will explore how to export a class list from Genesis and import it into Excel. Additionally, we will examine advanced features of Microsoft Excel including building mail merges between Excel and Microsoft Word , data forms, filtering and validation, the creation of pivot tables, and other advanced data manipulation techniques. We recommend participants have a general understanding of word processing and spreadsheet programs and feel fairly comfortable using Excel and Word prior to enrolling in this workshop.

At the end of this session, you should be able to: import delimited files into Microsoft Excel . set up a mail merge between Microsoft Word and Excel .

format, organize and perform calculations on the imported data including visually representing the data in a chart. use advanced techniques to input, search and summarize data in worksheets. Part I: Transferring Data Between Programs 1. Data that is entered into proprietary programs like Microsoft Excel and Microsoft Access includes organizational information and font specifications that are used by the program to output the data to a computer screen or printed file. These formatting instructions are specific to each application and are not always recognized by other programs. Have you every tried to open a formatted file in the wrong application? It usually looks like gobbledegook!

01

00

01

010100

10
10
00

Some Data Programs: Excel Access FoxPro FileMaker Genesis MySQL

110 00 10

10

It is common to import and export raw data files from one software program to another.

2. Consequently, it is generally a good idea to remove all formatting instructions in the data file prior to transferring it from one program to another. To do this, the data must be saved or EXPORTED from the original program into a special text file that maintains the integrity of the data but does not include any of the proprietary formatting information. These raw text files can then be IMPORTED into most data programs and manipulated as needed.

You can view (but not complete functions) a raw text file in a straight text program like Windows Notepad. guhsd 07/2004, Educational technoloy resources

0 01 10

Programs like Microsoft Excel allow you to save your workbook into text files that can be opened in other data manipulation programs.

An example of raw text file is a comma separated value file with the .CSV extension. This file was saved from Excel.

3. Most data programs have the ability to read comma deliminated or comma separated values (CSV) files. CSV are text files that use commas to separate and distinguish fields (or cells) in the data. Some text files use tabs to distinguish fields and are referred to tab deliminated files. For example, we can use VAX, a terminal emulation software program, to transfer data from the Genesis student information system into text files (*.SF extension) with separated field information that you can in turn import into Excel. Your instructor will demonstrate how this is done (see the Downloading Class Lists Using VAX handout located at http:// edtech.guhsd.net/help.php for more information).

Note the commas that separate the fields of data.

Transferring files from Genesis using VAX Reflections.

Figure 4.1

Follow the steps in the wizard to import a deliminated text file into Excel.

Comprehension Check:
A. Open Microsoft Excel and create a new worksheet. Save the file as Book1.xls on the desktop. B. From the command toolbar choose Data > Import External Data > Import Data (see Figure 4.1 above).

C. Browse for the file named per_02.sf, highlight it and click Open. You will need to change the Files of type drop-down box to read All Files (*.*) in order to see the file. D. Follow the wizards on screen prompts to import the data into the worksheet. E. After you import the data, add headings to define the datantained in column. You will need to insert a new row above the the first row of data.

adv_excel.pdf

Advanced Microsoft Excel


4. Next, we will use the data to create a mail merge with Microsoft Word using the Mail Merge Wizard (Mac: Data Merge Manager). The Mail Merge Wizard makes it easy to create labels or addresses from a list of people. First you open Microsoft Word , then start the wizard from Tools > Letters and Mailings > Mail Merge Wizard. The wizard will then guide and prompt you through the entire process!

The first few steps youll see after starting the Mail Merge Wizard...

Step 1: Make sure you have saved your Excel worksheet and inserted column headings. Step 2: Open Microsoft Word and start the Mail Merge Wizard (Data Merge Manager). Step 3: Choose the appropriate document and/or address label type for your needs. Step 4: Choose the gradebook_participant.xls document as the data source/recipient list. Step 5: Select the relevant fields for your address labels. Step 6: Create your merge document. Part II: Charting Data in Excel 1. What else can you do after importing data into an Excel worksheet? Many jobs call for a formulation of the data and then a visual represention of results through a chart. Thus, it is important to understand how to write and copy formulas to make calculations and also use the chart wizard. For this next example, we will download API data from the Dept. of Educations Web site and compare base student testing scores across our district for three consecutive years using a chart. 1. Go to http://api.cde.ca.gov/reports.asp, click on the District List of Schools Report link and enter Grossmont in the search field; then click Submit. 2. The first report we will download is the 2002 API Base Report- List of Schools in the District. Click the radio button next to this report; then click Submit. (Figure 7.1) 3. You will be taken to a page listing test results for each of the Grossmont Union High Schools. Scroll down the page until you see the sentence Data file: Click here to download a data file and click on it. On the following page, find the link entitled Click here to get file and right-click to Save Target As.. (Figure 7.2) 4. When you save the target, rename the file to read 2001baseapi.txt before saving to desktop (Figure 7.3). We recommended changing file type extensions (when applicable) to address potential application recognition conflicts that might occur. 5. After downloading the first text file, repeat the above steps for both 2003 and 2004 base API scores. 6. When you finish downloading the files, open Excel and import the data from these three deliminated text files into a new spreadsheet. (Figure 7.4)

Figure 7.1

Figure 7.3

Figure 7.4 guhsd 07/2004, Educational technoloy resources

7. Now lets calculate the percentage increase or decrease for each schools base api between 2002 and 2004. To do this, we pick and copy the appropriate columns from the data and paste them into their own little area on the spreadsheet (Figure 8.2). Then, we click in a cell and type a formula that subtracts the cell with the 2004 score from the cell with the 2002 score. Finally, we divide this result by the 2002 score and show this result as a percentage. The percentage change may be positive or negative depending on the result.

Example of Percentage Change: 2003 score 574 (cell J32) 2001 score 544 (cell J3) 574 - 544 = 30 30 divided by 544 = .055 or 6%

6% change is achieved by typing the formula above into this cell. NOTE: You will need to change the cells number format to show the result as a percentage instead of a decimal. Percentage multiplies the cell value by 100 and displays the result with a % symbol.

This cursor will change to a black crosshair when you click on the lower right corner of the cell. Click, hold and drag down to paste the formula in the cells below. The pasted formula will be calculated based on the relative position of the data in the cells.

Figure 8.2

8. Use the Chart Wizard to then visually represent your data. TIP! It is sometimes easier to select your columns before starting the wizard. Also, be aware you can choose to show Data Labels in Step 3 of the wizard.

adv_excel.pdf

Advanced Microsoft Excel

Part III: Forms, Filters and Data Validation 1. You can use Excel to create mini databases. Like any database, you need to first organize your data into categories and fields that will make it easy to search and lookup your information. Keep in mind that databases in Excel cannot contain empty rows or columns, but you can enter rows and columns with data as needed. You can then create forms and search criteria to filter results based on applicable searches. Open the file HR_database_participant.xls.

Columns or Fields

ROWS or Records

2. You can use data validation in your spreadsheet to limit the type of data placed in a record (column). For example, lets choose the phone column and then go to Data > Validation and select criteria to force the user to input a sequence of numbers instead of alpha characters.

TIP: To apply validation to the entire column EXCEPT the header, select the column by clicking on the letter and then CTRL+click [Mac:CMD+click] on the cell containing the header label.

To force the user to enter the phone number in the correct format, we set the data text lenght to equal eight (8) characters. We cannot restrict to only whole numbers because of the dash - in the phone number. We also need to make sure the Ignore blank box is unchecked.

3. You can also create validation lists to cut down on the number of incorrect data entries into a spreadsheet. To do this, you choose List from the Validation criteria (Figure 8.9) and select the valid list from an extra column you create somewhere on the spreadsheet. For example, we can restrict site entry into our HR database by selecting the block of cells containing our Campus 1-5 as the validation criteria, expand our criteria field, uncheck Ignore Blank and click on the In-cell dropdown option.

Figure 8.9

Selecting a list validation source from a list independent of your main database file.

guhsd 07/2004, Educational technoloy resources

4. Excel also has the capability to add subtotals in lists. For example, it might make sense to add wage subtotals for Teachers, Secretaries, etc. in the HR_database.xls file. To do this, you must first sort the data and then create subtotals under the Data option on the toolbar (Figure 9.1) . You can then collapse and expand your subtotals accordingly.

Figure 9.1

You can collapse and expand your subtotals by clicking on the plus + and dash - boxes in the left column. To remove subtotals, click on any cell in the data list, choose Subtotals... and click the Remove All button.

5. You can easily edit or insert new data into your database spreadsheet by selecting Data > Form. You can also use the data form to search and find records that meet certain criteria. Creating criteria RANGES is more useful in most cases. To create a criteria range, copy and paste the field heading row above the master data list (Figure 9.3). You need to have at least one blank row between your criteria list heading row and your main data list heading row. Then type in the appropriate field under the criteria list and select Advanced filter from the Data menu. When selecting the criteria you want to sort, be sure to select the entire row. Additionally, you can use AND (two or more conditions same row) & OR (two or more conditions on different rows) when filtering data. Remember, there must always be a blank row between your heading row set and your master data set.

Figure 9.3: A criteria range that filters for all Directors who have a wage of over $70,000 per year.

6. It is also possible to use comparison criteria such as greater than > or less than < symbols, and a ? as a wildcard with criteria range filters. Additionally, you can use advanced database functions to search data sets. To use an advanced filter, select the Past Function button and choose the Database category. Then, define the database, field and criteria.

adv_excel.pdf

Advanced Microsoft Excel


Comprehension Check:

A. Open the file gradebook_participant.xls and use validation to restrict users from entering anything into the Zip column except a whole number with 5 digits. Then, create a custom error message that will display if a user enters data in the incorrect format into the Zipt column. B. Create a cell drop down list for the Grade Level column containing only the numbers 10, 11, and 12. C. Use sub-totals to compute the total wages of each position in the HR database file. Remember to sort your data first! D. Insert two new student records into either file using the Data Form option. E. Create a criteria range and filter the data to show only the Male students from the 5-11E GroupCode in the gradebook_ participant.xls file. F. Use an advanced function to tabulate the total Specialist wages in the HR_database_participant.xls file.

Part IV: Pivot Tables Pivot tables are excellent tools to quickly summarize data and show relationships between data items that might be hard to discern otherwise. Some also use pivot tables to organize data so it is easy to chart. Once it is built, you can refresh a pivot table to view updated data entered into a spreadsheet. Pivot tables consist of row fields and/or column fields which are variables that hold table items. The pivot tables data field is the variable you want to summarize.

row field

column field

data field

Comprehension Check:
A. Open the file gradebook_participant.xls and create a pivot table that shows how many 9th, 10th,11th and 12th graders each counselor is responsible for. B. For EXTRA CREDIT, create a page field for gender to differentiate between male and female students.

t
guhsd 07/2004, Educational technoloy resources

Part V: More Cool Stuff! IF statements determine a cells contents based upon true or false criteria. You can also apply conditional formatting based upon a cells contents. Also, advanced formulas like CORRELATION can be used to look for patterns in your data.

In this example, we calculated the quiz average for each student using =AVERAGE(B2:G2) in the Quiz Average column on the Grades worksheet. Then, we used a nested IF statement to show the final letter grade based upon the score recorded in the Quiz Average column.

In this example, we applied conditional formatting to the cell in the GUHSD API spreadsheet. If a schools percentage change from 02 to 04 goes down, that cells background color will be red and the text color will change to yellow.

In this example, we calculated the average score on each of the six science quizzes. We then used a correlation function to see if there is a correlation between quiz scores and class absences. Notice how the values from the Class Absences Column I are locked into the equation as an absolute reference. To lock a value into an absolute reference, you add dollar signs $ in front of the row letter and cell number.

adv_excel.pdf

You might also like