cscu9b1/pdmu9l6 spreadsheets 2: advanced … · 2015-09-14 · into a report in the form of a word...

16
CSCU9B1: ESSENTIAL SKILLS FOR THE INFORMATION AGE SPREADSHEETS 2: PDMU9L6 STREAM COMPUTING SCIENCE & MATHEMATICS PAGE 1 OF 16 CSCU9B1/PDMU9L6 SPREADSHEETS 2: ADVANCED FEATURES LEARNING OUTCOMES By the end of this practical class, you should be able to: Create Charts or Graphs using data in Excel worksheets. Insert an Excel Charts into a Word document. Sort and group data in Excel. Perform simple data analysis using Excel functions. Work with groups of connected spreadsheets IMPORTANT - SPREADSHEETS TEST The Spreadsheets Test is coming up soon (see the online schedule). Unlike the previous assignment, you will have to complete this test during your usual workshop session under examination conditions, so please make sure you arrive in good time to your class. The test is an assessed item and is a compulsory part of the course. It is an ‘open-book’ test, so you should bring your workshop handouts with you for reference. The test is designed to be done within 45 minutes. If you don't do the test, you won't get a grade for the course! Unless you have good reason (for which documentary evidence will be required) you must sit the test at the time above. Remember to register your attendance Remember to check your student email Remember to check out the CSCU9B1 web pages for any news and announcements Saving: Don't forget: if you plan to work on your documents elsewhere in a previous version of the Office Suite, then you must save them in an appropriate format. Please ask if you don't know what this means. Help: Excel Help can be pretty useful. Or ask a demonstrator. THIS WEEKYou should start this worksheet only if you have finished Spreadsheets 1: Introduction to Excel. This time we are going to look at charts and simple functions so that you can use Excel as a data analysis tool. A worked example – rats! This example uses Excel to analyse some data, create a chart or graph and insert the chart into a report in the form of a Word document. The example uses imaginary data about the presence of rats in the Bridge of Allan area. The data gives the numbers of brown and black rats per square metre at various distances from the river.

Upload: nguyendiep

Post on 27-Jul-2018

213 views

Category:

Documents


0 download

TRANSCRIPT

CSCU9B1: ESSENTIAL SKILLS FOR THE INFORMATION AGE SPREADSHEETS 2: PDMU9L6 STREAM

COMPUTING SCIENCE & MATHEMATICS PAGE 1 OF 16

CSCU9B1/PDMU9L6

SPREADSHEETS 2: ADVANCED FEATURES

LEARNING OUTCOMES

By the end of this practical class, you should be able to:

Create Charts or Graphs using data in Excel worksheets.

Insert an Excel Charts into a Word document.

Sort and group data in Excel.

Perform simple data analysis using Excel functions.

Work with groups of connected spreadsheets

IMPORTANT - SPREADSHEETS TEST

The Spreadsheets Test is coming up soon (see the online schedule).

Unlike the previous assignment, you will have to complete this test during your usual workshop session under examination conditions, so please make sure you arrive in good time to your class. The test is an assessed item and is a compulsory part of the course. It is an ‘open-book’ test, so you should bring your workshop handouts with you for reference. The test is designed to be done within 45 minutes.

If you don't do the test, you won't get a grade for the course! Unless you have good reason (for which documentary evidence will be required) you must sit the test at the time above.

Remember to register your attendance

Remember to check your student email

Remember to check out the CSCU9B1 web pages for any news and announcements

Saving: Don't forget: if you plan to work on your documents elsewhere in a previous version of the Office Suite, then you must save them in an appropriate format. Please ask if you don't know what this means. Help: Excel Help can be pretty useful. Or ask a demonstrator.

THIS WEEK…

You should start this worksheet only if you have finished Spreadsheets 1: Introduction to Excel. This time we are going to look at charts and simple functions so that you can use Excel as a data analysis tool.

A worked example – rats!

This example uses Excel to analyse some data, create a chart or graph and insert the chart into a report in the form of a Word document. The example uses imaginary data about the presence of rats in the Bridge of Allan area. The data gives the numbers of brown and black rats per square metre at various distances from the river.

CSCU9B1: ESSENTIAL SKILLS FOR THE INFORMATION AGE SPREADSHEETS 2: PDMU9L6 STREAM

COMPUTING SCIENCE & MATHEMATICS PAGE 2 OF 16

Distance from river Num. of Brown Rats Num. of Black Rats

5 5 2

10 20 8

15 17 13

20 8 15

25 3 17

Enter the above data into a new spreadsheet in columns A, B and C. Put the labels in too. So in cell A1, enter Distance from river, in cell A2 enter 5, etc.

In cell D1 enter the label Total Rats and enter a formula in D2 so that it contains the sum of B2 and C2. Replicate this formula down to fill column D.

Select the data you have entered (just the numbers - not the labels).

Switch to the Insert tab and locate the Charts panel. This panel contains a number of chart options for our selected data.

There are typically three steps to create a chart.

Step 1: choose a chart type.

Step 2: Selecting the Data Series

Step 3: Labelling the Axis.

We’ll go through these one by one.

Step 1: choose a chart type.

Choose your chart type from the panel of standard types available. When you select a chart, you are presented with a choice of chart types. Try clicking on, e.g. Pie, Bar and Area to see examples.

For our present purposes, select 3-D Line. Line with a 3-D visual effect.

Voila! The chart should appear in the spreadsheet.

Excel allows us to visually manipulate the three-dimensional 'view' of how the chart is displayed.

Select your chart and then switch to the Layout tab (within Chart Tools) and locate

CSCU9B1: ESSENTIAL SKILLS FOR THE INFORMATION AGE SPREADSHEETS 2: PDMU9L6 STREAM

COMPUTING SCIENCE & MATHEMATICS PAGE 3 OF 16

the Background panel. Select the 3-D Rotation button.

You have the chance to manipulate the X and Y axis, along with the Perspective of the chart using the buttons or data entry boxes provided. Try out some different values. You can see the effect in the small preview panel provided or you can apply the changes to your chart to see what it looks like. Keep doing this until you are happy with the result.

Excel also allows us to manipulate the data in the chart.

Step 2: Selecting the Data Series

Make sure the chart is still selected (the handles round the edge should be turned on) and select the Design tab. Press the Select Data button.

Although you have told Excel which data you are going to use, you have not provided any information about how the numbers are to be plotted. Excel has, nonetheless, made some reasonably intelligent guesses about how to present the data you chose, for example, the data in each of the columns has been plotted as a separate series on the vertical axis of the chart against the row number (not a bad guess!).

What we really want is to plot the number of brown rats, the number of black rats and the total number of rats, separately against the distance from the river. That is, we don’t want to see distance from the river as a line on the chart; rather, it should be the labels on the horizontal (X) axis.

Let’s sort it out. First of all, the horizontal axis will represent the distance from the river, so:

To choose the data for the horizontal axis, click the Edit button within the Horizontal Category(X) Axis Labels section. Now click and drag over the cells A2:A6, which contain the information about the distance from the river. Notice that the horrible expression =Sheet1!$A$2:$A$6 has been entered into the box. Click OK to finish selection.

Notice also, that the numbers from the selected cells have been converted into the horizontal scale markings in the preview window. The next step is to tell Excel how to display the different series of data required.

If you look closely at the chart, you will see that there are four different plots, each representing one of the data series (columns) from the table. One of these is a straight line rising from left to right. This appears because the column we are using for the horizontal axis has been plotted against itself. Why? Because we haven’t told Excel not to do it. In the Legend Entries (Series) box there are items called series1, series2, series3, and series4. (Actually, Excel may have guessed for itself that the headings you typed should be the series labels, in which case you just want to do the first step below).

Find the series referring to the values in column A and remove it (i.e. select series1 and press Remove.) Click OK to return to the graph (the straight line should have vanished). If you picked the wrong series, you can undo your remove operation.

You can also see the series mentioned on the chart itself, as labels on the Z axis. But these aren’t very informative labels. Give the other series names, (i.e. series2 should be Brown Rats, series3 should be Black Rats and series4 should be Total Rats). You can rename series by clicking the Edit button. The appearance of the chart should change to reflect the new names, so you know whether you’re on the right track.

CSCU9B1: ESSENTIAL SKILLS FOR THE INFORMATION AGE SPREADSHEETS 2: PDMU9L6 STREAM

COMPUTING SCIENCE & MATHEMATICS PAGE 4 OF 16

Step 3: Labelling the Axes.

Select your graph and switch to the Layout tab (under Chart Tools). Locate the Labels panel.

Select the Chart Title button and select the Above Chart option. Enter ‘Rat Population in Allan Water Area’ in the text box which appears.

Select the Axis Title button, then Primary Horizontal Axis Title, and then Title Below Axis. Choose Enter ‘Distance from river (m)’ in the text box which appears. This label will appear along the bottom.

We can follow a similar method to label the Y axis. Select the Axis Title button, then Primary Vertical Axis Title, and then choose Rotated Title. Enter ‘Rats per sq.m’ in the text box. This label will appear on the left side of the chart.

That’s it! Time to admire your beautifully formatted chart.

Remember the three steps of chart making: First Select a Chart type, second Select the Relevant Data and thirdly¸ Label the Graph. This will definitely come in useful in the test.

Exercise

Play around with your chart and become familiar with the Chart Tools in the Chart Tools tabs. To edit any one of the labels, just click on it and edit. Try moving the chart around the worksheet, make it bigger, smaller, thinner, longer, change the sizes of the different chart components relative to each other, change the colours and make it look garish, change them back and make it look tasteful. Go mad. And then …

Save your spreadsheet as ‘rats.xlsx’

Putting Excel Charts into Word Documents

Creating the chart in Excel is all very well, but you might want to include it in some kind of report, which you’ll probably want to create using Word. Alternatively, you might want to incorporate the chart into a presentation in Powerpoint. Both things are possible (and doing it in Powerpoint is rather like doing it in Word).

Copying or linking?

A word of warning! Moving objects between applications like Excel and Word is very easy. The basic idea is that you select the object (chart, image, etc.) copy it and paste it into the

target document, but, and this a very big but, there are two distinct ways of doing it. You can add a copy of the Excel chart into the Word document or you can set up a link between

Rat

s p

er

sq m

Distance from river (m)

Rat Population in Allan Water Area

brown rats

black rats

total rats

CSCU9B1: ESSENTIAL SKILLS FOR THE INFORMATION AGE SPREADSHEETS 2: PDMU9L6 STREAM

COMPUTING SCIENCE & MATHEMATICS PAGE 5 OF 16

the Excel spreadsheet and the Word document. Linking is like maintaining a live connection between spreadsheet and document, so that any updates to the spreadsheet are immediately apparent in the document too. Let’s try both!

Copy the folder Groups on Wide(V:)/CSCU9B1/Excel Worksheet 2 to your home folder and open your copy.

The folder contains a Word document called report.docx, which you should open. Arrange your screen to have two windows open at the same time so you can see both report.docx and your rats.xlsx spreadsheet.

Select the Rats chart in the spreadsheet and choose Copy from the Clipboard panel in the Home tab.

Position the cursor in the report document between the two paragraphs of text.

Instead of simply selecting Paste, click the arrow underneath the Paste icon and choose Paste Special. In the dialog that appears click the radio button which says Paste link: and choose Microsoft Office Excel Chart Object from the list.

The chart should appear in the document between the two paragraphs. If it doesn’t, move the image and set up the text wrapping and positioning, or ask for help. Now, back to the spreadsheet.

Select the data in the column headed ‘Black Rats’. This should be the range of cells C2:C6.

Press delete. This should have the effect of completely removing one of the graph lines in the chart. Move back to the Word document and right-click on the chart image. Choose Update Link. The chart should be updated. Now undo the last step in Excel. The change will be replicated in the Word document when you update the link again! Is this exciting or do I just need to get out more?

Remove the chart from the report document and put it back in again, but this time using Edit: Paste. It should be clear that when you update the spreadsheet now, the changes are not propagated through to the Word document.

Linking is good when you want documents to be dynamic, reflecting the most up to date information from sources external to the document and when the document is primarily intended to be used online (no matter how long you stare at a printed copy of a document it isn’t going to update is it?). It also keeps the size of the document itself down.

Pasting is good when the external data is stable or when it may not always be available, for example, if the spreadsheet files get moved from one place to another, links may get broken. (and, of course if the document is intended to be printed!)

How do I know how big a file is? Right click on the file icon , choose Properties and pick the General tab

Be careful when sending documents as email attachments. Documents containing

many embedded or pasted objects may become quite large, but sending

documents containing links may require sending the linked files as well, which

could be a real annoyance for the recipient if their inbox is bombarded with

huge attachments.

CSCU9B1: ESSENTIAL SKILLS FOR THE INFORMATION AGE SPREADSHEETS 2: PDMU9L6 STREAM

COMPUTING SCIENCE & MATHEMATICS PAGE 6 OF 16

Some examples of file sizes:

File type Typical size (in kilobytes)

Plain text file (notepad) e.g. assignment1.txt 3 KB

Small Word document e.g. assignment2.doc 24 KB

Large Word document e.g. this worksheet 750 KB (or 0.75 MB)

Small image file e.g. PabloandXavier.jpg 55 KB

Large image file e.g. from a digital camera 1,000 KB (1 MB)

Small spreadsheet e.g. Rats.xls 17 KB

Large spreadsheets e.g. CSCU9B1 classlist and grades

228 KB

Exercise - More Widgets (Highly recommended as practice for the test)

Let’s revisit the Acme Widget Company. Did you finish the spreadsheet from last session? If so, good, otherwise there is a ‘completed’, version, called plainwidgets.xlsx with data instead of formulas, in the Excel Worksheet 2 folder. You can use this to make a chart.

Open widgets.xlsx (or whatever you have called it).

We are going to create a chart showing the profit plotted against number of employees. The steps are:

1. Select the data.

2. Choose a column type of chart

3. Remove any unwanted data series from the chart (i.e. all of them except the profit).

4. Choose the cell range for the horizontal axis (the number of employees).

5. Label the axis and title of the graph.

6. Make it look beautiful!

The details are up to you, here’s one I made earlier (sorry it’s a bit gaudy!)

CSCU9B1: ESSENTIAL SKILLS FOR THE INFORMATION AGE SPREADSHEETS 2: PDMU9L6 STREAM

COMPUTING SCIENCE & MATHEMATICS PAGE 7 OF 16

Example - Student Marks

Open the file students.xlsx in your copy of the folder Excel Worksheet 2

You should be presented with a spreadsheet containing columns of data with student names, initials, assignment 1 marks (out of 15), assignment 2 marks (out of 15), and exam marks (out of 100). Currently the data is sorted in descending order by exam mark (Column E). We will use the raw data to prepare an analysis of the marks distribution.

Using the expertise you gained last week, prepare your spreadsheet as follows:

Insert a column on the left and number the students from 1 to 30 (use a simple formula to add 1 to the cell above).

Format the column so that the numbers appear in bold typeface and apply a border down the right side.

Insert a row at the top and put suitable headings at the top of each column. Make the headings bold and put a border along the bottom of the cells.

Use the Autofit features (on the Cells panel) to choose sensible column widths.

Let's sort the data by Surname. Select the data to sort (i.e. everything except for the column headings and row labels (i.e. the first column). You should have selected cells B2:F31).

-£8,000.00

-£6,000.00

-£4,000.00

-£2,000.00

£0.00

£2,000.00

£4,000.00

£6,000.00

£8,000.00

£10,000.00

£12,000.00

Profit

Employees

Widget Production

A word about the spreadsheet test…

You have now covered most of the material needed to do the test. The next

example might just help you to gain those last few marks to get a top grade.

CSCU9B1: ESSENTIAL SKILLS FOR THE INFORMATION AGE SPREADSHEETS 2: PDMU9L6 STREAM

COMPUTING SCIENCE & MATHEMATICS PAGE 8 OF 16

Select Sort from the Sort and Filter menu on the Editing panel. You will be presented with a dialog box offering you the choice of which columns to sort by.

When you click the ‘My List has Header Row’ radio button, Excel detects the column headings which you entered earlier, otherwise you just get the generic column headers (Column A, Column B, etc.). By clicking on the down arrow next to each ‘Sort by’ selection box, you can choose which column you wish to sort on. Note that you can choose more than one criterion. In this example, we want to sort by Surname first then by Initial.

Choose to sort by Surname (ascending) and then click Add Level and choose Then by Initials (ascending).

Click OK. Your data should now be sorted alphabetically.

There is a really bad ‘gotcha’ here that you must avoid. Why did we select all the columns (apart from the labels) to sort the data? Well, if we had chosen only the surname column then only the surnames would have been sorted, and we would lose the relationship between the surnames and the initials and the marks; they would end up attached to the wrong surnames. Why would Excel allow us to do this crazy thing? I don’t know, honestly, I just don’t know!

One of the features of MS Office applications, is that they often ask you if you are ‘sure you really want to do’ something or other. Not this time! Oh no, Excel just quietly lets you do it. So be careful.

The Formulas

Next we want to create a total column.

In G1 type Total and in H1 type % (the percent symbol).

A quick way to make these column headings blend in with the others is to use

the ‘Format Painter’.

Click on the cell with the desired format, for example, ‘E mark’ heading (F1)

Click the Format Painter button on the Clipboard panel .

Click on the cell to which you want to apply the format (G1). Wonderful!

In the Total column, add together the three marks for the first student (should be Aitken). How do you do that? Well, you could use the formula =D2+E2+F2 in G2. Better still you could use one of Excel's built in functions by entering the formula =SUM(D2:F2). Even better again, just click on the AutoSum speed button on the Editing panel

and Excel will guess that you want to add up all the adjacent columns containing numbers to the left of the current cell. Whichever method you choose, you should get Aitken’s total mark in cell G2 (it should be 75)

Now replicate the formula in G2 downwards for all students.

CSCU9B1: ESSENTIAL SKILLS FOR THE INFORMATION AGE SPREADSHEETS 2: PDMU9L6 STREAM

COMPUTING SCIENCE & MATHEMATICS PAGE 9 OF 16

Excel contains a number of inbuilt functions which can be accessed by clicking the arrow on the AutoSum button or by clicking the down arrow in the Naming Box when we type “=” in the input box.

Next, we want to calculate this mark as a percentage. Before we can do this, we need to know the maximum marks possible. In our case, it’s 130. So, we need to put this somewhere on the spreadsheet so we can refer to it. In fact, let’s record the maximum marks for each assessed piece of work below the data.

In B35 enter the text Maximum

In cell D35 enter the value 15.

In cell E35 enter the value 15

In cell F35 enter the value 100

Click on cell G35 and use the AutoSum button from the Editing panel.

This will reveal a dialog box (a formula palette, actually - ooOOoo!) for the SUM function which invites you to enter the ranges of cells which you want to add up. In this case, we just want to add the three cells D35:F35 and, of course, Excel has guessed that already!

Give the cell G35 the name maxmarks. (“I name this cell…”)

In H35 type in 100%. We now have all the information we need. We will use this row later as the basis of a data analysis section.

We shall display the student percentage scores in Column H. Go back to the first student (should be in row 2). In the % column enter the formula =G2/maxmarks.

G2 contains the total for the first student, maxmarks contains the total possible marks. Right, what you’ll see in cell H2 is ‘0.57692308’, i.e. the result of the division. But we need to Excel to display it as a percentage.

Select the cell H2 and press the Percentage button from the Number panel

The cell will be displayed as a percentage. The trouble is, it doesn’t necessarily display the correct number of decimal places. We can fix it!

In the Number panel is a speed button for increasing and one for decreasing the number of decimal places.

Make it display one decimal place.

Replicate cell H2 down so that all the people have percentages in the H column. Notice that when you replicate a cell, any formatting gets copied as well.

CSCU9B1: ESSENTIAL SKILLS FOR THE INFORMATION AGE SPREADSHEETS 2: PDMU9L6 STREAM

COMPUTING SCIENCE & MATHEMATICS PAGE 10 OF 16

DATA ANALYSIS: MORE FUNCTIONS

The AVERAGE function

Now we can add some averages at the bottom of each column:

In cell B32, type Averages

Select the first empty cell below the data for the first assignment marks (D32).

Type in the equals symbol (=). Before you do anything else, look at the Function Selector at the top left of the cells (in the Naming Box).

Click on the small downward pointing arrow on the right, and a list of (some of) the available functions will appear. Choose Average.

What has happened? Well, in this case, Excel has guessed exactly what you want to do, that is, the average of the column of cells above the current cell. A formula palette appears with the suggested cell range already inserted in it along with some useful information about the chosen function. This is a Very Useful Thing!

Press OK. You should see the result of the calculation in D32.

The input line should show =AVERAGE(D2:D31). This time you were lucky because Excel knew what you wanted to do. It is more likely that you will have to enter the formula, or at least some of it, manually, so let’s do it that way too.

Delete the contents of D32.

Enter =AVERAGE( including the opening bracket.

Now click and drag across the range of cells that you want to average (i.e. D2:D31) You can drag from either end. Notice the cell range is added into the formula as you drag.

Now add a closing bracket ‘)’ to the end of the formula and press Return. The result should be the same as before.

Now replicate this cell across from D32 to H32. You will need to format the row containing the averages.

The STDEV function

AVERAGE is just one of the many built in functions available in Excel. Let’s look at a few important ones. In addition to recording student marks, we want to generate some information about the distribution of the marks, perhaps to compare with previous years’ results. We might also want to display the distribution graphically.

Select cells D32:H32 (i.e. the averages) and choose Copy from the Clipboard panel.

Right click on cell D36 and choose Paste Special: Values and Number Formats.

At the risk of being boring, notice that these formulae use relative addresses.

Strictly, a mixed address would be more accurate. (Why do you think that is?)

However, it is very common, for example, to sum or average a column of figures

and then replicate the formula along the bottom of a group of columns as we

have just done. Here, we’re using knowledge about the location to which the

formula will be copied to decide we don’t need to be strict.

CSCU9B1: ESSENTIAL SKILLS FOR THE INFORMATION AGE SPREADSHEETS 2: PDMU9L6 STREAM

COMPUTING SCIENCE & MATHEMATICS PAGE 11 OF 16

Enter the label Std Dev in B37.

Enter the formula =STDEV(D2:D31) into D37 (note: Excel does not guess the cell range correctly this time - we’ve outsmarted it!!). This built in function calculates the standard deviation of the data. This is a measure of how closely (or not) the individual values are grouped around the average (in case you didn’t know).

Replicate this formula across from D37 to H37. Format the cells.

The IF function

Suppose the pass mark for the course is 50% and we want to display whether a student has passed or failed. We can apply a test to a cell and, depending on the result of the test, display different messages.

Enter the label ‘Result’ in the top row in cell I1 and format it.

In I2 type in the = sign and select IF from the function list. (you may have to look for it in More Functions …). You should see the function palette for the IF function. What we want to test is whether the student has achieved 50% or better. If this is true, then the contents of Column I should be 'pass' otherwise 'fail'. Remember that the values in Column H are formatted as percentages, while the actual values contained in the cells are between zero and one.

In the Logical_test box type H2 >= 50%. (The symbol >= means 'greater than or equal to')

In the Value_if_true box, type pass.

In the Value_if_false box, type fail.

Press OK. If you make any mistakes, Excel will tell you that it doesn't understand and you can try again.

Replicate the formula from I2 down to I31.

The COUNTIF function

In this exercise we assume student grades are divided into five broad bands, namely:

Grade 1: 80% or better,

Grade 2: 60% to 79.9%,

Grade 3: 50% to 59.9%,

Grade 4: 40% to 49.9%

Grade 5: less than 40%.

It would be nice to show in our data analysis how many marks occurred in each grade band. We can use the COUNTIF function applied to a range of cells. We ask Excel to count the number of times a condition is true in a certain range of cells. Try this:

In cell B38 type the text Grade 1.

In cell C38, enter the COUNTIF function with the range set at H2:H31 and the criteria at >=80%. Remember that you can click and drag over the range of cells while the cursor is

CSCU9B1: ESSENTIAL SKILLS FOR THE INFORMATION AGE SPREADSHEETS 2: PDMU9L6 STREAM

COMPUTING SCIENCE & MATHEMATICS PAGE 12 OF 16

flashing in the Range box. Note that you may need to format your result from being a percentage to being a number – using the format tools.

To work out how many students got grade 2 results you will need to work out the number whose marks were at least 60% and subtract, from that, the number whose marks were at least 80%.

The formulas are:

=COUNTIF($H$2:$H$31, ">= 60%") -COUNTIF($H$2:$H$31, ">= 80%") in cell C39

=COUNTIF($H$2:$H$31, ">= 50%") -COUNTIF($H$2:$H$31, ">= 60%") in cell C40

=COUNTIF($H$2:$H$31, ">= 40%") -COUNTIF($H$2:$H$31, ">= 50%") in cell C41

=COUNTIF($H$2:$H$31, "< 40%") in cell C42

Rather than type all of these formulas in separately, just copy the formula

from C39 and edit it for each cell.

Exercise

Try to complete the frequency distribution and illustrate it using another chart.

Try sorting the data so that it is ordered on percentage mark rather than alphabetically - remember to select all the columns you want to sort (and choose ascending or descending depending on what order you want your data listed).

Save your work.

WORKING WITH MORE THAN ONE WORKSHEET

Imagine you have been asked to compare the results of the Spring semester grades with those of the Autumn semester to determine any variation in the standard of marking, for example. In the real world, you would have a template spreadsheet, which you could copy each term and into which you could insert the marks for that term. Here, however, you can use a set of worksheets ready-made for the job.

The rest of this worksheet contains more advanced (but extremely useful)

material, which will not be examined in the spreadsheets test so if you find it a

bit hard going, don’t worry. I do recommend that you try to reach the end,

however. You still need to do a bit more to get to this week’s checkpoint.

CSCU9B1: ESSENTIAL SKILLS FOR THE INFORMATION AGE SPREADSHEETS 2: PDMU9L6 STREAM

COMPUTING SCIENCE & MATHEMATICS PAGE 13 OF 16

Open your copy of terms.xlsx in your Excel worksheet 2 folder. At first sight, this should look exactly like the students spreadsheet that you have been working with, but take a look at the bottom left corner and notice that the first two worksheets in this workbook have been named Autumn and Spring.

Click on each one in turn to see the contents. The names and the formulas are the same but the marks are different.

Right click on the 'Sheet 3' tab and choose Rename. Call the worksheet Annual. We are going to create a spreadsheet to display a summary of the data in the other two.

Go to the Autumn sheet, select B38:B42, (just the cells with the Grade 1 etc. labels), choose Copy from the Clipboard panel, and then go back to the Annual worksheet, click on cell A1 and choose Paste.

Now select B1 and type in the = symbol. We are going to enter a formula.

Select the Autumn worksheet tab. Notice that the input line now contains =Autumn! and that you are looking at the Autumn spreadsheet (although you are working on the Annual spreadsheet).

Just select C38 and press return. You should now be back in the Annual spreadsheet and the cell B1 should contain the formula '=Autumn!C38'.

So your Annual spreadsheet now contains a formula (really just a reference) involving data in another spreadsheet.

Replicate the formula from B1 down to B5. Does it work? Of course it does!

Now arrange for the Spring data to appear in column C.

Make a chart from the data and labels in the range A1:C6. Try to get your Annual spreadsheet to look like the one above (or better)!

Of course we could just have copied the information (the values) from the Autumn and Spring worksheets to the Annual one. But then if we made changes in the former they would not be reflected in Annual. This is a bit like above when the chart was pasted into a Word document. We want to make the links live. Let's see if this all works as it should.

Go to the Autumn spreadsheet and change the exam mark for the first student from 55 to zero. This should have the effect of reducing the number of Grade 3 marks from eight to seven (and the student concerned to tears!) while increasing the number of Grade 5 marks from zero to one.

Hint: I’ve selected the Show data table option in the using the Data Table

button on the Labels panel.

CSCU9B1: ESSENTIAL SKILLS FOR THE INFORMATION AGE SPREADSHEETS 2: PDMU9L6 STREAM

COMPUTING SCIENCE & MATHEMATICS PAGE 14 OF 16

Now go back to the Annual sheet and check that this change has been reflected in the chart. Ask for help if it doesn't work. Once you are satisfied that it does work, press undo to reverse the change.

Checkpoint

Show the tutor or demonstrators your Rats report Word document containing the Excel chart, your widgets document complete with illustrative chart, your use of functions in the students worksheet, including frequency bins and chart, and your annual student marks comparison workbook.

PRINTING FROM A WORKSHEET (BACK TO WIDGETS)

Go back and open your widgets.xlsx spreadsheet again.

Suppose we want to print a copy of this spreadsheet for our files. Important documents should be backed up with hard copies in case of disasters.

Select the Print option fro the File menu. This will show you a Print Preview where Excel will try to show you how your spreadsheet will look when printed out. In most cases this will not be the way you would like it to print, so we will have to organise the layout. You should see something like this. The layout is poor if, for example, the chart has been truncated on the right, or the table data has been split over two pages.

There are a number of buttons on the Preview screen. You can experiment with all of them in your own time but for the moment we will just choose a few helpful settings.

Use the Next or Previous buttons to move between the pages of the preview.

Press the Page Setup button to fix the general layout of the pages.

Choose the Page Setup button and select Landscape.

Leave the Margins for now.

In the Header and Footer section, press the Custom Header button and enter the following (use the date speed button for the right section):

Even if you move the data in the source sheet, the destination sheet should keep

track of it.

When you are working with different sheets within a workbook, you can use the

undo/redo buttons in each sheet independently. This is a Very Good Thing!

CSCU9B1: ESSENTIAL SKILLS FOR THE INFORMATION AGE SPREADSHEETS 2: PDMU9L6 STREAM

COMPUTING SCIENCE & MATHEMATICS PAGE 15 OF 16

Click OK.

Then select ‘Page 1 of ?’ from the Footer menu to display the page number and the total number of pages at the bottom of the page. Click OK

Exit Print View and switch to the View tab. Select the Page Break Preview button on the Workbook Views panel.

You will see a different view of your spreadsheet with the current page breaks highlighted with blue lines. These can be moved simply by dragging then with the mouse. Let’s make our printed version of the spreadsheet have three pages, showing the basic data, the table, and the chart, respectively.

Drag the page break lines around to group the data into three pages (i.e. the data, the table and the chart).

At this point, you could print out your spreadsheet, but what if you only wanted to print out a section of it, for example, the chart.

Select the area of the spreadsheet containing the chart. Just click and drag over an area that contains the chart and choose Print from the File menu and select the Active Sheet option.

before

after

CSCU9B1: ESSENTIAL SKILLS FOR THE INFORMATION AGE SPREADSHEETS 2: PDMU9L6 STREAM

COMPUTING SCIENCE & MATHEMATICS PAGE 16 OF 16

WHAT YOU’VE LEARNT ABOUT SPREADSHEETS…

A lot actually, and I’ll bet you’ll need to come back and figure some of it out again. I recommend doing exactly that: log off now, then go away, think about what you did, and come back and do it again. It’s worth the practice, and although it seems tedious, the key is that the more practice you give it, the easier it becomes.

Anyway, here’s what we covered in this and the previous spreadsheet session:

Starting up Microsoft Excel

Relative, mixed, and absolute addressing

Using built-in functions in spreadsheets

Defining names for cells in spreadsheets

Formatting cells

Constructing spreadsheets to solve simple (and not so simple!) problems (You know, it occurs to me that simple does not always mean easy…)

Using Excel to produce charts and graphs

Producing Word documents containing charts

Sorting a list of data using different criteria

Working with several worksheets

Formatting a spreadsheet for printing.

REMEMBER The Spreadsheets Test is coming up.