Excelnotes 07
Excelnotes 07
Excelnotes 07
Introductory notes
What is Excel 2007?
This course introduces Microsoft Excel 2007, usually simply referred to as Excel 2007.
This is a very popular and powerful spreadsheet application. Spreadsheets facilitate the
production of lists, tables and charts which means they are much used by those who wish
to prepare balance sheets of income and expenditure. They may also be used to process
examination results and to tabulate anything from a record of the daily supply of food to
the armies of Edward III to a mathematical function.
A Warning
It is essential to follow these notes carefully. Use the left mouse button unless you
are specifically asked to use another. Click the mouse button only once unless you are
specifically asked to double-click.
Keyboard Shortcuts
Some frequently-used commands have keyboard shortcuts, which are indicated in these
notes in a box, but which can safely be ignored for now if you wish – they are given for
reference only. For example,
This means “hold down the Ctrl-key and, keeping it depressed, press and release the I-key,
then release the Ctrl-key”.
F.H. King and C.H. Northeast 11/08 Excel 2007 (Session 1) Page 1
SESSION 1 Getting Started with Excel 2007
Objectives
By the end of Session 1, students should
• know how to log in and start up Excel 2007 and how to finish a session at the computer
• be able to identify the Title Bar, Office Button, Quick Access Toolbar, Ribbon,
Formula Bar, Vertical and Horizontal Scrollbars, Status Bar, Row Labels, Column
Labels
• know how to change the selection (active cell or active sheet, for example) from cell
to cell and from sheet to sheet
• know how to enter text, formulae and other information and how to delete it or make
changes to it
• remember to confirm cell contents after making changes
• know how to insert and delete rows and columns, how to change the width of a column,
and how to merge and centre the contents of a cell above several others
• be able to format cell contents (for example alignment, bold etc., number of places
after a decimal point)
• be able to use the SUM function
• understand the way formulae are copied from cell to cell and know when to use the $
prefix
• be able to sort an Excel 2007 list
• know how to create a chart, and how to delete, move and change the shape of a chart
• know how to save a worksheet and to give it a helpful name
• be able to preview and print either a chart or a worksheet
• know how to change margins, centre a worksheet horizontally or vertically on the
page, insert a header or footer
F.H. King and C.H. Northeast 11/08 Excel 2007 (Session 1) Page 2
• Click the Close button of the invitation to Take a tour of Windows XP.
• Click the Close button of the Message of the Day (MOTD) window to remove it.
• Click the Start button at the bottom left of the screen.
• Click PWF Programs.
• Double-click Remote Applications (CS Courses).
• Double-click MS Excel 2007.
• A window entitled RemoteApp appears; type your password and click OK.
Eventually the Microsoft Excel window appears, filling almost the entire screen.
The Excel 2007 application shares some of the features of its companion application
Word 2007.
The Formula Bar is particularly important in Excel 2007 and you should take special note
of it. Use the mouse to point (but not click) in the white area above the column labels D,
E, F etc. After a second or two, a ScreenTip tells you that this is the Formula Bar . (If this
does not work, click somewhere in the main part of the screen to activate the spreadsheet
and then try again.)
At the bottom of the window there are two more bars associated with Excel 2007:
6. The Horizontal Scroll Bar
7. The Status Bar
Finally, below the Status Bar (which probably says Ready), there is the Windows taskbar
whose buttons indicate what other windows are open behind the scenes.
The Ribbon
The Ribbon contains Commands which are arranged into Groups. In turn, these groups
are displayed on tabs (labelled Home, Insert, Page Layout etc).
The Home tab contains the commands that are most commonly used, and many of them
will be described in this introductory course. Try clicking on Insert so that the Insert tab
comes to the fore with a different set of commands. Try clicking on each of the other tabs,
but when you have finished, the Home tab should be on top.
F.H. King and C.H. Northeast 11/08 Excel 2007 (Session 1) Page 3
Workbooks and Worksheets
The main part of the screen is called a workbook. This consists of a collection of worksheets,
initially called Sheet1, Sheet2 and Sheet3. These names are to the left of the Horizontal
Scroll Bar near the bottom of the screen. Each name is on a sheet tab and Sheet1 is on
top to begin with. This is the active sheet:
• Click the Sheet2 sheet tab with the left mouse button. This worksheet becomes the
active sheet. Click the Sheet 3 sheet tab, note what happens, then. . .
• Click the Sheet1 sheet tab. This is the only worksheet that will be used in this session.
A worksheet consists of a grid of rectangular cells which are arranged in rows and columns.
The rows are numbered downwards starting from 1 and the columns have letters starting
from A. There are coloured column labels at the top of the worksheet and row labels along
the left-hand edge. Note particularly column label A and row label 1.
Initially, cell A1 is the active cell. It is highlighted by an emphasised border and A1 is
noted in the Name Box at the left-hand end of Formula Bar:
• Tap the →-key to move the selection from cell A1 to cell B1. Cell B1 becomes the
active cell and this is noted in the Name Box, to the left of the Formula Bar.
• Repeatedly tap the →-key and attempt to select a cell that is off the right-hand side
of the window. Notice what happens. More columns appear at the right and columns
A, B and so on disappear at the left.
• Note that columns A to Z are followed by columns AA to AZ then AAA to AAZ and
so on. The final column is XFD.
You see only part of the full worksheet which has 1,048,576 rows and 16,384 columns
altogether.
• Key in Ctrl-→ and then Ctrl-↓. This makes cell XFD1048576 the active cell (as verified
in the Name Box).
The standard ways of moving round the worksheet include using:
1. The mouse (clicking a cell makes it the active cell).
2. The arrow keys (with Ctrl when appropriate).
3. The Page Up and Page Down keys (next to the Home and End keys).
4. The scroll bars at the right-hand side and at the bottom of the window.
Experiment with these facilities but end with. . .
• Ctrl-Home to make A1 the active cell.
Keying in Data
Imagine that you have just moved into a flat and that you have measured and recorded
the area of each room in square metres:
Kitchen 6
Bathroom 13
D/L 14
Bedroom 12
Lobby 3
F.H. King and C.H. Northeast 11/08 Excel 2007 (Session 1) Page 4
(D/L stands for Dining/Living room.) Enter this information as follows:
• With A1 as the active cell, key in Kitchen and notice that this appears in the cell and
in the Formula Bar. Notice also that as you start typing, two new buttons appear to
the left of the Formula Bar: the Cancel button has a cross (X) and the Enter button
has a tick (X).
• Click the Enter button (the one with the tick) to confirm that Kitchen is to go into
cell A1.
• Tap → to make B1 the active cell and key in 6. This time press RETURN (the large
key marked with a bent left-pointing arrow) to confirm that 6 is to go into cell B1.
• Click cell A2 to make it the active cell, key in Bathroom and then tap →. This confirms
that Bathroom is to go into cell A2 and makes B2 the active cell.
• Key 13 into cell B2 and click the Enter button (the one with the tick).
Now you decide that Drawing Room would be better than D/L:
• Make A3 (with D/L in it) the active cell. Key in Drawing Room and notice that it
doesn’t fit into the cell.
• Click the Cancel button (with the cross) to restore the D/L.
F.H. King and C.H. Northeast 11/08 Excel 2007 (Session 1) Page 5
Changing your Mind: Undo
Remember the Quick Access Toolbar at the top left of the screen, with shortcuts to the
Save , Undo and Redo commands.
• Click Undo , and D/L will reappear in the cell.
Deleting a Cell
Look at the Cells group of commands near the right-hand end of the Ribbon (Home tab).
This contains the commands Insert, Delete and Format, each of which has a drop arrow H
denoting a drop-down list of sub-commands.
• Click the H below the Delete command; a drop-down list of four Delete sub-commands
appears.
• Note that Delete Cells is followed by an ellipsis (. . .) to indicate that a dialogue box
will appear. Click Delete Cells...
The Delete dialogue box appears. This contains four mutually exclusive options, each with
an option button. The selected option button contains a black dot. It is probably Shift
cells up and that is what happens when you. . .
• Click OK. This time a cell is deleted, rather than the contents of a cell.
• Bring back D/L as follows: click Undo on the Quick Access Toolbar.
Dining 7
Living 7
• Check that A3 (with D/L in it) is still the active cell, and then click the H below Insert
(Home tab, Cells group).
• Click Insert Sheet Rows.
A blank row is inserted and, in consequence, D/L is now in cell A4:
• Key Dining and 7 into cells A3 and B3 and. . .
• Overwrite D/L and 14 by Living and 7 respectively.
Using Formulae
Suppose you now wish to add a third column giving the areas in square feet. Take one
square metre to be 10.76 square feet. The first new entry will be 10.76 × 6 in cell C1. It
is time to use a spreadsheet formula:
• Make cell C1 the active cell and key in =10.76*B1 (the equals sign is essential ). Click
the Enter button (with the tick) to confirm. The value 64.56 should appear in cell C1.
An Excel 2007 formula is always introduced by an equals sign. In simple cases, formulae
consist of numbers, cells and arithmetic operators (principally +, −, ∗ and /, the last two
being for multiplication and division).
F.H. King and C.H. Northeast 11/08 Excel 2007 (Session 1) Page 6
The formula this time notes that cell B1 contains 6 and works out that 10.76*B1 is 64.56.
Although you could now key in the formula =10.76*B2 and so on, there is an easier way. . .
Saving a Worksheet
Whenever you prepare a worksheet it is advisable to save it in a file fairly soon after starting
and to keep saving at frequent intervals thereafter. The Title Bar quotes a provisional title
Book1 as a file name for your workbook but Flat seems more appropriate, so
• Click the Office Button (at the top left); a menu appears.
• Choose Save As... so that the Save As dialogue box appears.
• Notice that contents of the File name box are highlighted, which means that anything
you key in will overwrite the contents. . .
• Key Flat into the File name box.
• Click Save.
This saves the file. The Book1 in the Title Bar changes to Flat.xlsx. As a matter of note,
the file name extension .xlsx indicates an Excel 2007 file.
F.H. King and C.H. Northeast 11/08 Excel 2007 (Session 1) Page 7
• Click the row label 1 to the left of the K of Kitchen. This selects the whole of row 1.
If you had clicked on the H the command to use would have been Insert Sheet Rows.
• On the Home tab, in the Cells group, click Insert. The entire collection of entries moves
down one row because the whole of row 1 was selected.
Notice that the square feet values have not been disturbed. In inserting a blank row
Excel 2007 automatically adjusted the formulae. You will find that the formula that yields
64.56 has changed from =10.76*B1 to =10.76*B2.
• Key the headings Area, Sq m and Sq ft into cells A1, B1 and C1.
Area Sq m Sq ft
Kitchen 6 64.56
Bathroom 5 53.8
Dining 7 75.32
Living 7 75.32
Bedroom 12 129.12
Lobby 3 32.28
F.H. King and C.H. Northeast 11/08 Excel 2007 (Session 1) Page 8
Notice that while you were typing this in, Excel 2007 was suggesting various functions that
are built into it; SUM is one of them; it totals the values in the array range supplied in
brackets.
An item in brackets after the name of a function is called an argument of the function.
Here the argument B2:B7 designates the range of cells B2 to B7 inclusive.
Although you could now make cell C9 the active cell and key in =SUM(C2:C7), it is easier
to use the Fill Right facility as follows:
• Drag the mouse from cell B9 to cell C9 to select these two cells.
• On the Home tab, in the Editing group, click Fill and then Right.
• Convert the three entries in row 9 to bold fount.
When a formula incorporates a function, the Insert Function button, marked f x and found
to the left of the Formula Bar, is sometimes useful. In the special case of the SUM function,
it is better still to use AutoSum, marked with a Σ-sign on the Home tab, in the Editing
group.
Formatting Numbers
In Excel 2007 terminology, the Format Category is, by default, General. This normally
means that a number is shown to as many significant figures as will fit in the cell but the
overriding rule is that any leading or trailing zeros are suppressed and an integer (a whole
number) is shown without a decimal point.
In a normal-width cell 3.14159 would be written as 3.14159 but 00503.80 would be written
as 503.8 (without the leading and trailing zeros). If you were to divide 100 by 3 (using the
formula =100/3) the recurring decimal result would be taken to as many places as would
fit in the cell.
All the numbers in the square metre column are whole numbers so there are no decimal
points. The numbers in the square feet column are taken to two decimal places except
where the second decimal place would be a zero when only one decimal place is shown. It
would be neater to have all values taken to two decimal places:
• Click the column label C to select the whole column.
• On the Home tab, in the Cells group, click Format.
• From the drop-down list, choose Format Cells...
In the Format cells dialogue box, note that the Category is General. The next Category is
Number which, by default, forces two decimal places without the suppression of trailing
zeros.
• Click the Number category to select it and check that the number of Decimal places is
shown as 2.
• Click OK.
F.H. King and C.H. Northeast 11/08 Excel 2007 (Session 1) Page 9
• Key in the formula =B2/B9. Click the Enter button (with the tick). The result is
0.15 which is 6/40 and needs to be converted to a percentage. . .
• On the Home tab, in the Cells group, choose Format and then Format Cells... The
dialogue box indicates that the Category is General.
• Click the Percentage category and again check that the number of Decimal places is
shown as 2. Click OK. The value in cell D2 changes to 15.00%.
So far in this course, when a function or formula has been copied from one cell to another
cell, or to a range of cells, a relative cell reference has been used. For example, in the Sq ft
column, Excel 2007 changed the formula =10.76*B2 to =10.76*B3, =10.76*B4 and so on.
Sometimes an absolute cell reference is required; it describes one specific location in the
worksheet.
See what happens if the contents of cell D2 are copied to cells D3:D7. . .
• Drag the mouse from cell D2 to cell D7 to select the array of six cells.
• On the Home tab, in the Editing group, click Fill, then click Down. The result is most
unsatisfactory. The new cells contain the complaint #DIV/0! which means you are
trying to divide by zero.
• Make cell D3 the active cell. The formula (look at the Formula Bar) is =B3/B10
whereas you want =B3/B9. Make cell D2 the active cell again.
There is a problem. The formula in D2 is =B2/B9 and in filling down you want the B2 to
change to B3 but you don’t want the B9 to change to B10. This latter cell is empty and
its value is deemed to be zero, hence the complaint.
To work out the percentages using the formula suggested above (do not enter these formulae
yet),
the contents of D2 should be =B2/B9
the contents of D3 should be =B3/B9
the contents of D4 should be =B4/B9
the contents of D5 should be =B5/B9
and so on. The reference B2 should change to B3 to B4 to B5 whereas the reference B9
should stay the same in each case.
To keep the 9 of B9 from changing to a 10 you must use a dollar prefix . You have to modify
the formula so that there is a $ in front of the 9. The revised formula will be =B2/B$9
and you can think of the dollar-sign being a modified ‘S’ with $9 standing for ‘Stick to 9’:
• Check that D2 is the active cell. You could key in the whole of the revised formula
afresh, but since it is only one character different a shortcut is advised. . .
• Click in the Formula Bar between the B and the 9 of B9 and then key in $. The
formula changes to =B2/B$9 as required. Click the Enter button. The result in D2
is 15.00% as before.
• Drag the mouse from cell D2 to cell D7 to select the array of six cells again.
• On the Home tab, in the Editing group, choose Fill H Down. This time the entries are
sensible percentages.
F.H. King and C.H. Northeast 11/08 Excel 2007 (Session 1) Page 10
• Make cell D3 the active cell. The formula (look at the Formula Bar) is =B3/B$9 and
you will find that the formula in cell D4 is =B4/B$9. The $ really does mean that the
9 Sticks at 9.
You could have had a second $ and included $B$9 in the formula. This extra $ forces the B
to Stick to being a B but since you are filling down a column, the B won’t change anyway.
If you were filling a row using Fill H Right then prefixing the B would be essential.
Tidying up
The new column needs a heading:
• Make cell D1 the active cell, key in %age and click the Enter button to confirm. This
heading will automatically be bold because the whole of row 1 was selected when B
was used earlier. The heading will not be right-aligned though because only cells B1
and C1 were selected when right-aligning was imposed.
• Check that D1 is the active cell and click Align Text Right (Home tab, Alignment
group).
The entries probably now look something like this:
Area Sq m Sq ft %age
Kitchen 6 64.56 15.00%
Bathroom 5 53.80 12.50%
Dining 7 75.32 17.50%
Living 7 75.32 17.50%
Bedroom 12 129.12 30.00%
Lobby 3 32.28 7.50%
Totals 40 430.40
Spreadsheet Updating
Suppose you decide not to list the Dining and Living rooms separately and wish to go
back to a single area D/L of 14 square metres. The following operations will illustrate
how, whenever you make a change, Excel 2007 will make any consequential changes:
• Make cell B5 the active cell and overwrite the 7 with 0. Click the Enter button.
Several consequential changes occur; in particular the total area is reduced to 33 and
the percentages all change.
• Make cell B4 the active cell and overwrite the 7 with 14. Click the Enter button. The
total area reverts to 40 and all the percentages are restored except for the Dining and
Living rooms.
• Overwrite Dining with D/L.
• Select the whole of row 5 by clicking the row label 5.
• Click Delete (Home tab, Cells group).
F.H. King and C.H. Northeast 11/08 Excel 2007 (Session 1) Page 11
• Click Insert (Home tab, Cells group). Since two rows were selected, two rows are
inserted thereby producing two blank rows at the top.
• Make cell A1 the active cell, key in the heading MY LOVELY NEW FLAT and click the
Enter button to confirm.
This heading now spills over to adjacent cells. Provided you don’t want to use these
adjacent cells no harm is done. Indeed it is common to let headings spill over like this.
Nevertheless, you will sometimes want to make a column wider to accommodate a rather
long text entry or to make it narrower if all the entries are rather short. . .
F.H. King and C.H. Northeast 11/08 Excel 2007 (Session 1) Page 12
• Click Merge & Center. The heading is centred as required.
As is implied by the name of this command, cells A1 to D1 have been merged into one new
larger cell A1 (and cells B1 to D1 have been eliminated). If the width of any or all the
columns A to D is changed, the centring of the heading will be adjusted automatically.
There is another way of changing the width of the columns:
• Use the mouse to point between the column labels C and D. The pointer changes to
a cross shape.
• Drag rightwards so that column C becomes much wider. Notice that MY LOVELY
NEW FLAT automatically moves so that it is still centred across the columns.
• On the Quick Access Toolbar, click Undo to restore the previous width.
Saving Again
It is sensible to save any work in a file every few minutes to guard against power cuts and
other kinds of accident:
• Click the Office Button (at the left-hand end of the Title Bar).
• Choose Save. The Flat.xlsx file is updated.
Note that a quicker way of saving the file with the same name as before would be to click
on the Quick Access Toolbar.
The data are sorted into alphabetical order of rooms because Excel 2007 has decided that
you wish to sort by Area (in the top left of the block of cells) which is what you want.
Whole rows will be shuffled in such a way that the row whose first entry is Bathroom comes
to the top. In this example, Area is the key to the sort.
F.H. King and C.H. Northeast 11/08 Excel 2007 (Session 1) Page 13
Suppose that you now decide that it would be better to have the rooms in size order with
the largest first. This time Sq m will be the key and the sort order will be Descending:
• Check that the range A3:D8 is still selected. Click Sort & Filter again and choose
Custom Sort...; the Sort dialogue box appears.
• Click the leftmost button in the dialogue box (under Column). The drop-down list
confirms that sorting is by Area by default but you could also sort by Sq m, Sq ft or
%age.
• Click Sq m
• Click the rightmost button in the dialogue box (under Order) and choose Largest
to Smallest in the drop-down list.
• Click OK. The data are sorted into descending order of size.
F.H. King and C.H. Northeast 11/08 Excel 2007 (Session 1) Page 14
• Click in the worksheet outside the chart; the border disappears because the chart is
no longer selected, and the three new tabs disappear from the Ribbon.
• Click in the chart to select it again; the border and the tabs reappear.
• Finally, point at different parts of the chart and notice that you are told the name of
the part being pointed at (Chart Title, Legend etc.).
F.H. King and C.H. Northeast 11/08 Excel 2007 (Session 1) Page 15
Moving the Data and the Chart
You should now have a reasonably tidy chart but the worksheet as a whole would look
better if the data were moved one column to the right and the chart moved underneath
the data. The data occupy four columns and the chart occupies six columns:
• Click cell A3 to select it (and deselect the chart).
• On the Home tab, in the Cells group, click the drop arrow H of Insert and then choose
Insert Sheet Columns. Everything moves right one column, including the chart.
• Click anywhere in the chart. This selects the chart and you can then. . .
• Drag the chart as far to the left as it will go.
• By using the drag handles, arrange for the chart border to fill all the cells in the range
A13 to F26.
Deleting a Chart
Remember that you can use Undo on the Quick Access Toolbar to undo the last change
you made to the chart, but sometimes you will wish simply to delete the chart and start
again. This next illustration does just that:
• Select cells A3 to B8 again.
• On the Insert tab, in the Chart group, click Bar and choose the first chart sub-type. A
new chart appears in the worksheet, and is selected (note the border).
• Delete this new chart by pressing the Delete key.
Previewing
• Ensure that the chart is selected; click inside it if it is not.
• Click the Office Button and then click I to the right of Print.
• Now choose Print Preview. Because the chart was selected the previewer shows only
the chart.
• Click the Close Print Preview button on the Preview tab to close the previewer.
• Click a cell in the worksheet outside the chart (to deselect the chart).
• Click the Office Button, then Print I, then Print Preview again. A scaled-down version
of a whole page of output should appear. It gives some idea of what the printed version
will be like.
[Note that if you click on Print rather than on the I to its right, you will see the Print
dialogue box. In this case, click the Print Preview button in this box.]
F.H. King and C.H. Northeast 11/08 Excel 2007 (Session 1) Page 16
Using a Dialogue Box Launcher: Page Setup
It would be tidier if the material were centred on the page. To arrange this, and make
other changes in the way the worksheet is printed, Page Setup is used.
Note that on the Page Layout tab, the Page Setup group provides access to many commands
commonly used. However, more commands are available than can be accessed here, so this
time the Page Setup dialogue box will be used:
• Click Close Print Preview button to close the previewer.
• Click the Dialogue Box Launcher at the bottom right of the Page Setup group on
the Page Layout tab. A tab dialogue box appears. Ensure that the Page tab is selected;
click it if it is not.
• Check that the Paper size is correctly set to A4. Use the button and the drop-down
list to set this correctly if not.
• Select the Margins tab.
Under Center on page there are two options, each with a check box. You can centre the
worksheet Horizontally, Vertically, both or neither:
• Click Horizontally. A X appears in the check box.
By default, each page will be printed with no Header, no Footer and no Gridlines and it
is instructive to look at how the defaults may be overridden:
• Select the Header/Footer tab and click the lower button. The drop-down list offers
numerous possible footers.
• Next, click the upper button twice. The drop-down list offers numerous possible
headers.
• Select the Sheet tab. Under Print note that Gridlines can be shown if you wish.
• Click OK.
• Preview the result again: click the Office Button, then Print I then Print Preview.
Check that the previewed version is satisfactory and then close the previewer.
F.H. King and C.H. Northeast 11/08 Excel 2007 (Session 1) Page 17
Logging off
At the end of every session it is important to log off in the approved way. If you are
working through the course at a PWF machine, such as one of those in the Titan Teaching
Room:
• Click the Start button.
• Click Log Off.
• In the Log Off Windows dialogue box, click Log Off.
After a short wait, the screen returns to its idle state presenting the invitation to press:
Ctrl+Alt+Delete to Login
Now go back to the beginning of Session 1 and read the Objectives again and see whether
you remember how to do everything that is listed there.
F.H. King and C.H. Northeast 11/08 Excel 2007 (Session 1) Page 18
SESSION 2 Creating Simple Databases
Objectives
By the end of Session 2, students should
• know how to rename a sheet
• know how to print only part of a sheet
• know how to ensure that row and column headings are printed on every page
• know how to hide and unhide columns and rows
• have some familiarity with use of the Arrange Windows facility
• know how to customise the Quick Access Toolbar
• know how to let Excel 2007 select an entire list
• be able to cut, copy and paste cell contents
• be aware of the difference between the Paste and Paste Special commands
• be able to identify and use the Fill handle of a cell
• know the comparison operators and be able to use them
• be able to use the filter to show just those records which satisfy certain criteria
• be aware of the help provided by Excel 2007
Starting Again
• Log in as before.
• Wait for the Message-of-the-day window to appear and then close it.
• Start Excel 2007 as in the previous session.
The Excel 2007 window appears and, in the Title Bar, indicates the default name Book1
for the workbook.
F.H. King and C.H. Northeast 11/08 Excel 2007 (Session 2) Page 19
• Use Fill H Right to fill in cell C16.
• Sort the entries into alphabetical order of region.
• Insert a new column between columns B and C.
• Insert a new row between rows 1 and 2.
• Make some changes so that the table looks like this:
• Change the format of the cells in the whole of columns C and E to Percentage with 0
places after the decimal point.
• Enter the appropriate formula in cell C3 to express 450 as a percentage of the Total
applications (look back in the notes if you are not sure how to do this). Remember
that a $ prefix will be needed, because the next step is to. . .
• Use Fill H Down to fill in cells C4 to C15.
• Use the SUM function to fill in cell C17.
• Repeat the process for cells E3 to E15 and E17.
• Insert two new rows at the top.
• Key the heading APPLICATIONS AND ACCEPTANCES BY REGION into cell A1.
• Centre this new heading across columns A to E using Merge & Center.
• Preview the worksheet.
• Arrange for the table to be centred horizontally on the page.
• Save the worksheet with the new name Applications.xlsx
F.H. King and C.H. Northeast 11/08 Excel 2007 (Session 2) Page 20
APPLICATIONS AND ACCEPTANCES BY REGION
Closing a File
Close Applications.xlsx as follows:
• Click the Office Button.
• Click Close; the file Applications.xlsx disappears, but you are still in Excel 2007.
F.H. King and C.H. Northeast 11/08 Excel 2007 (Session 2) Page 21
• Click the Open button on the Quick Access Toolbar.
• Click Flat.xlsx and click Open. The familiar worksheet with the embedded chart should
reappear.
Naming a Sheet
Notice that the workbook contains (probably) three sheets. Change the name of Sheet1. . .
• On the Home tab, in the Cells group, click Format and choose Rename Sheet; the name
Sheet1 becomes highlighted.
• Key in the new name Flat data.
• Click anywhere in the worksheet to confirm the new name.
Insert Function
Insert Function offers an alternative way of supplying arguments to a function. To illustrate
its use, the formula that shows that the total area is 40 sq. m. will be keyed in afresh. The
relevant cell should be C10:
• Check that cell C10 contains the value 40. Make this the active cell and press the
Delete-key to clear the cell. In the absence of the value 40, all the percentages become
corrupted. Check that cell C10 is still the active cell.
• Click Insert Function (marked fx next to the Formula Bar).
Two things happen: = appears in the Formula Bar (this equals-sign indicates that a
formula will be inserted), and the Insert Function dialogue box appears. The top section
invites you to Search for a function or select a category; note that the category given is
Most Recently Used, and below you are invited to Select a function from a list. SUM is
highlighted.
• Check that SUM is selected and click OK. The Function Arguments dialogue box
appears.
You will see (look in the Formula Bar as well as in the dialogue box) that Excel 2007 has
guessed that the range of cells whose values are to be summed is C4:C9. This is a pretty
good guess but you should change it to the correct range C4:C8 thus:
F.H. King and C.H. Northeast 11/08 Excel 2007 (Session 2) Page 22
• Drag from cell C4 to cell C8 and notice that the range is highlighted by a dashed
border. The range C4:C8 appears in the Number1 box, in the Formula Bar and in
cell C10.
• Click OK to signify that you have finished with Function Arguments. The 40 and the
percentages reappear.
There is an easier way of doing all this. . .
AutoSum
There is an AutoSum button on the Home tab in the Editing group, and on the Formulas
tab in the Function Library group, and in both places it is marked with a Σ-sign. Before
using it. . .
• Check that cell C10 is still the active cell and clear it again.
• Click AutoSum.
The AutoSum feature instantly provides the formula =SUM(C4:C9) and highlights the
range C4:C9 with a moving border. As before, this is a pretty good guess. To obtain
exactly what you want. . .
• Drag from cell C4 to cell C8. This range is then highlighted and C4:C8 appears in the
Formula bar and in cell C10.
• Click the Enter button to complete the process.
A New Workbook
This concludes the experiments with the Flat.xlsx workbook. Open a new workbook as
follows:
• Click the Office Button. and then choose New.
• In the New Workbook dialogue box, click Create. A new workbook, with the provisional
title Book2, appears but the old one is still present. . .
• On the View tab, in the Window group, click Arrange All. Check that the Arrange
Windows option box has Tiled selected and click OK.
The new workbook and Flat.xlsx appear side by side. This would be useful if you wished
to copy information from one workbook to another but is not useful now. The Flat.xlsx
workbook should have been closed before you asked for a new workbook. Close it now:
• Click anywhere in the Flat.xlsx window to select that workbook.
• Click the Close button in the Title Bar of the Flat.xlsx window (not the Excel
window) to close that window. Because you have been experimenting with Flat.xlsx,
Excel 2007 assumes that you have changed the workbook. You do not need to save
the changes, so click No to saving changes. The workbook disappears.
• Click the Maximise button on the Book2 window to make it fill the available
space.
In future, it will normally be sensible to close one workbook before choosing the New
command.
F.H. King and C.H. Northeast 11/08 Excel 2007 (Session 2) Page 23
An Excel 2007 List
Imagine five candidates have taken an examination paper. The paper consisted of three
essay questions and each candidate was required to attempt two of the questions. These
questions were each marked out of 5. The examiners set up the following worksheet:
Name Q1 Q2 Q3
Ann 3 1
Bob 4 4
Cyn 0 3
Dan 2 4
Eve 3 4
• Copy the entries in the examiners’ spreadsheet into the range A1:D6.
• Make the headings bold and right-align the three headings that relate to question
numbers.
You have set up an Excel 2007 list. Remember that a list is a labelled series of rows that
contain similar data.
In database terminology, each row apart from the heading row is called a record. Each
record consists of a number of fields and the column labels in the first row are field names.
AutoFill
• Make E1 the active cell and key in a fifth heading, Total. Right-align this entry.
• Make E2 the active cell and click the AutoSum button. This should automatically
enter the required formula =SUM(B2:D2) into cell E2.
• Click the Enter button to complete the process.
This gives Ann’s total and, clearly, you could use the Fill H Down facility to complete the
Total column. There is a quicker way:
• Check that E2 is still the active cell complete with its emphasised border indicating
selection. Notice the little black square at the bottom right-hand corner of the border.
This is the Fill handle.
• Point to the Fill handle and notice that the pointer changes to a +-sign.
• Drag the Fill handle downwards to cell E6 and release the mouse button. This is the
standard shortcut way of filling and is known as AutoFill.
F.H. King and C.H. Northeast 11/08 Excel 2007 (Session 2) Page 24
Cut and Paste, Copy and Paste
A sixth and final heading will be used to illustrate how data can be moved and copied:
• Make F1 the active cell and key in a sixth heading, Result. Right-align this entry. The
entry will now be cut, copied and pasted.
• Ensure that cell F1 is still the active cell. On the Home tab, in the Clipboard group,
click Cut. The highlighting changes to a moving border.
• Make H3 the active cell and click Paste (Home tab, Clipboard group). The entry is cut
from cell F1 and pasted to cell H3 and is thereby moved from one cell to another.
• Check that H3 is still the active cell and use Copy and Paste to copy and paste the
entry to cell G6. A moving border persists round cell H3 to indicate that you could
copy again if you wished.
• Check that G6 is the active cell and point to anywhere on its border except the Fill
handle. The pointer should appear as a four-headed arrow. With the pointer as this
four-headed arrow. . .
• Drag the border to cell F1. This is the quickest way of moving.
• Make H3 the active cell and point to its border. This time hold down the Ctrl-key and
drag the copy of the border to cell H6. This is the quickest way of copying.
The heading Result should now be both where you want it in cell F1 and in two places
where you don’t want it in column H. There are several ways to clear the two entries you
don’t want.
You could select each entry in turn and press Delete or you could select the whole column
and press Delete. Try a third way. . .
• Drag from one entry to the other, thereby selecting both cells as well as everything in
between. Keep the pointer in the selected range and. . .
• Click the right-hand mouse button. A pop-up menu appears.
• Choose Clear Contents. The unwanted entries disappear.
The IF Function
Each entry in the Result column is going to be Pass or Fail and a Total of 6 is deemed to
be the pass mark.
• Make F2 the active cell. Key in = (to indicate a formula) and click the Insert Function
button fx . Select the IF function from the list.
You are told that the general form of the IF function is:
IF(logical test,value if true,value if false)
The IF function takes three arguments and the first is some logical test. The outcome of a
logical test is always true or false. In the present case the test will be to see whether the
total mark is greater than or equal to 6.
F.H. King and C.H. Northeast 11/08 Excel 2007 (Session 2) Page 25
If the outcome is true then Pass will be appropriate. If the outcome is false then Fail will
be appropriate:
• Click OK; the Function Arguments dialogue box appears.
• Into the Logical test box, key in E2>=6 as the first argument. The item >= stands for
‘is greater than or equal to’.
You could now click in the Value if true box ready to key in Pass as the second argument
but there is an easier way to go from one box to the next:
• Press TAB (the key with two arrows on it next to the Q-key). The insertion point
jumps to the Value if true box where you. . .
• Key in Pass as the second argument.
• Press TAB so that the insertion point jumps to the Value if false box. Key in Fail as
the third argument. Press TAB again. Note that Pass and Fail appear in quotation
marks. This is to indicate that these are text items.
• Click OK to finish with Function Arguments.
Notice that the formula in cell F2 (look at the Formula Bar) is IF(E2>=6,"Pass","Fail")
and you could have keyed this in directly without using Insert Function (although it would,
of course, have been necessary to type the equals-sign first to indicate that this is a formula
rather than plain text).
Since Ann’s total is not greater than or equal to 6 the Value if false applies and Fail appears
in cell F2:
• Check that F2 is still the active cell and drag the Fill handle down to cell F6 so as to
complete the Result column. There should be two Fail entries and three Pass entries.
• Right-align all the entries in the Result column.
• Click on the Quick Access Toolbar to update the file.
F.H. King and C.H. Northeast 11/08 Excel 2007 (Session 2) Page 26
• Click OK and make C4 (an arbitrary cell in the list) the active cell.
• Click Filter again. By each column label a button appears. Each is ready to open
a drop-down list.
• Click the rightmost against the Result label. The drop-down list offers several
possibilities.
• In the lower part of the drop-down list, click (Select All) so that all the ticks disappear,
then click Pass and then OK. Only those records whose Result field is Pass remain.
The other records disappear. The row numbers may change colour and you may see
a thick horizontal line. These are indications that some records are hidden.
• Click the against the Total label. This time choose Number Filters I Custom Filter...
The Custom AutoFilter dialogue box allows you to specify just what Totals you will accept.
For example, you could specify that the total must be less than 8 or greater than 9 by
putting is less than and 8 in the upper two boxes, selecting the Or option button and
putting is greater than and 9 in the lower two boxes.
Suppose you just want Totals that are less than 8:
• Click the upper left-hand and notice the comparison operators in the drop-down
list. Select is less than.
• Click the upper right-hand and select 8 from the drop-down list.
• Click OK.
You are now left with only those records where the Result field is Pass and where the Total
field is less than 8.
• Click Filter (Data tab, Sort & Filter group) to see the whole list once more.
The buttons disappear, so to bring them back, and experiment further:
• Click Filter once more.
F.H. King and C.H. Northeast 11/08 Excel 2007 (Session 2) Page 27
the present list so that those who failed the examination were listed first, but in reverse
alphabetical order. Try this:
• Click any cell in the list.
• On the Data tab, in the Sort & Filter group, click Sort. Note that Excel 2007 has
automatically selected the whole list for you.
• Click the Sort by drop arrow and choose Result. Leave the Order as A to Z.
• Click Add Level so that a new level Then by appears.
• Click the Then by drop arrow and choose Name.
• Change the Order to Z to A.
• Click OK.
The list is sorted so that Cyn and Ann, who failed, are first, followed by Eve, Dan and Bob,
who passed.
F.H. King and C.H. Northeast 11/08 Excel 2007 (Session 2) Page 28
Hiding Rows and Columns
You can hide rows and columns too. For example:
• Click column label C to select it.
• On the Home tab, in the Cells group, click Format then Hide & Unhide I Hide Columns.
Now column C seems to have disappeared. As an exercise, try hiding row 5 in the same
way.
Keyboard shortcut to Close Print Preview: Esc key (top left of keyboard)
F.H. King and C.H. Northeast 11/08 Excel 2007 (Session 2) Page 29
RAND and INT; Recalculation of Values
Random numbers turn out to be useful in all kinds of circumstances, particularly games-
playing applications.
Before embarking on an example, you will need a new workbook:
• Use the New command to open a new workbook.
• Check that A1 is the active cell and key the formula =RAND() into this cell. Click
the Enter button to complete the process.
The RAND function takes no arguments but still needs the pair of brackets. The result is
some random number between zero and one.
The F9-key in the top row of keys on the keyboard is used to recalculate the values on
a worksheet. Normally this makes no difference but with RAND() in a formula you get a
new random number:
• Press the F9-key. Note that the value in cell A1 changes.
• Press the F9-key several more times.
Suppose you want to simulate a die which can land with any of the numbers 1 to 6
uppermost. You must modify the range of possible values in cell A1:
• Check that cell A1 is still selected. Notice =RAND() in the Formula Bar and. . .
• Click in the formula between = and R and check that the insertion point is between
these two characters. Key in 6* so the formula is now =6*RAND().
• Click the Enter button to complete the process. Press the F9-key several times and
notice that the value in cell A1 is now in the range 0 to 6 (but it can never quite
reach 6).
To force the value to be an integer (whole number), you will need to use the INT function.
This function does require an argument. The argument must be some numerical value
and INT will round it down to the nearest whole number below. Thus INT(2.78) is 2 (and
not 3).
The formula =INT(6*RAND()) always results in a number in the range 0 to 5. The formula
=INT(6*RAND())+1 always results in a number in the range 1 to 6:
• Check that cell A1 is still selected. Notice =6*RAND() in the Formula Bar and. . .
• Change the formula to read =INT(6*RAND())+1 and be careful with the brackets.
• Click the Enter button to complete the process. Press the F9-key several times and
notice that the value in cell A1 is now always a whole number in the range 1 to 6 and
simulates the throwing of a die.
• Use the Fill handle on cell A1 and drag it rightwards to cell D1. You now see four
random numbers each in the range 1 to 6.
• Check that the range A1:D1 is still selected (select it if not) and drag the Fill handle
of the whole range downwards to cell D10.
You should now see 40 numbers each in the range 1 to 6. Each time you press the F9-key
all 40 values are recalculated. They are also recalculated every time you make any changes
to the worksheet:
F.H. King and C.H. Northeast 11/08 Excel 2007 (Session 2) Page 30
• Make G1 the active cell and key in 57. Keep an eye on the 40 numbers in the range
A1:D10 and click the Enter button. This completes the entry of 57 into cell G1 and
the 40 values are recalculated as a side-effect.
Paste Special
If you want 40 values that don’t keep changing you can use the Paste Special command:
• Drag diagonally from cell A1 to cell D10 to select the whole range A1:D10.
• On the Home tab, in the Clipboard group, click Copy; a moving border will appear
round the block of cells.
• Make G1 the active cell.
• On the Home tab, in the Clipboard group, click the drop arrow H below Paste and
choose Paste Special... from the drop-down list.
The Paste Special dialogue box offers various possibilities. For example, if the Formulas
option button is selected the 40 formulae will be copied. This is not what you want because
these formulae would keep being recalculated. What you want is to copy the 40 values not
the 40 formulae that gave rise to those values, so. . .
• Click the Values option button.
The Operation option buttons allow you to specify whether the values simply overwrite the
cells in the new locations or, for example, whether they are added to the contents (if there
are any):
• Click the Add option button and click OK.
The range A1:D10 is copied to the range G1:J10 (note that the top left-hand corner of
a range is the reference corner when copying) and, since the Add option was chosen, the
value in cell G1 is 57 more than what was in cell A1. Assuming all other cells in the range
G1:J10 were blank, the Add option has no effect anywhere else.
As soon as you clicked OK the 40 original values were all recalculated but. . .
• Press the F9-key several times and note that although the left-hand set of 40 values
keep being recalculated, the right-hand set remain unchanged.
Getting Help
For help with Excel 2007,
• Press the F1 key near the top left of the keyboard. The Excel Help window appears.
Notice, at the top, the Search box.
• Click in this box. You can type more or less anything sensible, so key in the word
Paste, and then press the RETURN key to confirm. A list of relevant articles appears.
• Click Paste Special when copying from Excel and then read the information given.
You can be more wordy in your search if you wish. For example, you could type Please
would you tell me how to check my spelling? in the Search box. Try some experiments.
• Finally, click to close the Excel Help window.
F.H. King and C.H. Northeast 11/08 Excel 2007 (Session 2) Page 31
• Click Yes to confirm that you want the changes saved; a Save As dialogue box appears.
The entry in the File name box is highlighted ready to be overwritten.
• Key in the name Dice and click Save.
The workbook is now saved and you leave Excel 2007.
Logging off
• Click the Start button.
• Click Log Off.
• In the Log Off Windows dialogue box, click Log Off.
Now go back to the beginning of Session 2 and read the Objectives again, and then go
through the exercise.
F.H. King and C.H. Northeast 11/08 Excel 2007 (Session 2) Page 32
Exercise: A Database of Bells
Town or village
County
Dedication of the church
Number of bells in the tower
Weight of the heaviest bell (called ‘the tenor’) in cwt
Day of the week on which bell-ringing practices are held
Date on which the tower was first visited
Notes
Change the width of columns A and B so that all the material can be seen.
Try out the Freeze Panes facility so that you can look at all the rows in turn (with Page
Down) while leaving the column headings in place). Unfreeze Panes when you have finished
experimenting.
Now try each of the following in turn. Hint: before sorting, or using the filter, let Excel 2007
select the range of cells automatically by selecting just one cell, not a column or group of
cells (this was described in the Filter and More About Sorting sections).
• Sort the records by alphabetical order of dedication (remember that you should first
select just one cell, not a column of cells).
• Sort by alphabetical order of county, then by descending order of number of bells, and
then by descending weight of the tenor.
• Display only the towers that are in Cornwall, sorted by descending order of the weight
of the tenor.
• Display only the towers that are in Cambridgeshire and whose practice night is
Tuesday and whose tenor weighs less than 12 cwt.
• Display only the towers that are in Cornwall but do not have 8 bells.
• Display only the towers that were visited in 1995 and 1996, in date order (the list
should begin with Bottisham and end with Lelant).
• Change the appearance of the dates so that they are in the form 09 January 2005
rather than 09/01/05. Hint: select the column and use Format Cells... (Home tab,
Cells group). Excel 2007 should automatically make the column wider, but if the result
is a set of hashes ##### that means that the date is too wide to fit in the cell and
it is necessary to change the column width so that the whole entry can be seen.
• Display only the records where the second letter of the place name is e (Penzance,
Zennor, Beer etc). Hint: look at the instructions at the foot of the Custom AutoFilter
dialogue box.
F.H. King and C.H. Northeast 11/08 Excel 2007 (Session 2) Page 33
SESSION 3 More about Charting
Objectives
By the end of Session 3, students should
• understand the difference between Workbooks, Worksheets and Chart sheets
• be able to identify the various parts of a chart, including the Data Series, Markers,
the Legend, the Plot Area, the Axes, Tick Marks, Gridlines, the Chart Title, Axis
Titles, Axis Labels
• know how to select these items and make changes to them
• know how to change the chart type
Starting Again
• Log in as before.
• Close the Message-of-the-day window.
• Start Excel 2007 as in the previous session.
A Linear Series
Open the file Greenfly.xlsx This contains some data about the number of greenfly there
might be after 28 days, starting with a single mature female that produces (asexually) eight
offspring each day, all of whom survive and each of whom starts reproducing on day 8 of
its life. Thus, at the start of Day 1 there is 1 greenfly, and at the end of Day 28 there are
1 161 889.
The task here is to produce a chart, but the first illustration in this session shows a quick
way of putting the values 0 to 28 into cells A2 to A30. Such a sequence is referred to by
Excel 2007 as a Series. Since the values increase at a uniform rate, this is a linear series.
• Make A2 (which should contain 0) the active cell.
• On the Home tab, in the Editing group, click Fill and then choose Series... from the
drop-down list.
The Series dialogue box offers several options but it is simple to see what is required. The
series is to be arranged in a column, it is linear and it increases by one at each step until
it reaches a final value of 10. Some options are correct by default:
• Click the Columns option button under the heading Series in.
• Check that Linear is selected under Type by default.
• Check that the Step value is 1 by default.
• Click in the Stop value box and key in 28.
• Click OK. The values 0 to 28 should appear in the first column.
If the values appear in the first row you forgot to click the Columns option button.
A Graph
The information can be plotted on a graph as follows:
• Select the range A1:B30 (include the headings).
F.H. King and C.H. Northeast 11/08 Excel 2007 (Session 3) Page 34
• On the Insert tab, in the Charts group, click the dialogue box launcher .
• The Insert Chart dialogue box offers numerous chart types with several chart sub-types
for each. You might suppose that Line would be appropriate, so select this from the
list of types on the left. The fourth chart sub-type is probably selected by default.
• Click OK and the chart appears in the worksheet.
The chart reveals several problems. For example:
1. The vertical scale has to accommodate values up to 1 161 889 even though the majority
of the values plotted are less than a tenth of this maximum. The left-hand half of the
plot is not very useful. A logarithmic scale would be better and this will be attended
to later.
2. The numbers against the horizontal axis are not very sensible. Since the series runs
from 0 to 28 it would be better if the labels reflected that.
3. There may be a Day line as well as a Total line.
F.H. King and C.H. Northeast 11/08 Excel 2007 (Session 3) Page 35
Each axis can have an Axis Title (neither has a title at the moment) and the Chart Title is
at the top (Excel 2007 has guessed at a suitable title, which is wrong but will be corrected
later). Both axes also carry labels (the values 0 to 30 and 0 to 1400000).
The horizontal axis has obvious tick marks, little lines that dangle down from the axis
near the labels. The vertical axis also has tick marks which stick out to the left of the
axis. It also has gridlines which run across the full width of the Plot Area. The major
gridlines are associated with the labels 200000, 400000 and so on. It is possible to have
minor gridlines too which indicate sub-divisions.
A chart can also have a legend.
• Move the pointer to the various items in the chart and notice that, after a one-second
wait, an advisory notice appears close to the pointer. The notice usually indicates
what the item is. When you point at a marker on the data series the notice even gives
the value at that point.
• Next, (single-)click on the various items in the chart. In most cases this action selects
the item and it is highlighted in some obvious way. Try selecting the main title, the
legend and the data series in turn.
• Notice that Chart Tools appears in the Title Bar. Click an arbitrary cell outside the
chart. This deselects the chart (all evidence of selection disappears) and Chart Tools
disappears, along with all the tabs on the Ribbon concerned with charting.
Various changes will be made to this chart. First the relevant part must be selected.
F.H. King and C.H. Northeast 11/08 Excel 2007 (Session 3) Page 36
• Click Format Selection.
• In the Format Axis dialogue box, change the Maximum to 28 and fix the Minimum at
0.
The labels on this axis are 0, 5, 10 and so on, but it would be more appropriate if they
were 0, 7, 14, 21 and 28, and if there were a minor tick mark for each day. So . . .
• Fix the Major units at 7.0.
• Fix the Minor units at 1.0.
• Change the Major tick mark type to Cross.
• Change the Minor tick mark type to Outside.
• Click Close to confirm the changes.
The markers may appear still to be present but this is an illusion. What you see is a
highlighting effect to show that the data series is still selected.
The Data Series line is probably blue. Change this to black:
• On the Design tab, in the Chart Styles group, click the left-most style.
F.H. King and C.H. Northeast 11/08 Excel 2007 (Session 3) Page 37
Formatting a Chart — Removing the Legend
• On the Layout tab, in the Labels group, click Legend and choose None from the drop-
down list.
F.H. King and C.H. Northeast 11/08 Excel 2007 (Session 3) Page 38
• Click Gradient fill.
• Choose a colour from the Preset colors drop-down list.
• When you have finished experimenting, click the No fill option button.
• Click Close.
Logging off
• Click the Start button.
• Click Log Off.
• In the Log Off Windows dialogue box, click Log Off.
Now go back to the beginning of Session 3 and read the Objectives again. After that, try
the exercises.
F.H. King and C.H. Northeast 11/08 Excel 2007 (Session 3) Page 39
Exercise: Producing a Chart
People who have attended courses on Word, Excel and PowerPoint have been asked to
describe their previous experience, and we wish to represent this information in a chart.
Open the file HowMuch.xlsx which contains the data. Now create a chart that looks like
the one shown on the next page. Note in particular:
• You will need to Switch Row/Column (Design tab, Data group) (do this after you have
inserted the chart in your workbook).
• The chart is not embedded in Sheet1 but is on a Chart1 sheet.
• The chart has a title.
• The vertical axis has a title.
• The legend is at the foot of the chart.
• The text of the titles on the two axes and in the legend should be changed to 12-point.
• There are no tick marks on the horizontal axis.
• There are no major gridlines.
• The chart has no border.
Save the finished workbook as HowMuch.xlsx again and then close it.
F.H. King and C.H. Northeast 11/08 Excel 2007 (Session 3) Page 40
F.H. King and C.H. Northeast 11/08
70
60
50
Number of students
40
30
Excel 2007 (Session 3) Page 41
20
10
0
Word Excel PowerPoint
The next step is to rank the candidates, so that the candidate with the highest total mark
is ranked 1 and the bottom candidate is ranked 26. To do this, the RANK function is used.
• Use the Help facility to find out about the RANK function.
• This time, instead of using Insert Function, simply key the RANK function into cell
D2. Try to work out what to key into this cell, or look at the end of this exercise for
a suggested answer.
• Fill in cells D3 to D27.
The next step is to place the candidates in Classes. The examiners have decided that 70%
and above (i.e. 280 marks) merits a Class I, 60% a Class II.1, 50% a Class II.2, 40% a
Class III. Candidates with fewer than 40% (i.e. 160 marks) are deemed to have failed.
This can be achieved by means of the IF function, which was introduced in Session 2.
Recall that this takes the form IF(logical test,value if true,value if false).
• First of all, to revise the IF function, assume that candidates must achieve 70% (280
marks) to pass the examination. Key into cell C2 a formula to work out whether the
candidate has passed or failed and then fill down. Look at Session 2 again if you have
forgotten the form of the formula. With the pass mark set at 70%, six candidates pass
the examination and the other 20 fail.
But how can we place the candidates into Class I, II.1, II.2, III and Fail? Here we need a
more complicated “nested IF” in the form
=IF(test for I ,”I”,IF(test for II.1 ,”II.1”,IF(test for II.2 . . . ,”Fail”))))
F.H. King and C.H. Northeast 11/08 Excel 2007 (Session 3) Page 42
i.e. once you have tested for a Class I, the value if false is replaced by another IF function
to test for a Class II.1 and so on down to Class III. The final value if false will be ”Fail”
and it is important to remember all the closing brackets.
• See whether you can work out how to amend the formula in cell C2 and then fill down.
If you have no idea about this, don’t worry – just look at the end of this exercise for
an answer and see whether you understand what is going on.
• Use the COUNTIF function to fill in cells E35 to E39. Use Excel 2007’s Help facility to
find out how to do this. If you are completely stuck, look at the end of this exercise
for the answer.
• Now fill in cells H35 to H39. Hint: see Session 1 if you have forgotten how to do this,
or look at the suggested answer below.
• Ensure that all numbers in the worksheet are presented as integers (whole numbers).
• It is time to reveal the names. Unhide Column B.
• Print out only cells B1 to I39 (use Print Preview first to check that the candidate
numbers will not be printed).
When finished, the table may look something like the one on the next page.
Suggested answers:
In cell D2: =RANK(E2,E$2:E$27) or =RANK(E2,E$2:E$27,0)
In C2: =IF(E2>=280,”I”,IF(E2>=240,”II.1”,IF(E2>=200,”II.2”,IF(E2>=160,”III”,”Fail”))))
In E35: =COUNTIF(C$2:C$27,”I”) and so on, or
In E35: =COUNTIF(C$2:C$27,D35) and fill down
In H35: =E35/E$29 (remember to format each cell as a percentage)
F.H. King and C.H. Northeast 11/08 Excel 2007 (Session 3) Page 43
Name Class Rank Total Paper 1 Paper 2 Paper 3 Paper 4
Mike I 1 374 92 93 95 94
Chris I 2 366 87 89 92 98
Gill I 3 303 76 74 75 78
Oliver I 3 303 76 76 74 77
Xanthe I 5 299 78 77 74 70
Ellen I 6 280 70 71 73 66
Victor II.1 7 277 68 70 70 69
Will II.1 8 267 69 66 70 62
Susie II.1 9 266 67 65 68 66
Queenie II.1 10 264 66 67 63 68
Philip II.1 11 260 63 68 65 64
Iris II.1 12 259 65 64 67 63
Ursula II.1 13 253 64 63 60 66
Kate II.1 14 241 58 62 64 57
Alan II.2 15 238 56 60 65 57
Lesley II.2 16 237 57 58 62 60
Hannah II.2 17 232 55 60 61 56
Zebedee II.2 18 228 55 59 60 54
David II.2 19 227 60 55 54 58
Robert II.2 20 226 56 57 58 55
James II.2 20 226 54 56 57 59
Thomas II.2 22 222 56 52 55 59
Nadine II.2 23 218 54 57 54 53
Yasmin III 24 198 49 51 50 48
Francis III 25 194 45 48 49 52
Brian Fail 26 137 35 32 37 33
Count 26 26 26 26 26
Minimum 137 35 32 37 33
Maximum 374 92 93 95 98
Average 254 63 64 64 63
F.H. King and C.H. Northeast 11/08 Excel 2007 (Session 3) Page 44
Revision Exercise: The Multiplication Table
Prepare an Excel 2007 worksheet to display the Multiplication Table up to 12 × 12 in the
following way:
• Key the number 1 into cell L1.
• Use Fill H Series to place 2 to 12 in cells B1 to L1 and A2 to A12.
• Key the numbers 2 to 12 into cells A2 to A12.
• Make columns A to L 6 characters wide.
• Make cell B2 the active cell and insert an appropriate formula. B1*A2 will give the
correct answer for cell B2, but what happens if you then select cells B2 to B12 and
choose the Fill H Down command? Some dollar signs are needed. The exercise here is
to decide on the formula for cell B2 only, such that when you select cells B2 to L12,
and then choose the Fill H Down and the Fill H Right commands, the correct answers
will be inserted.
• Insert a heading THE MULTIPLICATION TABLE and use Merge & Center to centre it.
The worksheet may look something like this:
1 2 3 4 5 6 7 8 9 10 11 12
2 4 6 8 10 12 14 16 18 20 22 24
3 6 9 12 15 18 21 24 27 30 33 36
4 8 12 16 20 24 28 32 36 40 44 48
5 10 15 20 25 30 35 40 45 50 55 60
6 12 18 24 30 36 42 48 54 60 66 72
7 14 21 28 35 42 49 56 63 70 77 84
8 16 24 32 40 48 56 64 72 80 88 96
9 18 27 36 45 54 63 72 81 90 99 108
10 20 30 40 50 60 70 80 90 100 110 120
11 22 33 44 55 66 77 88 99 110 121 132
12 24 36 48 60 72 84 96 108 120 132 144
F.H. King and C.H. Northeast 11/08 Excel 2007 (Session 3) Page 45