Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Excelnotes 07

Download as pdf or txt
Download as pdf or txt
You are on page 1of 45

SPREADSHEETS FOR BEGINNERS

USING MICROSOFT EXCEL 2007

Frank King and Christine Northeast


University of Cambridge Computer Laboratory (Teaching and Research)

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.

About this Course


This is a self-paced practical course, divided into three sessions. The first introduces the
most often-used features of Excel 2007, the second concentrates on the use of Excel 2007
as a database, and the third deals mainly with charting.
These notes assume that the reader is working through the course at a personal computer
in one of the Titan Teaching Rooms, using one of the PWF machines.
This is a course for beginners, although it is hoped that the reader knows about the
following (the Demonstrator will be pleased to provide help):
• Pointing (moving the mouse pointer)
• Dragging (keeping the left mouse button depressed while moving the mouse)
• Clicking (clicking the left mouse button)
• Double-clicking (clicking the left mouse button twice in quick succession)

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,

Keyboard shortcut to the Italic command: Ctrl+I

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

Logging in and starting Excel 2007


These notes assume that the reader is working through the course at a personal computer
in one of the Titan Teaching Rooms.
Follow these steps to get started, and please ask a Demonstrator if you need help.
There is no need to switch on the computer, even if the screen is blank.
• Press Ctrl+Alt+Delete to begin the logging in process (this means “press and hold
down the Ctrl and Alt keys, and, keeping them depressed, press and release the Delete
key. Finally, release the Ctrl and Alt keys”).
• Read the warning and then press the RETURN (or ENTER) key (the large key marked
with a bent left-pointing arrow) to confirm that you have read the warning.
• Type your Username.
• Click in the Password box and type the password that has been allocated to you.
• Click the OK button.

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.

Excel 2007 — Description of the Screen


You should learn to identify the following:
1. The Title Bar (at the top, blue, saying Book1 - Microsoft Excel)
2. The Office Button (large and round, at the left-hand end of the Title Bar)
3. The Quick Access Toolbar (next to the Office Button, with a picture of a floppy disk
(a shortcut to the Save command), a left-pointing arrow (a shortcut to the Undo
command) and a right-pointing arrow (a shortcut to the Redo command)
4. The Ribbon (a wide band that runs across the top below the Title Bar)
5. The Formula Bar (with the Name Box on the left, probably containing A1)

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

Confirming Cell Contents


When a cell is made active, by clicking it or by using the arrow keys, a side-effect is that the
contents of the previously active cell are confirmed. Thus the standard ways of confirming
the cell contents include using:
1. Clicking the Enter button (the one with the tick; the active cell remains the same).
2. Pressing the RETURN key (the cell below becomes the active cell).
3. Pressing any key that changes the active cell (such as an arrow key, or Page Up,
Page Down, Home and End).
4. Clicking another cell to make it active.

It is essential to confirm cell contents.

• Key in the three remaining pairs of entries.

Changing Cell Contents


The figure for the Bathroom was wrong; it was supposed to be 5 not 13:
• Make B2 (with 13 in it) the active cell and simply key in 5 which overwrites the 13.
• Click the Enter button (with the tick) to confirm.

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.

Deleting Cell Contents


Suppose that for some reason, you simply wish to clear the contents of cell A3, so that you
end up with an empty cell. The quickest way to do this is:
• With A3 still the active cell, press the Delete key.

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.

Inserting an Extra Row


Next you decide to partition the Dining/Living room into two separate rooms and would
like to replace the single pair of entries for D/L by two pairs:

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

Array Range — Filling Down


Up until now only one cell, the active cell, has been selected at a time. By dragging the
mouse, you can highlight an array range so that a group of cells is selected all at once.
Certain operations can be performed on the group taken as a whole:
• Drag the mouse from cell C1 to cell C6. This selects the range C1:C6 (as it would
normally be written). Check that a common border encloses the array of six cells
(although only cells C2 to C6 are shaded; cell C1 can be regarded as the ‘master’ cell).
• On the Home tab, in the Editing group, click Fill, then click Down. The formula in cell
C1 (the ‘master’ cell) is copied into the other selected cells (the shaded cells) but the
copying is far from naı̈ve. . .
• Make cell C2 the active cell and note, in the Formula Bar, that the formula in this cell
is now =10.76*B2. Check that the formula in cell C3 is now =10.76*B3 and so on.
Most, but not all, values are taken to two decimal places. This inconsistency makes the
new column a little untidy and will be attended to shortly.
The Fill H Down facility and a companion facility Fill H Right, which works on a horizontal
array of selected cells, are powerful features when setting up a spreadsheet.

Keyboard shortcut to the Fill Down command: Ctrl+D

Keyboard shortcut to the Fill Right command: Ctrl+R

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.

Another Way of Inserting a Row


The next task is to head the three columns with Area, Sq m and Sq ft respectively. First,
a blank line must be inserted and there is a different way of doing this from that used last
time:

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.

Changing to Bold Type


Change these headings to bold type as follows:
• Click the row label 1 to the left of Area to select the whole of row 1.
• On the Home tab, in the Font group, click B . This makes all three headings bold.

Keyboard shortcut to the Bold command: Ctrl+B

Changing the Alignment of Cell Contents


In Excel 2007 terminology, Horizontal Alignment is, by default, General. The contents of
cells are not placed consistently to the left or to the right but are arranged so that text
(names of rooms and headings and so on) is aligned at the left-hand sides of cells and
numbers are aligned at the right-hand sides.
This is usually what you want but Sq m and Sq ft head columns of numbers and it would
look better if these were right-aligned:
• Drag the mouse from cell B1 to cell C1 to select these two cells only.
• On the Home tab, in the Alignment group, click , or Align Text Right (look at the
ScreenTip). The two headings shift right.
The entries probably now look something like this:

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

The SUM Function


Next, incorporate some totals. First:
• Make cell A9 the active cell and key in Totals
Although in cell B9 you could now key in =B2+B3+B4+B5+B6+B7 as the formula to add
up the six areas in the second column, there is a better way. . .
• Make cell B9 the active cell and key in =SUM(B2:B7) and click the Enter button (with
the tick) to confirm.

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.

Percentages, Relative and Absolute References and the $ Prefix


Suppose you now wish to add a fourth column showing each of the six areas as a percentage
of the total.
• Make cell D2 the active cell.

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

A Main Heading: Inserting More than One Row


• Drag the mouse from row label 1 to row label 2 to select the whole of the first two
rows.

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

Adjusting the Column Width


• Click the column label B to select the square metre column.
• Click Format (Home tab, Cells group) and choose Column Width... The Column Width
dialogue box indicates the current column width. A possible value might be 8.43
[characters wide].
• Key in 15 to replace the 8.43 (or other value) and click OK.
The whole column gets much wider and the general appearance certainly hasn’t improved.
You could experiment with different widths but one useful option should be explored:
• Check that column B is still selected (click the column letter if not).
• Click Format (Home tab, Cells group) and choose AutoFit Column Width.
The AutoFit Column Width facility makes a column just a little wider than the widest entry.
Very often it is sensible to apply AutoFit Column Width to every column in use:
• Drag from column label A to column label D to select the whole of the first four
columns.
• Click Format (Home tab, Cells group) and choose AutoFit Column Width.
This doesn’t quite work as intended. Column A becomes enormously wide to accommodate
the heading in cell A1.
You could put matters right by selecting just column A and specifying a narrower width
but it is worth noting an alternative approach:
• Drag diagonally from cell A3 to cell D10. This selects all your entries except the top
heading.
• Click Format (Home tab, Cells group) and choose AutoFit Column Width.
With cell A1 excluded, the AutoFit Selection facility doesn’t take the width of the top
heading into account and the result is satisfactory.

The Merge & Center Command


The main heading in cell A1 would look better if it were centred across the four columns
you have used. Near the bottom right of the Alignment group (Home tab) there is the Merge
& Center command a (don’t confuse this with Center which centres the material only
within the selected cell).
• Drag from cell A1 to cell D1.

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.

Keyboard shortcut to the Save command: Ctrl+S

Sorting Lists of Data


Excel 2007 may be used to set up a simple database or list – the term is here used to
describe a labelled series of rows that contain similar data. The principal characteristics
of a list are that the first row contains column headings and each subsequent row contains
similar data. The range A3:D8 constitutes a list.
Once a list (or database) has been set up, numerous facilities are available for processing
and analysing the data.
One particularly useful facility is the ability to sort data easily. In the present case, two
obvious possibilities are to sort the items into alphabetical order or to sort them into size
order. Each will be tried in turn.
When the items are in alphabetical order, Bathroom will be listed first but it is essential
that the associated information (two areas and a percentage) is taken to the top too:
• Drag from cell A3 to cell D8. This selects the whole list including the column headings
but you don’t want to include the totals at the bottom.
• Click Sort & Filter (Home tab, Editing group) and choose Sort A to Z from the drop-
down list.

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.

Charting — Data Series and Categories


There are numerous facilities in Excel 2007 for preparing charts and graphs. To introduce
what is often called charting, the room area data will be presented as a Pie Chart with
one slice of pie for each of the five areas.
Charts can be created embedded in a worksheet or as a separate chart sheet. An embedded
chart will be created in this first example.
By default, charts are created from lists in which data series are arranged in columns. In
charting terminology, the values 14, 12, 6, 5 and 3 in column B constitute a data series
whose data series name is the column heading Sq m There are three data series in the
present example; each contains five values.
The items D/L, Bedroom, Kitchen and so on are category labels. On an ordinary graph,
these items would be written along the X-axis (horizontal axis) and each data series would
correspond to a separate line on the graph, perhaps identified by its data series name.
The first step in creating an embedded chart usually involves selecting an array range in
which the first row and first column are special. They contain the data series names and
the category labels respectively.
The numerical values that are to be represented graphically will be below the first row and
to the right of the first column:
• Drag from cell A3 to cell B8 (not to cell D8).
This selection means that the Sq m data series will be the only one considered (the other
two are directly related to this anyway).
Now, for the first time, the Insert tab on the Ribbon will be used.
• Click the Insert tab on the Ribbon; a new set of commands comes to the fore.
• On the Insert tab, in the Charts group, click Pie. You are offered several different chart
sub-types. Click the first one.
The chart appears in the worksheet and three new tabs appear in the Ribbon (the Design
tab is probably on top at the moment). The chart should incorporate a pie chart which
has five coloured slices and, on the right, a legend showing which colour relates to which
category label.
Notice that the chart has a thick border: this indicates that the chart is selected. . .

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

Making Changes to the Chart


Excel 2007 has decided that Sq m is a suitable title but this is not actually appropriate,
and needs to be changed as follows:
• Click Sq m so that the chart title now appears in a box of its own: just this part of
the chart is selected.
• Click in this box and type MY LOVELY NEW FLAT (notice this appearing in the
Formula Bar as you type)
• Click the Enter button to confirm the change.
Excel 2007 has provisionally chosen not to have any data labels. The next step will be to
arrange for percentages to appear.
• On the Layout tab, in the Labels group, click Data Labels; a number of different options
appear.
• Choose Outside End; the labels are as in the Sq m column.
Now change these to percentages:
• On the Layout tab, in the Labels group, click Data Labels.
• Choose More Data Label Options... so that the Format Data Labels dialogue box
appears.
• Click Value so that there is no longer a tick in that box.
• Choose the Outside End option as the Label Position.
• Click Percentage and then Close; the labels change to percentages.

Changing the Size of the Chart


The outermost boundary of the chart has eight handles, four at the corners and four in the
middles of the sides. These handles indicate that the chart is selected. A selected chart
can be deleted by pressing the Delete-key. If your chart is completely wrong, delete it and
start again.
The handles on the chart boundary can be dragged so that the edges and corners can be
moved:
• Click a cell in the worksheet outside the chart. The handles disappear as the chart
ceases to be selected and the newly active cell is selected instead.
• Click just inside the chart. The chart is again selected.
• Point at a handle and notice how the pointer becomes a double-headed arrow.
• Drag the different handles in turn so that the border exactly fills all the cells in the
range E13 to J26.

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.

A Shortcut: Save on the Quick Access Toolbar


It is some time since you last saved your work but rather than clicking the Office Button
and choosing Save you can use on the Quick Access Toolbar. Point at it and check
that the ScreenTip says Save before you. . .
• Click on the Quick Access Toolbar.

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

Keyboard shortcut to the Print dialogue box: Ctrl+P

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.

Now look at the Print dialogue box:


• Click the Office Button then Print. A dialogue box appears giving details such as the
make of printer.
• There is no need to print this, so after looking at this dialogue box, click Cancel.

Leaving Excel 2007


• Click the Office Button and then choose Exit Excel. Excel 2007 asks whether you want
to save the changes that you have made since you last used the Save command or
clicked on the Quick Access Toolbar.
• Click Yes to confirm that you want the changes saved. This will update the Flat.xlsx
file.

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.

Opening an Existing File


Open the file Regions.xlsx as follows (this file is on your filespace if you have been allocated
a “C number” on a course):
• Click the Office Button.
• Click Open; the Open dialogue box appears.
• Click Regions.xlsx and then Open.

Keyboard shortcut to the Open command: Ctrl+O

Revision Exercise: A Simple Table


• Delete the row containing RUBBISH.
• Change the width of column A so that all the entries can be seen.
• Change london to London and South WWWest to South West.
• Use the SUM function to fill in cell B16.

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:

Region Applied Applied Accepted Accepted


(No.) (%) (No.) (%)
East Anglia 450 111
East Midlands 582 179
Greater London 1564 466
North 338 118
North West 825 282
Northern Ireland 192 59
Other South East 2604 836
Outside UK 1201 168
Scotland 260 63
South West 685 195
Wales 286 93
West Midlands 644 215
Yorkshire & Humberside 646 230

Total 10277 3015

• 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

The table should now look something like this:

F.H. King and C.H. Northeast 11/08 Excel 2007 (Session 2) Page 20
APPLICATIONS AND ACCEPTANCES BY REGION

Region Applied Applied Accepted Accepted


(No.) (%) (No.) (%)
East Anglia 450 4% 111 4%
East Midlands 582 6% 179 6%
Greater London 1564 15% 466 15%
North 338 3% 118 4%
North West 825 8% 282 9%
Northern Ireland 192 2% 59 2%
Other South East 2604 25% 836 28%
Outside UK 1201 12% 168 6%
Scotland 260 3% 63 2%
South West 685 7% 195 6%
Wales 286 3% 93 3%
West Midlands 644 6% 215 7%
Yorkshire & Humberside 646 6% 230 8%

Total 10277 100% 3015 100%

Customising the Quick Access Toolbar


At present, the Quick Access Toolbar contains just three useful commands: shortcuts to
Save, Undo and Redo, but you can add further commands if you wish. As Print Preview
will be used frequently, it seems sensible to add this one to the Quick Access Toolbar. To
do this:
• Click H immediately to the right of the Quick Access Toolbar. A drop-down list of
commonly-used commands appears. Notice that Save, Undo and Redo all have ticks
against them, to show that they are at present on the Quick Access Toolbar.
• Click Print Preview so that the drop-down list disappears, but Print Preview appears
on the Quick Access Toolbar (point at it and the ScreenTip will confirm that it is
Print Preview).
• Click Print Preview on the Quick Access Toolbar to try it out.
• Close the previewer as before.
• Now add the Open command to the Quick Access Toolbar.

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.

Opening Another Existing File


The Flat.xlsx workbook will be used next and it must first be opened. The Open shortcut
should be on your Quick Access Toolbar. Check that the ScreenTip says Open before
you. . .

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.

Setting the Print Area


Sometimes you will wish to print only a part of a worksheet. First preview the whole
sheet. . .
• Use the Print Preview button on the Quick Access Toolbar; the whole of the Flat data
sheet is displayed.
• Click Close Print Preview to remove the previewer.
Now suppose that you wish to print only the range B3:E8. Set the print area as follows. . .
• Select the range B3:E8.
• On the Page Layout tab, in the Page Setup group, click Print Area H Set Print Area.
• Preview again to see the effect of this, remembering to click Close Print Preview when
you have finished.

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.

Keyboard shortcut to the New command: Ctrl+N

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.

Saving the List


Save this new workbook using the Save button on the Quick Access Toolbar. Check
that the ScreenTip says Save before you. . .
• Click the button. The Save As dialogue box appears.
• Key in the name Exam and click Save.
The workbook is now saved and Exam.xlsx displaces Book2 in the Title Bar.

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.

Keyboard shortcuts to Cut, Copy and Paste: Ctrl+X, Ctrl+C, Ctrl+V

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.

The Comparison Operators


The item >= is just one of six comparison operators. The full list, together with their
meanings, is:
= is equal to >= is greater than or equal to
> is greater than <= is less than or equal to
< is less than <> is not equal to

Using the Filter


Even with the extra two columns, you have a very small Excel list. Nevertheless it is large
enough to illustrate some facilities. For example, you can select, or filter out, records that
satisfy certain criteria.
Suppose you wish to select just those records where the Result field is Pass. You will use
the Filter command but first the list has to be selected. To see what this means, it is useful
to make a deliberate false start:
• Make H3 the active cell. This is well clear of the list and will lead to a problem.
• On the Data tab, in the Sort & Filter group, click Filter. Excel 2007 complains, and
explains what to do: Select a single cell within the range and try the command again.

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.

More Ambitious Criteria


Suppose you wish to select only those candidates whose name ends in n and who attempted
Question 1:
• Click the against the Name column label and select Text Filters I Custom Filter....
The upper left-hand box in the dialogue box should have equals in it. Leave this alone.
• Check that the insertion point is in the upper right-hand box. Key in *n and note
(see the bottom of the dialogue box) that an * stands for any series of characters.
Accordingly, *n stands for ‘any series of characters followed by n’.
• Click OK. Only Ann, Cyn and Dan satisfy this criterion.
• Click the covering the Q1 column label and deselect (Blanks), then click OK. This
causes Cyn to disappear (she didn’t attempt Question 1).
• Click Filter again. The buttons disappear.

More About Sorting


Simple sorting was introduced in Session 1. Now suppose that we wish to have more
than one level in our sort. For example, for some strange reason we might wish to sort

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.

The Freeze Panes Facility


• Close Exam.xlsx and save the latest changes.
• Open the file Large.xlsx
Large.xlsx contains more rows and columns than can be seen on the screen at once.
• Press the Page Down key once and notice that although the last few entries are shown,
the headings are not.
• Repeatedly tap the →-key to try to select a cell that is off the right-hand side of the
window (remember from Session 1 that when you try to move the active cell into a
column that is off the right-hand side of the window, more columns appear at the
right, and left-hand columns disappear, so you will need to press the →-key several
times). The number of times you need to press the key will depend on the size of your
window.
Now the Notes are visible, but not the Place to which they refer. This is somewhat
unsatisfactory.
The Freeze Panes facility is useful particularly if you are using a large worksheet and wish
to look at two columns or rows that are not normally adjacent. Try this:
• Press Ctrl-Home to make A1 the active cell.
• Make B2 the active cell.
• On the View tab, in the Window group, click Freeze Panes then choose Freeze Panes
from the drop-down list.
• Press the Page Down key once and notice that now the last few entries are visible and
the headings Place, County etc.
• Tap the →-key repeatedly until the Place and Practice night columns appear to be
adjacent.
When you have tried out this facility, turn it off again:
• On the View tab, in the Window group, click Freeze Panes then choose Unfreeze Panes
from the drop-down list.

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.

Unhiding Rows and Columns


Now unhide column C:
• Select columns B and D.
• Click Format (Home tab, Cells group) then Hide & Unhide I Unhide Columns.

Now unhide row 5 in a similar way.


Note that the rectangle to the left of the column labels can be used to select the entire
worksheet.

Printing a Large Worksheet


• Click the Print Preview button on the Quick Access Toolbar. Near the foot of the
window, on the left-hand side, the information Page 1 of 8 appears.
• Press the Page Down key repeatedly to check the appearance of the subsequent pages.
Again, the headings Place, County etc. appear only once.
• Click Close Print Preview in the previewer.
• On the Page Layout tab, in the Page Setup group, click Print Titles. The Page Setup
tab dialogue box appears.
• If necessary, click the Sheet tab to bring that to the fore.
• To ensure that Place, County etc. are repeated on every page, click in the Rows to
repeat at top box and type $1:$1. Note that a range must be specified, even though
here only one row is to be repeated, and that the $-signs are essential.
• Click the Print Preview button in the dialogue box, and then use the Page Down and
Page Up keys to check that this has worked.
• Click Close Print Preview in the previewer.
As an exercise, arrange for the name of the Place to appear on each page and preview the
text.

Keyboard shortcut to Close Print Preview: Esc key (top left of keyboard)

Finally, close Large.xlsx and save the changes.

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.

Leaving Excel 2007


• Click the Office Button and then choose Exit Excel.

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

Open the file Bells.xlsx


This contains information about some towers, each of which has a ring 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.

Changing the Chart Type


The numbers on the horizontal axis are wrong, indicating that the wrong chart type (Line)
was chosen, but this can be put right now. Although you could use Change Chart Type
(Design tab, Type group), then, in the Change Chart Type dialogue box, click X Y (Scatter),
it would be better at this stage to start again.
• With the chart selected, press the Delete key.
• Select the range A1:B30.
• On the Insert tab, in the Charts group, click the dialogue box launcher .
• In the Insert Chart dialogue box, choose X Y (Scatter) from the list on the left, and
then the fourth sub-type.
• Click OK and a more appropriate chart appears in the worksheet.
• Use the drag handles on the chart border to make the chart exactly fill the region
A32:H46.
X Y (Scatter) is used when one set of values is plotted against another (here Day and Total).
This chart will be improved in several ways but first save the worksheet. . .
• Click the Save button on the Quick Access Toolbar.

Chart Items — Terminology


The different parts of a chart are referred to as chart items and it is useful to rehearse
some of the terminology before looking at a few of the many facilities for formatting and
editing charts.
The three most important chart items are the horizontal and vertical axes and the line of
the plot. The line is formally called a data series and note that this has a marker (perhaps
a diamond-shaped blob) at each point.
The two axes form the left-hand and lower boundaries of the Plot Area, the central region
of the chart. The Plot Area lies within the Chart Area which is delimited by the outermost
boundary of the chart.

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.

Formatting a Chart – The Vertical Axis


With the chart selected, ensure that the Format tab on the Ribbon is to the fore. At the
left-hand end, in the Current Selection group, notice the drop arrow H , probably indicating
that the Chart Area is selected at the moment.
• Click H and choose Vertical (Value) Axis and notice that the axis and its labels are
now highlighted (selected).
• Click Format Selection (Format tab, Current Selection group) and the Format Axis
dialogue box appears.
• Click the Logarithmic scale check box so that a tick appears. The scale on the chart
changes immediately to the more appropriate logarithmic scale.
Now change the maximum on the vertical axis:
• Click Fixed next to Maximum and change 1.4E6 to 1000000 (i.e. one million).
Now remove the tick marks from the vertical axis:
• Change Major tick mark type to None.
• Click Close to confirm the changes.

Formatting a Chart – The Horizontal Axis


The horizontal axis runs from 0 to 30, but in the present example, 0 to 28 would be more
appropriate.
• First, select the horizontal axis: in the Current Selection group (Format tab), choose
Horizontal (Value) Axis.

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.

Formatting a Chart – Changes to a Data Series


The next step is to format the data series to remove the markers:
• Select Series ”Total”. Notice that large blobs appear on all the markers to indicate
that the data series has been selected.
• Click Format Selection.
• In the Format Data Series dialogue box, choose Marker Options from the list on the
left.
• Choose None for the Marker Type.
• Choose Line Style from the list on the left. Various styles of line appear. Click Dash
type H and see from the drop-down list that you could select long dashes or short
dashes and so on. The default solid line seems a good choice so click the next to
Dash type again to get rid of the drop-down list.
• Click Close.

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.

Formatting a Chart — Changes to the Chart Area


At present the Chart Area has a border. Check this by previewing the chart or worksheet.
Now remove the border as follows:
• Select the Chart Area.
• Click Format Selection.
• In the Format Chart Area dialogue box, change the Border Color to No line.
• Click Close.
• Click in a cell outside the chart and then preview the worksheet to see that the border
has disappeared.

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.

Formatting a Chart — Changing the Chart Title


Change the chart title to something more appropriate:
• Click on the chart title Total to select it and type AN EXPLOSION OF GREENFLY
and notice that this appears in the Formula Bar as you type.
• Click the Enter button (the one with the tick) to confirm the new title.

Formatting a Chart — Inserting Axis Titles


The axes need titles. Insert them as follows:
• On the Layout tab, in the Labels group, click Axis Titles and choose Primary Horizontal
Axis Title I then Title Below Axis so that a new box Axis Title appears on the chart.
• With Axis Title still selected, type Day and again notice that this appears in the
Formula Bar as you type.
• Click the Enter button to confirm.
• Insert a Vertical Axis Title in the same way; the Rotated option is probably most
appropriate. Insert Total as the text here.

Formatting a Chart – Changing the Type Size


• Click, in turn, the Day, the Total and the AN EXPLOSION OF GREENFLY titles.
Whenever titles are selected in this way a border appears highlighting the item.
• With AN EXPLOSION OF GREENFLY selected, drag across the word GREENFLY. This
highlights the word. Key in APHIDS so the chart title changes to AN EXPLOSION OF
APHIDS.
• Click Total to select it.
• On the Home tab, in the Font group, change the point size from 10 to 12 points.
• Change the point size of Day to 12 and of AN EXPLOSION OF APHIDS to 14.
Notice that as you move the pointer over the drop-down list of point sizes you see the
effect of the various sizes. Clicking on a particular size selects and confirms that one.

Formatting a Chart – Adding Gridlines


Add some vertical gridlines to the chart as follows:
• On the Layout tab, in the Axes group, click Gridlines H Primary Vertical Gridlines I
Major Gridlines.

Formatting a Chart — Changes to the Plot Area


• Select the Plot Area.
• Click Format Selection so that the Format Plot Area dialogue box appears.
In the list on the left, Fill is selected and the various Fill options appear on the right. At
present the Plot Area is probably white, but try some experiments. For example,

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.

Formatting a Chart – More Experiments


These notes and suggested changes have barely started describing the various ways in
which a chart can be amended. Try some experiments. Remember in the Quick Access
Toolbar if you change your mind.

Changing the Location of a Chart


At present, the chart is embedded in a worksheet, but you might prefer it to be on a new
sheet by itself:
• On the Design tab, in the Location group, click Move Chart.
• Choose New Sheet and click OK.
Note that as well as the Sheet1, Sheet2 and Sheet3 tabs, you now have a Chart1 tab. Give
this a new name: change Chart1 to Aphid chart.

Leaving Excel 2007


• Click the Office Button and choose Exit Excel.
• Save the changes.

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

HOW MUCH DID YOU KNOW BEFORE THE COURSE?


80

70

60

50
Number of students

40

30
Excel 2007 (Session 3) Page 41

20

10

0
Word Excel PowerPoint

Everything A Lot Some A Little Nothing


Revision Exercise: Processing some Examination Results

Open the file Results.xlsx


You are using Excel 2007 to process the examination results of 26 candidates and to work
out the Class, Rank and Total for each candidate, and will produce some summary statistics
of the whole set of candidates. This exercise shows you how you might do this, and
introduces some new functions.
• The names must not be visible to the Examiners, so hide Column B.
• Fill in the total marks (i.e. the marks for all four Papers added together) in the Total
column using the AutoSum button.
• Sort the candidates into descending order of total marks. Candidate 2342E should be
at the top, and 2332B should be at the bottom of the table.
• Fill in cell E29. To do this, use the COUNT function. Practise making use of the Insert
Function button, fx . You may need to change the category (in the Insert Function
dialogue box) to All in order to find some of the following functions.
• Fill in cell E30, making use of the MIN function.
• Fill in cell E31, making use of the MAX function.
• Fill in cell E32, making use of the AVERAGE function.
• Fill in cells F29 to I32 by copying the formulae from cells E29 to E32.

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

No. in class % of candidates


I 6 23%
II.1 8 31%
II.2 9 35%
III 2 8%
Fail 1 4%

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:

THE MULTIPLICATION TABLE

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

You might also like