Guide to Excel

Guide to Excel
Contents
Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . v
1
Getting started with Excel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
What is a spreadsheet? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
A trip around the interface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Opening, saving, closing, reopening . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Working with worksheets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Bending Excel to your will. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Adding document details . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Shortcut keys . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .17
Getting help on Excel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
2
Working with spreadsheet data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
How Excel interprets data entries. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Editing cell data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .23
Searching for data, replacing data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
Sorting data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .36
3
Using spreadsheet formulae . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Using Excel formulae . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Using relative and absolute cell references . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
Using mixed cell references. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
Understanding Excel error messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
Using conditional functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
4
Improving a sheet’s appearance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
Setting display formats for data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
Setting display formats for text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
Using cell borders . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .65
iv
Contents
Protecting a sheet’s contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
5
Working with charts and graphs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
What’s a chart, what’s a graph? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Creating a simple chart. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Creating other types of chart. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Adding legends to your chart or graph. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Editing charts and graphs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Copying and moving charts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Adding charts to Word documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6
75
77
79
80
81
85
86
Preparing and printing data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
How Excel prints workbooks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
Preparing a worksheet for printing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
Printing a worksheet or workbook . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
Saving Excel data using different file types . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
Glossary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
Preface
T
hese self-paced units aim to provide you with all the information you need to train
yourself in basic Excel skills. They do this by covering Excel in six individual steps.
At the end of each step, you have an opportunity to pause and review what you
have learned. To help you pace your study to suit your available time and circumstances,
each step is self-contained.
What do you need?
To make use of the material, you need access to a personal computer running Microsoft
Windows XP on which a copy of Microsoft Office XP Professional or Microsoft Excel 2002
has been installed.
Overview
We have tried to design the steps so that many of them can be completed in a minimum of
about thirty minutes, although a few are more complex and may take longer.
Steps 1–6 cover working with data in spreadsheets, using predefined formulae, sprucing up
the appearance of a spreadsheet, for example for a presentation, working with charts and
graphs, and finally preparing and printing spreadsheet data.
vi
Preface
Layout and features
You shouldn’t try to get through all the steps
without a break. After each step there are
questions you can use to check your knowledge
and to practise what you have learned.
Note
It’s important to remember this.
The book also gives you signposts to help you
keep track of your progress and to highlight
interesting or important points. To allow you to
chart your progress, you’ll find icons like this in
the margin to show you how far you have
progressed through each step.
Tip
We also use the panels shown on the right to
highlight special or important pieces of
information.
Be aware of this.
Conventions used in the steps
Don’t do this.
This can make your life easier.
Warning
Stop!
Apart from the graphics mentioned above, the
following conventions are used in the steps:
■
To indicate a choice from a menu, we use the ➪ character, as in:
Choose File ➪ Save to save your work.
■
To indicate text that you must enter, for example into a dialog, we use a different font,
like this:
Enter =$G$5 in the second cell
■
We also use the same font to indicate multiple lines of text you must enter. For
example:
Enter the following information into column A:
Mary
Joe
Peter
Frank
Sue
■
To indicate keys that you must press, for example when entering data into a
spreadsheet, we use a bold coloured font, like this:
Enter Eggs Tab 1.25, then press Return
Here ‘Tab’ means press the Tab key.
■
To show a new term that’s defined in the glossary at the back of the book, we put it in
italics.
Getting started
with Excel
STEP
1
Checklist
■
■
■
■
■
■
Introduction to spreadsheets
Excel’s basic user controls
Creating, opening and saving workbooks
Working with worksheets
Customising Excel
Getting help
T
he next program in the Microsoft Office suite you are going to learn about is Excel.
This step is aimed at giving you a first taste of what a spreadsheet is and what you
can do with it. The steps that follow go into more detail about working with
spreadsheet data, charts and graphs, as well as preparing spreadsheets for printing.
What is a spreadsheet?
Just as a word processor is a tool for working with words, a spreadsheet is a tool for working
with numbers—although not only numbers.
Why would you want to do that? There are few aspects of business that don’t involve
working with numerical data in some way. Although formal accounting is done using specialpurpose software, there is still a huge amount of calculation, prediction, costing, estimation
and so on in the work of most businesses. This is where spreadsheets excel (no pun
intended).
The term ‘spreadsheet’ comes from traditional accounting practice. It was used to describe
the format used in book-keeping ledgers, in which expenditure categories were arranged as
2
Step 1—Getting started with Excel
columns, and amounts were added in the relevant columns, with each row representing a
transaction. This organisation of rows and columns is carried over into today’s software.
But what exactly is a spreadsheet? If you start a program such as Excel, you see
something like Figure 1.1. Do it now using Start ➪ All Programs ➪ Microsoft Excel . It
looks a bit like a table, and that’s a useful way of thinking about it.
Figure 1.1
A blank Excel document
Look at the blank document on your screen. As you can see, it is divided into cells, each of
which corresponds to the intersection of a column (A–K in the picture) and a row (1–22).
First of all, we’ll consider what a cell is and what it can do. We’ll do this by analogy:
■
■
Suppose first that you want to add some numbers. You would probably do this by
finding a pocket calculator and using it to add the numbers.
Suppose however that instead of adding a few numbers, you wanted to solve a fairly
complicated calculation, such as working out the total cost of a loan with compound
interest (or any other complex calculation you like to think of). Clearly now your
simple pocket calculator, while it helps you with addition, subtraction, multiplication
and division, is not enough by itself. The least you will have to do is use a pencil and
paper as well to write down intermediate totals.
What is a spreadsheet?
■
■
3
At this stage you might go off and find a programmable calculator, and write yourself
a little program to work out your calculation—although this might take you longer than
the method above!
Now suppose that you want to do this complex calculation many times, using different
sets of numbers, perhaps experimenting with different interest rates or repayment
periods for a loan?
Enter the spreadsheet. Every cell in a spreadsheet is like that programmable calculator!
Every cell can contain any formula, of almost any complexity, and reference numbers in
other cells. This means that once you have defined your formula, merely changing the
numbers in the other cells allows you to freely experiment with your data, instantly.
A cell is not restricted to numbers. In fact, a cell can contain any of:
■
■
■
■
Text
Numbers
Logical values (true or false)
Formulae (that is, calculations), which include references to other cells.
The best way to see how this works is to try it. You’ve already opened a blank Excel
document. Now try this:
1.
2.
3.
4.
5.
You’re going to create a simple shopping list. Click in any cell to start—say B5. That’s
the cell where the B column intersects row 5. (All cells are equal, so you can start at
A1 if you like—it doesn’t matter.)
Enter Eggs Tab 1.25, then press Return.
Notice that the cell below your starting cell is now highlighted. This is because Excel
has decided—because you pressed Return—that you are probably entering a list of
items.
Enter Flour Tab 1.1 Return Potatoes Tab 0.85 Return Meat Tab 2.26.
Here’s what things should look like now.
“So what?”, you may be thinking at this stage. Now click in the cell two below Meat
and type Total Tab.
Now enter the following carefully in the highlighted cell: =SUM(C5:C8) Return, where
C5 and C8 are the cells of the first and last numbers in your list.
Can you see what’s happened?
4
Step 1—Getting started with Excel
Let’s explain what’s going on here. Entering ‘=’ as the first item in a cell tells Excel that you
want that cell to contain the results of a calculation. SUM(C5:C8) is an Excel function,
which tells Excel to calculate the total of all the numbers in the cells between and including
cells C5 and C8, that is:
C5 + C6 + C7 + C8
and display the result in the cell that contains the function. We will go into more detail
about functions in Step 3.
You may still be wondering what all the fuss is about. But now go back to your shopping list
and try entering different values for the costs of individual items. Can you see that the total
updates itself automatically? Now imagine a large sheet with much more complex
calculations and many more totals—change any input information, and all the calculations
are updated automatically, just as with this simple total. Now imagine the results plotted on
a graph within the spreadsheet, and seeing that updated automatically. That is where the
power of a spreadsheet program lies.
That, in essence, is what spreadsheets are all about—ensuring that calculations of almost any
complexity only have to be defined once, but can be repeated endlessly just by entering new
numbers.
Keep your shopping list open, as we’ll use it again shortly.
Some clarity and some confusion
So far we’ve been referring to Excel as a ‘spreadsheet’, or ‘spreadsheet program’. This is
because ‘spreadsheet’ is the term in common use. In fact the term Excel itself uses is
worksheet, usually shortened to sheet. A new Excel document, by default, contains three
worksheets—for no particular reason other than it’s more than two and less than four—and
the entire document is referred to as a workbook. These are the terms we will use from now
on.
You can see this if you look at the open Excel document on your screen—it lists Sheet 1,
Sheet 2 and Sheet 3 on the tabs at the lower left. Later we’ll see why having multiple
worksheets in a workbook can be useful, but for the moment just note that:
■
■
■
All the worksheets in a workbook are identical and equivalent
Any cell in a worksheet can reference any other cell in the worksheet
Any cell in a worksheet can reference any cell in any other worksheet.
In fact, any cell in any workbook can reference any cell in any other workbook too, but that’s
for later.
A trip around the interface
5
A trip around the interface
Figure 1.2 shows a labelled version of Figure 1.1, and below we’ll explain the purpose of the
major controls. This time we’ve re-enabled the task pane using View ➪ Task Pane.
Menu bar
More tools hiding here…
Help
…and here
The formatting toolbar
Formula bar
Cell selector
The standard toolbar
Column titles
Task pane
Row titles
Worksheet selector widgets
Worksheet tabs
Figure 1.2
Vertical scroll bar
(obscured by task pane)
Horizontal scroll bar
(obscured by task pane)
Excel’s user interface
Travelling around the figure clockwise:
■
■
The cell selector allows you to highlight any cell by name. This is often faster than
scrolling around a large worksheet. Try entering a few values now: B5, C7, C10.
The menu bar houses most of Excel’s commands. Click on each one now to see the
commands it contains:
File
Saving and printing
Edit
Cutting and pasting, filling and clearing cells, deleting cells, columns and
rows, searching
View
Viewing a document in different ways, enabling and disabling toolbars,
headers and footers
6
Step 1—Getting started with Excel
Insert
Inserting cells, rows, columns, worksheets, charts, functions, objects,
diagrams
Format
Applying styling and formatting to cell contents, rows and columns,
defining styles
Tools
Checking spelling, mathematical consistency, protecting cell contents
and whole sheets, high-level tools, options
Data
Sorting, filtering, grouping, data tables
Window
Handling multiple windows
plus of course a Help menu.
Some of the above will be unfamiliar to you—don’t worry. Excel contains some very
high-powered mathematical tools indeed, but you don’t need to know about them at
this stage.
■
■
■
■
■
■
■
■
■
■
The formula bar provides you with somewhere to edit the data in a cell when the cell
is highlighted, a real help when you are working with long formulae.
Column titles are alphabetic, starting A, B and so on, through AA, AB to IV, 256 in all.
The toolbars—Figure 1.1 shows two of Excel’s toolbars, the Standard toolbar and the
Formatting toolbar, displayed on the same row. We’ve shown it like that because that’s
the default, but you can display the toolbars in full on two separate rows if you want.
Excel’s toolbars, of which there are many, are designed to give you quick access to
often-user commands. You can create your own toolbars, too, just as you can with
Word.
The task pane is displayed here because we’ve just done a File ➪ New command.
The horizontal scroll bar allows you to move forward and backward through the
columns in a worksheet.
The vertical scroll bar (here obscured by the task pane) allows you to scroll a worksheet
vertically through its rows.
The bottom border of the window contains information about the status of the current
cell. It displays Enter if you are typing data into a cell, otherwise it displays Ready. Tips
are also displayed here when you are engaged in an editing task such as copying a group
of cells.
The worksheet tabs allow you to switch between the different worksheets in a
workbook.
The worksheet selector widgets allow you to scroll the worksheet tabs if necessary.
Row titles are numeric, from 1 through to 65,536—that’s 16 million cells to a single
worksheet!
A trip around the interface
7
As with your work with Word, this may seem a lot to remember. Don’t worry—it will
become more familiar as you work with the application.
Enabling and disabling toolbars
Excel has twenty-nine toolbars, most of which are for special purposes. Those that you will
probably find most useful initially are the Standard, Formatting, Tables and Borders and
Drawing toolbars.
Here’s how to enable, disable and move them:
1.
2.
3.
4.
With your shopping list document still open, select View ➪ Toolbars. Here you can
selectively enable or disable toolbars as you need to. The Custom… setting is where you
can build your own toolbars.
Release this menu option, then click and hold on the menu bar. The mouse cursor
changes to
Drag downwards—the menu bar and the other two toolbars change
position. Click and drag again to restore them.
This is how you rearrange toolbars. (Remember from your work with Word that Office
applications treat the menu bar as just another toolbar.)
Now right-click in the blank area at the right of the menu bar. The toolbars menu is
displayed—this is a shortcut that has the same effect as selecting View ➪ Toolbars. Try
deselecting the Formatting toolbar. Now you can see all the tools on the Standard
toolbar. Repeat the process to redisplay the Formatting toolbar.
Click on either of the toolbar options widgets to display the tools in the toolbar that
are obscured. Try selecting Show buttons on two rows to see the effect.
This short exercise should give you an idea of how you can customise the toolbars to suit
the way in which you want to work with Excel. There’s more about toolbars later in this
step.
Using different views
Excel allows you to use zooming to change the magnification of your worksheet in much the
same way as Word does with documents. The zoom/magnification setting applies to the
current worksheet only. Try this:
1.
2.
3.
Using your shopping list document as an example, right-click to the right of the menu
bar and deselect the Formatting toolbar.
You can now see all the tools on the Standard toolbar, which includes the zoom field.
Try selecting different zoom values. The Selection value zooms the view to the size of
the currently-selected cells, if any.
Now select View ➪ Full Screen. Excel zooms the sheet to take over the whole area of
your screen. It also displays a small floating toolbar to allow you to close this view
mode.
8
4.
5.
6.
Step 1—Getting started with Excel
Full screen viewing is useful when you are
working with large worksheets, or if you are
working only in Excel.
Now select File ➪ New and click on Blank
workbook in the task pane to open a new
blank workbook.
Select the Window menu. Note that Excel
now has two workbooks open within the
same application window. The Window
menu allows you to switch between them.
Close the blank workbook using the close
icon
in the workbook window—not the
entire application’s close icon.
Locking rows and columns
Tip
A quick way to scroll around a
worksheet is to click in a cell near the
top, bottom or side of the sheet and
drag in the direction you want to
scroll. Excel moves the hidden cells
into view as you do so.
Warning
Note that Excel has two Close icons,
one for the foreground workbook, and
one for the entire application window.
Don’t confuse them.
Much of the work you will do in Excel consists of
handling tables of information. If you use a row
at the top of a worksheet for titles, it’s really useful to be able to keep that on screen while
scrolling the worksheet. Here’s a short exercise that demonstrates how to do it:
1.
2.
Select File ➪ New and click on Blank workbook in the task pane to open a new blank
workbook.
Click in cell A1 and then enter:
Title A Tab Title B Tab Title C Return
3.
4.
to simulate the start of a table of data.
Add some numbers to cells A2 to C8—it doesn’t matter what they are.
Click on the row title for row 2, then select Window ➪ Freeze Panes.
Excel places a line below row 1 to indicate that this row is locked on screen.
If you now scroll the worksheet using the vertical scroll bar, you will see that the title row
remains locked on screen. Remember:
To lock a row
Select the row below the row you want to lock, then select Window
➪ Freeze Panes
To lock a column
Select the column to the right of the column you want to lock, then
select Window ➪ Freeze Panes
To unfreeze panes, select Window ➪ Unfreeze Panes .
Opening, saving, closing, reopening
9
Opening, saving, closing, reopening
If you worked through the steps on Microsoft Word, you’ll be familiar with the operations
of opening, saving and closing documents. Excel is very similar.
Assuming you have your shopping list example worksheet open, try the following:
1.
Select File ➪ Save. Excel displays its Save As dialog, which is the same as Word’s. It’s
shown in Figure 1.3. As with Word, Excel defaults to your folder My Documents, but
gives the workbook the default name of ‘Book 1’.
Figure 1.3
2.
3.
4.
Excel’s Save As dialog
Enter ‘Shopping List’ in the File name field.
Remember that you can use the Save in field to specify a different location to save the
workbook.
Notice the
widget to the right of the Save as type field. This allows you to select file
types other than the default, which is Microsoft Excel Workbook .
Finally, click on Save, then close Excel by selecting File ➪ Exit or by clicking on the
application window’s close icon .
To re-open your file, select Start ➪ My Documents and double-click on the workbook
you just saved, or select Start ➪ My Recent Documents and select the workbook you just
saved.
After you have named and saved your workbook, selecting File ➪ Save again saves the
workbook without requesting a name (it already has one). If you want to save a copy of the
workbook under another name, select File ➪ Save As… This displays the dialog shown in
Figure 1.3 again, allowing you to supply a new name for the copy of the document.
10
Step 1—Getting started with Excel
Excel’s alternative file types
Excel offers a variety of alternative file types in addition to Workbook. Other file types
include Web page format and text. You need to know about several of these. For the
moment, be aware of the fact that there is a Save as type field in the Save As dialog—we will
return to alternative file types in Step 6.
The alternative format that is likely to be most
useful to you is Template.
Working with worksheets
You have already seen how a default workbook
contains three worksheets. You might be
wondering at this stage why you would want
more than one worksheet. Here are a few things
you can use separate worksheets for:
■
■
■
Tip
Excel templates provide you with an
easy way to create new workbooks
with the same formatting and layout
as an original. If you are likely to want
to create several workbooks with the
same formulae and layout, it’s worth
saving the first one as a template.
Keeping related sets of data together, for example expenditure figures for each month
of a financial year, one month per worksheet.
Storing and accessing ‘look up’ data that you don’t want cluttering up your main
worksheet, for example currency conversion rates.
Using a second worksheet to hold complex calculations, and using the first, or ‘front’,
worksheet to present only important data and results.
We’ll do a few short exercises to show you how to manipulate whole worksheets. Use your
shopping list example, or a blank worksheet—it’s up to you.
Adding a new worksheet
To add a new worksheet, do this:
1.
2.
3.
Right-click on any of the existing worksheet tabs.
Select Insert… from the pop-up menu.
Excel displays the Insert dialog, as shown in Figure 1.4, which lists all the installed
Excel templates.
Select Worksheet and click on OK.
The new worksheet is always inserted before the worksheet whose tab you selected. To
move the new worksheet, do this:
1.
2.
Right-click on the worksheet tabs of the worksheet to be moved.
Select Move or Copy…
Excel displays the Move or Copy dialog, as shown in Figure 1.5.
Working with worksheets
3.
Figure 1.4
Excel’s Insert dialog
Figure 1.5
The Move or Copy dialog
11
Select (move to end) and click on OK.
Excel moves the selected worksheet to the end of the list of worksheets.
Renaming a worksheet
When you first start Excel, the default worksheets are called Sheet 1, Sheet 2 and Sheet 3.
This is not really very descriptive, but fortunately it’s easy to rename them. To do this:
1.
2.
3.
Double-click on the name in the worksheet tab. Excel highlights the worksheet’s name.
Enter a new name.
Click anywhere outside the worksheet tab to deselect it.
12
Step 1—Getting started with Excel
Deleting a worksheet
As you have probably noticed by now, the worksheet tab pop-up menu has a Delete option.
If the worksheet is not empty, Excel displays the following warning dialog when you
select it.
Figure 1.6
Deleting a non-empty worksheet
Click on Delete to delete the worksheet.
Copying a worksheet to another
workbook
To carry out this exercise, you first need to
create a new workbook. To do this:
1.
2.
Warning
Once you click on Delete, the data that
the sheet contained is gone for good—
there is no Undo operation!
With your shopping list example workbook open, select File ➪ New.
Excel displays the New Workbook task pane.
Click on Blank workbook in the task pane.
You now have two workbooks open in Excel. The new one, which Excel has called ‘Book 1’,
is probably obscuring your original workbook. To bring the original workbook to the
foreground, either click on its title bar or select it using the Windows menu.
To copy the first worksheet from the shopping list to the new workbook, do this:
1.
2.
3.
4.
Right-click on the worksheet tab labelled Sheet 1 in the shopping list workbook.
Select Move or copy…
Excel displays the Move or Copy dialog, as shown in Figure 1.5 on page 11.
Select Book 1 from the To book pop-up menu.
Click in Create a copy to enable this option, then click on OK.
Excel copies the selected sheet to the new blank workbook. Figure 1.7 shows the result. To
use the same procedure to copy a worksheet within a workbook, don’t make any selection
in the To book pop-up menu.
Bending Excel to your will
Figure 1.7
13
Worksheet after copying
Bending Excel to your will
As with Microsoft Word, many features of Excel are customisable. This section lists a few
of the things you might want to change, and also gets you familiar with how to change
Excel’s many options. Many, but not all, of these options lurk behind the Tools ➪ Options
and Tools ➪ Customize commands. Take a look at what’s there while you follow the
following simple exercises.
Partial or full menus?
By default Excel only displays partial menus, which adapt to list the commands you use
most often. This is to make it easier to use on monitors with small screens (presumably).
However, menus tend to be easier to use if commands stay in the same relative position in
the menu.
14
Step 1—Getting started with Excel
Here’s how you turn this feature off, so that you get whole menus all the time:
1.
2.
3.
4.
Select Tools ➪ Customize…
Click on the Options tab.
Click in Always show full menus to enable the option.
Note in passing that there’s an option here to control whether the Standard and
Formatting toolbars are shown on one row or two.
Click on Close.
From now on, you’ll always get whole menus unless you disable the option again.
Disabling automatic recalculation
By default, Excel recalculates all formulae every time you change any data in a worksheet.
For complex calculations or big worksheets, this may slow down your editing.
Here’s how to change the automatic recalculation option:
1.
2.
3.
Select Tools ➪ Options… and select the Calculation tab.
Click in Manual to enable this option.
Click on OK.
Excel will now only perform a recalculation of the formulae in the current worksheet when
you press the F9 key, rather than whenever you enter new data.
Setting the default location for documents
By default, Excel will offer you your My Documents folder in open and save dialogs. If this
is ok for you, you don’t need to change anything. If you decide that you want a different
default folder, here’s how to change it:
1.
2.
3.
4.
Select Tools ➪ Options.
Click on the General tab.
In the Default file location field, enter the full pathname of the folder you want to use
as the default for your Excel document.
Click on OK to close the Options dialog.
Now, whenever you save a new workbook, or use the File ➪ Save As… or File ➪ Open…
commands, Excel will offer you the folder you have chosen as the default location.
Using and customising Excel’s toolbars
As with Word, Excel displays the Standard and Formatting toolbars by default. It displays
other toolbars in specific circumstances, such as the Drawing toolbar if you insert a drawing
into a worksheet. In Office XP Excel has twenty-nine toolbars, plus the menu bar, and on
Bending Excel to your will
15
top of that, you can create your own. Many of Excel’s toolbars are for special purposes, and
you are only likely to come across them if you start using Excel for complex mathematical
or financial work.
If you are a ‘visual’ person, someone who works easily with icons, toolbars will be useful to
you. Not everyone is, so you need to know how to control Excel’s toolbars so that you can
adapt it to match the way you want to work. The following sections are very similar to those
relating to Word’s toolbars, but we repeat them here so that you can refresh your
knowledge.
Displaying a toolbar
To display a concealed toolbar, select View ➪ Toolbars… and then select the toolbar you
want to display. The usefulness or otherwise of the various toolbars will become clearer as
you work with Excel.
Notice that toolbars can be fixed or floating:
■
■
To ‘park’ a floating toolbar at the top or bottom of the screen, click on its title bar and
drag it to the position in which you want it.
To float a ‘parked’ toolbar, hold down the Ctrl key, click in the toolbar and drag it free.
Setting toolbar defaults
If you find yourself working with the same toolbars all the time, you can tell Excel to display
them by default when you start it. To do this:
1.
2.
3.
4.
Select Tools ➪ Customize…
Click on the Toolbars tab if it’s not already displayed.
Click to select the toolbars you want. Notice that there are toolbars here that aren’t
even displayed in the View menu!
Click on Close.
Excel displays the toolbar(s) you have chosen, and will also redisplay them the next time
you start up the application.
Customising a toolbar
To complete our discussion of toolbars, we’ll see how easy it is to add or remove commands
from them:
■
To remove a button from a toolbar, hold down the Alt key, click on the button you want
to remove, and drag it off the toolbar.
16
■
Step 1—Getting started with Excel
To add back the default buttons, click on
the toolbar options widget and select Add
or Remove Buttons ➪ Standard, then reselect
the button you want to replace. (This
requires a bit of menu gymnastics!)
If you accidentally remove an entire menu, use
this method to replace it:
1.
2.
3.
4.
Note
As Excel treats the menu bar as just
another toolbar, it’s possible to Altdrag an entire menu off the menu bar!
If you do this, you will need to use a
different method to replace the menu.
Select Tools ➪ Customize…
Click on the Commands tab.
Select Built-in Menus from the Categories list.
Click on the missing menu in the Commands list, then drag it back into position in the
menu bar.
Note that you can use this method to add new commands to the menu bar if you wish.
When you select Built-in Menus in the Categories list, all of Excel’s commands are organised
into menus for you in the Commands list. Figure 1.8 shows a handy Clear menu added in this
way.
Figure 1.8
A new Excel menu
This method can be used with Word too, of course, as the handling of toolbars is identical
to Excel’s.
Adding document details
Excel saves extra information with worksheets in the same way that Word does with
documents—a worksheet’s title (not the same as its file name), subject, author, category
and so on. This can be useful for several reasons:
■
■
Microsoft Office applications have their own search tool that allows you to search for
this information. This might allow you, for example, to find all workbooks by the same
author quickly.
You can define your own workbook properties. You might use this, for example, to
track the progress of something like a financial report, using sequential version
numbers.
Shortcut keys
17
Try this now with your shopping list workbook:
1.
Select File ➪ Properties. It’s quite likely that you’ll see something like Figure 1.9.
Figure 1.9
Document properties
2.
Enter something like ‘Trial Excel shopping list’ in the Title field and click on OK.
3.
Re-save the document by selecting File ➪ Save.
Shortcut keys
As an alternative to using the menu commands, Excel offers you shortcut keys. These are
key combinations, typically including a modifier key, that perform a specific function such
as selecting a menu command. See the table on the next page for the essential shortcut keys
you need to know in Excel.
Getting help on Excel
If you did not disable the Office Assistant when you worked through
the steps on Word, all you have to do to get help in Excel is to click
on it, popping up a dialog into which you can type your question.
If you disabled the Office Assistant, you can get the same results by
typing a question into the help field in the menu bar.
18
Step 1—Getting started with Excel
Excel’s essential shortcut keys
As you work with programs like Microsoft Excel, it’s a really good idea to try to become
familiar with the shortcut keys, at least for commonly used commands. This is because
it takes far less time and effort to type, say, Ctrl + V than to take your hands off the
keyboard, reach for the mouse, go to the Edit menu, click and select Paste.
We won’t slavishly give all the shortcut keys when we introduce a menu command, as
this would clutter up the book, but as you work with Excel, try to become familiar with
the shortcuts you find useful. Here are the absolute minimum that you need to know—
and they work in all Office programs:
■
■
■
■
■
■
■
■
■
Ctrl + X Cut selection
Ctrl + C Copy selection
Ctrl + V Paste
Ctrl + Z Undo last command
Ctrl + Y Redo last command
Ctrl + S Save workbook (do this frequently!)
Ctrl + P Print worksheet
Ctrl + O Open a workbook
Ctrl + W Close current workbook
Shortcut keys are displayed next to each menu command when the menu is displayed.
Done!
You can also select Help ➪ Microsoft Excel Help to display a help window with more help
options, including a table of contents and index for Excel’s help. Finally, most of Excel’s
dialogs also have contextual help, which you can access by clicking on the
icon.
Getting help on Excel
19
Review
In this step, you learned:
■
■
■
■
■
■
■
■
■
■
■
■
■
■
What spreadsheets are and what they are for.
Excel refers to spreadsheets as worksheets, which are bound into workbooks.
Excel has controls a little like those of Word.
Excel has many toolbars, which are customisable in the same way as Word’s.
You can zoom to enlarge any part of a worksheet.
You can lock a row or column on screen so that it stays in view as the worksheet is
scrolled.
Worksheets are made up of cells.
A cell can contain text, a numerical value or a formula (a calculation).
Formulae can reference the contents of other cells.
Worksheets can reference data in other worksheets.
A cell containing a formula displays the formula’s total.
Excel lets you add, delete, or copy worksheets, either within a workbook or between
workbooks.
Excel has comprehensive built-in help.
Almost everything about Excel’s user interface can be changed.
Quiz
1.
2.
3.
4.
5.
6.
7.
How is a cell defined in Excel?
How do you tell Excel that the contents of a cell is a formula?
Can a formula in a worksheet make use of data stored in another worksheet?
What is the editing field used for in Excel?
How many rows does an Excel worksheet have?
How do Excel templates differ from workbooks?
Suggest two uses for multiple worksheets within a workbook, and try and think up one
of your own.
8. How do you move a worksheet within a workbook? Try to do so.
9. It’s possible to turn off Excel’s automatic recalculation. Why might you want to do this?
10. Suggest a use for Excel’s document properties.
Working with
spreadsheet data
STEP
2
Checklist
■
■
■
■
■
Entering data into Excel
Editing data in cells
Searching for and replacing data
Moving and copying data between cells and worksheets
Sorting data
T
he last step introduced you to Excel’s basic user controls. Now it’s time to look in
more detail at how Excel handles numerical and text data, and the features it offers
you for working with data.
How Excel interprets data entries
Many computer applications have been described as ‘intelligent’, but Excel is one that has
some claim to this title. It adopts the approach that a tool designed to work with numbers
should be good at understanding numbers. For example, Excel applies a format
automatically to every number you enter, based on its best guess of what the number is.
To see how this works, try the following short exercise:
1.
2.
3.
Open a blank workbook in Excel.
Click in cell A1 to highlight it.
Enter the following:
12 Return
12.25 Return
22
Step 2—Working with spreadsheet data
12e2 Return
12/12/04 Return
You should now see something like this:
Can you see what Excel has done? Here’s a step-by-step description:1
You entered
What Excel did
12
Excel interprets this as a number and determines that it does not require
any special formatting. It applies its default format to the number,
which is called ‘General’.
12.25
Excel interprets this as a number, and applies its General format to
display only as many decimal points as are required.
12e2
Excel interprets this as a number in scientific notation1, and applies its
‘Scientific’ format automatically to display it as 1.20E3.
12/12/04
Excel interprets this as a date, and formats it accordingly as 12/12/2004.
It has also made the column a little wider to accommodate this format.
Now do another short exercise:
1.
2.
Click again in A1 to select it.
Enter the following:
14 Return
14 Return
14 Return
14 Return
1. In scientific notation, numbers are expressed as a mantissa and an exponent. The mantissa contains the significant digits of the number in the range 0–9, and the exponent contains the power
of ten to be applied to the mantissa. For example, 12.25 is ‘1.225E1’ in scientific notation, while
1001 is ‘1.001E3’. For numbers less than 1 a negative exponent is used, for example 0.0033 is
written as ‘3.3E-3’. If this seems hard to understand, try mentally moving the decimal point in the
mantissa by the number of places after the ‘E’ in the exponent, to the left if negative, and to the
right if positive. Scientific notation provides a convenient way to handle very large or very small
numbers.
Editing cell data
23
You should now see something like this:
Here’s what’s happened:
Cell contains
Why?
14
When you originally entered 12 in this cell, Excel interpreted it as a
number and determined that it did not require any special formatting.
The default format is General. This cell therefore still has the format
General, so the data is displayed as ‘14’.
14
As above, Excel interpreted your original entry, 12.25, as a number, and
applied the General format. This cell therefore still has the format
General, so the data is displayed as ‘14’.
1.40E1
Excel interpreted your original entry, 12e2, as a number in scientific
notation, and applied its Scientific format automatically. This cell therefore still has Scientific format applied to it, so your entry of 14 is
displayed as ‘1.40E1’.
14/01/1900
Excel interpreted your original entry, 12/12/04, as a date, and so applied
a date format to the cell. This format is still applied, so Excel interprets
an entry of 14 as ‘the 14th day of the date format’. Excel’s dates start
from 1st January 1900, so the cell displays ‘14th January 1900’.
Excel has retained the formatting it applied automatically to these four cells. This may seem
confusing at first, but it allows Excel to process all numerical data internally in the most
efficient way, and display it in ways that make sense to us humans. We’ll return to
formatting in more detail in Step 4.
Editing cell data
Just as Excel tries to make it easy for you to insert data, it also tries to help with editing
data. In this section we’ll look at the ways you can move and copy data within and between
worksheets, and at how you can create an automatic data series.
24
Step 2—Working with spreadsheet data
Selecting cells, columns and rows
Before we look at how to edit, move and copy the data in cells, you need to know how to
select parts of a worksheet. Try these now on a blank worksheet:
1.
2.
3.
4.
5.
6.
7.
8.
To select a single cell, either click in the cell or enter its reference in the cell selector
(see Figure 1.2 on page 5).
To select a range of cells, click in the first cell and drag to select all the required cells.
To select a large range of cells, click in the first cell, hold down Shift and click in the
last of the range of cells to be selected.
To select a range of cells larger than that displayed in the worksheet’s window, click in
the first cell, enter the cell reference of the last cell to be selected, then press Shift
Return.
To select an entire column, click on the column title.
To select an entire row, click on the row number.
To select non-adjacent cells, rows or columns, click on the first cell, row number or
column title, then hold down Ctrl (Control) and click on the second cell, row number
or column title.
To select all cells in a worksheet, click on the Select All button at the top-left of the
worksheet:
Moving and copying data using dragging
Once you have selected a cell or group of cells in a worksheet, you can drag them wherever
you want in the worksheet. Try this:
1.
2.
3.
Open a new blank workbook in Excel if you need to.
Enter three numbers in three cells of the same column, using Return to move between
cells.
Click in the first cell again and drag downwards to select all three cells. You should see
something like this:
Editing cell data
4.
5.
25
Release the mouse and move it over the boundary of the highlighted cells. The mouse
cursor changes to a four-pointed arrow, like this:
This is Excel telling you that you can click and drag the selected region anywhere on
the worksheet. Try it.
Now try the same thing with the Ctrl key held down. Now the cursor changes to a plus
sign:
This is Excel telling you that dragging now will create a copy of the selected cells.
Try it.
Moving and copying data using menu commands
Excel also has a pop-up menu that is displayed
whenever you right-click in a worksheet. Try this short
exercise to move or copy data:
1.
2.
3.
4.
Using the same workbook you used in the
previous exercise, select the three cells that
contain numbers again.
With the mouse cursor within the selected cells
but not over their boundary, right-click to display
the pop-up menu.
Select Copy. Excel displays a flashing boundary on
the selected cells to show that they have been
copied to the clipboard. (To move the data
instead, select Cut.)
Position the mouse over a target cell, right-click again, and select Paste.
Excel copies the selected cells to the new location. Note that the selected target cell is
always used for the top-left cell of the copied group.
26
Step 2—Working with spreadsheet data
After you have pasted the data, Excel displays a small clipboard icon, as shown:
This allows you to select paste options—try clicking on it to see what’s offered. The
Link Cells option places references to the copied cells into the destination cells, instead
of the copied values. We’ll have a lot more to say about cell references later.
Moving and copying non-adjacent data
To carry out this exercise, you will need data in more than one column. Do this:
1.
2.
3.
Close your currently open workbook, if you have one open, discarding the data.
Open a new blank workbook.
Enter numbers in non-adjacent columns, as shown:
4.
Drag to select the first group of cells, then hold down Ctrl and drag to select the second
group of cells:
5.
Right-click and select Copy (or Cut) from the pop-up menu.
Editing cell data
6.
27
Move the mouse cursor to your chosen destination for the copied cells, right-click and
select Paste.
Note that Excel pastes the contents of the copied cells in two adjacent columns, even
though the original data was not in adjacent columns.
Moving and copying data between worksheets and workbooks
Excel does not restrict you to working on one worksheet or workbook—you can work with
multiple worksheets at a time, and can open as many workbooks as you wish. You can do
this in several ways:
■
■
■
To work with more than one worksheet, click on the
sheet selector widgets to toggle between worksheets.
To open more than one workbook, do one of the
following:
– Click to select the first workbook you want to open, hold down the Ctrl key, click
the second workbook, then right-click and select Open from the pop-up menu.
– Click and drag to select more than one workbook, then right-click and select Open
from the pop-up menu.
– Double-click the first workbook to open it, display the folder window again by clicking on its icon in the Windows taskbar, then double-click on the second document
to open it.
To work with more than one workbook, do any of the following:
– Switch between workbooks by clicking on their icons in the taskbar.
– Use the
icon to minimise workbooks into the taskbar, then just click their icons
in the taskbar as required.
– Switch between workbooks using the Window menu.
You can copy and paste or move data between worksheets and between open workbooks.
Here’s how to copy or move data between worksheets.
28
1.
2.
3.
4.
Step 2—Working with spreadsheet data
In the worksheet you already have open, click and
drag to select some data.
Right-click to display the pop-up menu, then
select Copy if you want to copy data, or Cut if you
want to move data.
Click on the sheet selector for Sheet 2.
Position the mouse where you want to paste the
data, right-click and select Paste from the pop-up
menu.
Copying or moving data between two workbooks is just as easy. To do this, we’ll first have
to create a new workbook:
1.
2.
3.
4.
5.
6.
Select File ➪ New and click on the Blank Workbook link in the task pane.
Excel opens a new blank workbook in the same window.
Select Window ➪ Book1 to return to the original workbook.
Click and drag to select some data.
Right-click to display the pop-up menu, then select Copy if you want to copy data, or
Cut if you want to move data.
Select Window ➪ Book2 to display the second workbook.
Position the mouse where you want to paste the data, right-click and select Paste from
the pop-up menu.
Try the two exercises above a few times on your own, perhaps this time using the menu
commands instead. When you have finished practising moving and copying data, close both
workbooks and discard the changes.
How Excel handles cell references when cells are copied or moved
The exercises above are all very well, but all we are moving is numbers. The power of Excel
comes from the fact that cells can contain formulae that reference the contents of other
cells.
You may be wondering what happens to such cell references when the cell containing a
formula is moved or copied. The answer is that Excel does what you normally want it to—
Editing cell data
29
it adjusts the cell references relative to the move or copy. If this doesn’t make much sense,
try the following simple exercise:
1.
2.
3.
4.
5.
Open a new blank workbook.
Click in cell A1 to select it.
Enter 12 Tab =A1.
This places the numerical value 12 in A1,
and the expression =A1 in B1. This just tells
Excel always to make the value displayed in
B1 equal to the value contained in A1. Cell
B1 is now said to be dependent on A1.
At this stage the worksheet should look like
this:
Note
In step 3, note that the contents of B1
is the expression =A1, not 12. Cell B1
displays the value 12 because this is
the result of the expression =A1. This
may seem confusing until you become
more familiar with Excel.
—which is not very exciting.
Now drag to select the first two rows and use the pop-up menu to copy them
somewhere else in the worksheet, as you learned how to do in Moving and copying data
using menu commands on page 25.
Your worksheet should now look something like this:
Now click in the right-hand cell of the pair you have copied, C5 in this picture. What
does it contain? Can you see what Excel’s done?
When you move or copy dependent cells, any references to other cells in formulae are
changed automatically by Excel to reference the same relative cells after the move or copy
operation. This is normally what you want to happen. If it’s not, you can prevent it—we’ll
go into more detail about this in Step 3.
30
Step 2—Working with spreadsheet data
Editing data in cells
As you have seen, you insert data in cells by clicking in the cell and typing the data. To edit
data already in a cell, click to select the cell and then edit the cell’s contents in the formula
bar.
When you click in the formula bar, Excel highlights any cells that are referenced by a
formula in the cell being edited, using colour to distinguish them, as the illustration above
shows (or would, if it were in colour). When you have made any changes you wish, the
button allows you to accept your changes, and the button to reject them.
However, Excel is cleverer than this. While you are editing the cell contents, you can click
on and drag any of the highlighted referenced cells. You do this by moving the mouse cursor
over the edge of the highlighted cell you want to move, then click and drag it to the new
location. Excel then adjusts the formula accordingly
Practise this now, using some simple formula such as the one shown in the illustration above.
Adding comments to cells
You can add comments to individual cells. Comments are useful, for example to explain a
formula, either for a colleague, or to remind yourself at a later date.
Editing cell data
31
To enter a comment in a cell, select the cell, then select Insert ➪ Comment. Excel opens a
window for your comment, titled with your name:
To close the comment window, just click outside it. After you have done so, Excel shows a
small red tag at the top-right corner of the commented cell. Moving the mouse pointer over
the cell causes the comment to be displayed:
To change or delete the comment, select the commented cell, right-click and select Edit
Comment or Delete Comment . The Show Comment option causes the comment to be
permanently displayed until the corresponding Hide Comment command is selected for the
cell.
Clearing or deleting cells
To clear the contents of one or a group of cells quickly, drag to select them, right-click and
select Clear Contents from the pop-up menu. This clears everything from the cell or cells:
contents, formats and comments. You have more control if you select Edit ➪ Clear, as there
are options for clearing the contents and the formatting of the cell separately.
To delete a single cell, right click with the cell selected and choose
Delete… from the pop-up menu. Excel prompts you with the dialog
shown. Here’s a short exercise to demonstrate how the options work:
1.
2.
3.
Close your current workbook, if you have one open, discarding the
changes.
Open a new blank workbook.
Enter numbers in the first few rows, as shown below:
32
4.
5.
6.
7.
Step 2—Working with spreadsheet data
Click to select cell B4.
Right-click and select Delete… from the pop-up menu. In the dialog, select Shift cells
up. Click on OK.
Now select Edit ➪ Undo and repeat step 5, this time selecting Shift cells left.
Finally, select Edit ➪ Undo and repeat step 5, this time selecting Entire row.
This exercise should give you an idea of what you can do. In your own time, try the
corresponding commands from the Insert… option on the pop-up menu. When you’ve
finished, keep the workbook open, as we’ll use it in the next exercise.
Inserting and deleting cells, rows and columns
Using the workbook you were using in the previous exercise, try this:
1.
2.
3.
4.
5.
6.
Click on the title of column C to select the entire column.
Select Insert ➪ Columns.
This command inserts as many columns as are currently selected to the left of the
current selection, moving the remaining columns to the right.
Now select Edit ➪ Undo and click on the titles of columns C, D and E to select them.
Select Insert ➪ Columns.
This time, because you had three columns selected, Excel has inserted three new blank
columns.
Now select Edit ➪ Undo and click on the title of row 4 to select it.
Select Insert ➪ Rows.
As you can see, Excel works the same way when inserting rows as when inserting columns.
Undoing changes
Just as with Word, Excel has two matching commands, Undo and Redo. You can find them
in three different ways:
■
■
■
From the Edit menu.
Using the
and
icons on the Standard Toolbar. These have pop-up menus
that allow you to undo or redo more than one command at a time. (If you have the
Standard and Formatting toolbars displayed on the same row, the
button is
obscured.)
Using the shortcut keys Ctrl + Z (Undo) and Ctrl + Y (Redo).
Excel saves all the changes you make in an editing session, and you can undo all of them at
any time.
Editing cell data
33
Creating automatic series
The final editing technique you need to know about in Excel is referred to as auto-fill. Excel
offers this for use with adjacent cells to provide you with a very simple way of constructing
series of numerical values—whether they are numbers or dates. Try the following short
exercise:
1.
2.
3.
4.
5.
6.
Close your current workbook, if you have one open, discarding the changes.
Open a new blank workbook.
Click in cell A1 to select it.
Enter 1 Return 2.
Now drag to select the first two rows.
Move the mouse cursor over the auto-fill handle—this is the dark square at the lowerright of the highlighted cells. The mouse cursor changes to a + sign:
7.
Click and drag downwards for ten or so cells. You should now see something like this:
Excel has looked at the two cells you copied, and found that they consisted of a numerical series with an increment of 1. It has therefore continued the series in the destination cells. The icon to the lower-right of the destination cells contains a set of auto-fill
options. Click in it to see what’s there. The option Fill Series is the one that Excel has
just performed for you.
As a further exercise, repeat step 7 with the
values:
■
■
■
0 and 10
‘Mon’ and ‘Tue’
12/12/06 and 13/12/06
Tip
Auto-fill works in the same way if you
drag to fill rows rather than columns.
34
Step 2—Working with spreadsheet data
Look at the auto-fill options after you have created the series of days and dates. Are they
different?
Searching for data, replacing data
Excel has a powerful Find command, just as Microsoft Word does. Excel’s Find command
allows you to search for numerical values, text, formula results or text in comments.
Searching for data
To demonstrate Excel’s Find command, you need to create a simple worksheet with some
useful contents:
1.
2.
3.
Close your current workbook, if you have one open, discarding the changes.
Open a new blank workbook.
Click on cell B3 to select it, then enter the following data exactly as shown:
12 Tab =12 Tab This cell contains 12 Return =12+14 Tab '12 Return
4.
5.
Don’t miss the apostrophe from the last number.
Click in cell D4 and select Insert ➪ Comment. Enter 12 in the comment window, then
click outside the window to close it.
This populates the worksheet as follows:
Cell
Contents
B3
The numerical value 12
C3
A formula containing only the number 12
D3
A text string containing ‘12’ as characters
B4
A formula containing the value 12
C4
‘12’ as characters (the leading apostrophe tells Excel to
treat the entry as characters rather than as a number)
D4
A comment containing ‘12’ as characters
Click in cell A1 to select it, then select Edit ➪ Find…
Excel displays the Find and Replace dialog, as shown in Figure 2.1.
Searching for data, replacing data
Figure 2.1
35
Excel’s Find and Replace dialog
6.
Enter 12 in the Find what field, then click on Find Next.
Excel advances the cursor to cell B3, and the formula bar displays its contents.
7. Click again on Find next. Excel finds the formula result of 12 in cell C3.
8. Repeat step 7 to find the characters ‘12’ in the text contained in cell D3.
9. Repeat step 7 to find the numerical value 12 in the formula in cell B4.
10. Repeat step 7 to find the character ‘12’ in cell C4.
11. Click on Find next again. Note that the ‘12’ in the comment in cell D4 is not found. This
is because by default Excel does not search in comments.
12. In the Find and Replace dialog, click on Options>>. Excel expands the dialog, as in
Figure 2.2. Note the options for controlling the search order by columns or by rows,
and for widening a search to the whole workbook.
Figure 2.2
Excel’s expanded Find and Replace dialog
13. Use the widget next to the Look in field to select Comments, then click on Find next.
Excel now finds the characters ‘12’ in the comment in cell D4—even though the
comment is not displayed.
14. Use the widget next to the Look in field to select Formulas, then click on Options <<.
This sets the find command back to its default.
15. Finally, click on Find All. The Find and Replace dialog expands to show a list of all the
cells that contain ‘12’, as Figure 2.3 shows.
36
Step 2—Working with spreadsheet data
Figure 2.3
Excel’s Find All feature in action
If you click in the list of found items, Excel selected the relevant cell.
Keep this workbook open, as we will use it in the next section.
Using the replace command
As you might imagine, replacing using the Find and Replace dialog is hardly more difficult
than using it to find data.
1.
2.
3.
4.
5.
6.
Close the Find and Replace dialog, if you left it open at the end of the last exercise.
Click in cell A1 to selected it, then select Edit ➪ Replace…
Excel displays the Find and Replace dialog with the Replace pane selected.
Enter 12 in the Find what field, and 14 in the Replace with field.
Click on Find next. Excel advances to cell B3, the first occurrence of 12.
Click on Replace.
Continue to do this, watching the formula bar, as you click on Replace four more times.
Do you notice anything interesting? Although each of the five occurrences of the number
12 has a different context, as the table on page 34 shows, Excel is clever enough to replace
it with 14 in the correct context for each occurrence.
You can discard this workbook now, as we have finished with it.
Sorting data
Sorting numerical values is often useful, mainly because it makes lists of items easier for
humans to understand. For example, if you are using Excel to display tables of values, you
can use it to sort the tables into ascending or descending order.
Sorting data
37
Excel offers you two ways to sort data:
■
■
A quick method using the sort buttons. This works for single columns of data only.
Using the Sort dialog. This gives you complete control over simple and complex sorts.
First we’ll try a simple sort:
1.
2.
3.
4.
Close your current workbook, if you have one open, discarding the changes.
Open a new blank workbook.
Click to select cell B3.
(Why not A1? Just because it’s a bit easier to see what’s going on if you’re not working
against the row and column headers all the time.)
Enter the following data:
12 Return 1 Return 24 Return 23 Return 15 Return
5.
6.
7.
Click to select any of the cells that have numerical contents.
Click on the sort button
in the Standard toolbar. Excel sorts the column of numbers
in ascending value.
The
button produces a sort in descending order. Try it now.
Note that Excel is clever enough to work out
which set of numerical values you want to sort—
you don’t usually have to select all the cells to be
sorted explicitly.
Now for more complex sorts, using two columns
of data:
1.
2.
3.
4.
Note
You can only sort data by one or more
columns—you cannot sort data by
rows.
Close your current workbook, if you have one open, discarding the changes.
Open a new blank workbook.
Click to select cell B3.
Enter the following data:
Peter Tab 2500 Return Mary Tab 1233 Return Joe Tab 4500 Return
Mike Tab 3422 Return Al Tab 5600
5.
6.
7.
You can think of this as maybe monthly revenue per salesperson, or something relevant
like that.
Click in cell B5 (or any cell containing data in column B).
Click on the sort button
in the Standard toolbar. Excel sorts the two columns of
data, using the first column to determine the sort order (alphabetical).
Select Edit ➪ Undo to remove the sort, then click in cell C5 (or any cell in column C
that contains data).
38
Step 2—Working with spreadsheet data
8.
Click on the sort button
in the Standard toolbar. Excel sorts the two columns of
data, using the second column to determine the sort order (numerical).
9. Select Edit ➪ Undo to remove the sort again, then click and drag to select cells B3 to B7.
10. Click on the sort button
in the Standard toolbar. Excel displays a warning dialog, as
shown in Figure 2.4. This is because it senses that you are trying to sort only part of a
data set, which would produce invalid results.
Figure 2.4
Excel’s Sort Warning dialog
11. Click on Cancel, but keep the worksheet open for the next exercise.
Finally, we’ll show you how to set up a sort of multiple columns:
1.
2.
Drag to select the range of cells B3 to C7.
Select Data ➪ Sort… Excel displays the Sort dialog, as shown in Figure 2.5.
Figure 2.5
3.
Excel’s Sort dialog
Click on the widget next to the Sort by field. Note that Excel is offering to sort by the
first column or the second column. If there were more columns of data in your
selection, you would have an option for each column.
This dialog allows you to select a secondary sort by using the Then by field. This will
only have an effect if you have more than one item in the first sort column that has the
same sort order (in our case, for example, two rows for Mike).
Sorting data
4.
39
Click on OK to perform the sort.
You’ve now used both types of sort that Excel offers. Finally, as exercises:
■
■
Done!
Insert some extra rows to extend your data set with several entries for each person,
then use the Sort dialog to perform a sort using the Then by field to establish the
secondary sort order.
Use cells B2 and C2 to add the headings ‘Salesperson’ and ‘Order Value’. Use the Sort
dialog again, selecting these headings also, but clicking in Header row to tell Excel that
it must exclude the header rows from the sort.
40
Step 2—Working with spreadsheet data
Review
In this step, you learned that:
■
■
■
■
■
■
■
■
■
■
■
■
You can select ranges of cells, whole rows and columns, and non-adjacent selections.
You can move data between cells using dragging.
You can copy and paste data between cells.
You can use several methods to edit data in cells, including the formula bar.
You can easily delete data from a group of cells.
Excel edits relative cell references when cell contents are copied or moved.
Excel has a multi-level undo command.
You can insert or delete whole rows and columns.
Excel can create a series of consecutive data items automatically.
You can add comments to a cell.
Excel has tools that allow you to search for data and replace it.
Excel allows you to do simple and complex sorts.
Quiz
1.
2.
3.
4.
5.
6.
7.
8.
What is the purpose of a cell format in Excel?
How could you copy the contents of column B and column D at the same time?
How would you copy a block of cells from one worksheet to another within the same
workbook?
What happens to cell references when you move or copy a formula?
How does Excel use colour to make editing formulae easier? Try it to remind yourself.
If you entered 1/3/05 in a cell, selected the cell and duplicated it by dragging, what
would the new cell contain? Why?
By default, a search in Excel finds all the different kinds of data you can put in a cell
with one exception. What is the exception?
We sometimes refer to complex sorts using the terms major and minor sort, or primary
and secondary sort. What feature in Excel’s Sort dialog allows you to set up a minor
sort?
Using spreadsheet
formulae
STEP
3
Checklist
■
■
■
■
■
■
■
Using functions in Excel
Creating formulae
How Excel processes formulae
Relative and absolute cell references
Mixed cell references
Excel error messages
Conditional functions—making decisions
Y
ou have now covered the basics of Excel: the user controls, creating and saving
workbooks, and entering and editing data. The power of Excel, however, comes
from its ability to calculate the results of formulae, display them in cells, and use
those results in other formulae. This is what we will concentrate on in this step.
Using Excel formulae
You have already learned that a cell whose contents start with ‘=’ is interpreted by Excel as
a formula. Excel will try to calculate the results of any formula it finds and displays the
results in the cell. But how can you create formulae? Excel offers you four ways:
■
■
■
■
Entering a formulae directly into a cell.
Entering a formula using the formula bar.
Building up formula by clicking on the cells you wish to include.
Pasting Excel functions into a formula.
We will describe these in the sections that follow.
42
Step 3—Using spreadsheet formulae
Excel functions
Excel functions provide the real mathematical power of Excel. A function in Excel is an
expression that calls a piece of code dedicated to a specific purpose. For example, the
formula:
=SUM(A1:A4)
calls the function SUM() to return the total of the cells A1, A2, A3 and A4, that is:
A1+A2+A3+A4
Excel contains over two hundred functions, which allow you to calculate results that would
be far too complex and tedious to program into a worksheet by hand. You can see this if you
select Insert ➪ Function… in a blank worksheet, then set Or select a category in the Insert
Function dialog to All. Many of them you will never use, as they are dedicated to complex
mathematical calculations that you are unlikely to encounter—at least, not yet. Some, such
as the SUM() function described above, are essential.
Excel’s functions are grouped by purpose, as the pop-up menu adjacent to the Or select a
category field in the Insert Function dialog shows. Most of the categories are selfexplanatory:
Category
Includes
Database
A set of functions for calculating data from an embedded
database, or ‘look up’ list. Excel allows tables of data to be
embedded in a worksheet, as we mentioned in Working with
worksheets on page 10.
Date and Time
Functions to convert or display anything to do with dates, hours,
minutes and seconds, for example NOW(), which returns the
current data and time.
Financial
A set of functions to calculate common financial values, such as
the total cost of a loan, the future value of an investment, or the
required interest rate for a loan.
Information
A set of functions that are mainly concerned with returning information about the state of other cells. For example ISBLANK(),
which returns FALSE if a cell or range of cells has contents, else
TRUE.
Using Excel formulae
43
Category
Includes
Logical
A set of functions for combining logical expressions, such as
AND(), OR(), IF(), and which return the values TRUE or
FALSE.
Lookup and
Reference
A set of functions for extracting data from look-up tables within
a worksheet, or information about the current cell. Examples of
the latter are ROW() and COLUMN(), which return the row
and column numbers of the cell containing the current formula
(i.e. “What row or column am I in?”).
Maths and Trig
A set of functions to calculate common mathematical and trigonometrical values, such as sine, tangent, cosine, square root, sum
of squares.
Statistical
A comprehensive set of functions to calculate values used in
statistical analysis, such as average, maximum, minimum or n-th
largest of a set of numbers, as well as more complex functions
such as the χ -squared, Poisson distribution and Student’s t-distribution tests.
Text
A set of functions to process text, for example to make one
length of text from text in multiple cells, to convert numbers to
text, or to convert text to upper or lower case.
We will demonstrate some of the more common functions in the examples in the sections
that follow.
Creating formulae
First we’ll repeat the simple exercise we first did on page 3, but with some changes to
illustrate the different ways to enter formulae in Excel:
1.
2.
3.
4.
Open a new blank workbook.
Click in cell B3 to select it.
Enter Eggs Tab 1.25, then press Return.
Notice that the cell below your starting cell is now highlighted. This is because Excel
has decided—because you pressed Return—that you are probably entering a list of
items.
Enter:
Flour Tab 1.1 Return Potatoes Tab 0.85 Return Meat Tab 2.26.
44
Step 3—Using spreadsheet formulae
Here’s what things should look like now.
5.
6.
7.
8.
9.
Click in the cell two below Meat and type Total Tab.
Click in the formula bar and type ‘=’
Now click in cell C3. Note that Excel has entered ‘C3’ in the formula bar.
Enter ‘+’ and then click in cell C4.
Repeat this to build up the following formula:
=C3+C4+C5+C6
Here we are, of course, adding the contents of the cells. We could just as easily use any
of Excel’s other mathematical operators:
+
Add
-
Subtract
*
Multiply
/
Divide
10. Press Return.
Excel closes your editing session in the formula bar, calculates the total of the formula
and displays it in cell C8.
Now we’ll edit the total to use the SUM() function. We can still select cells by clicking,
though:
1.
2.
3.
4.
5.
Click in cell C8 to select it.
In the formula bar, drag to select C3+C4+C5+C6.
Select Insert ➪ Function…
In the Insert Function dialog, enter sum in the Search for a function field, then press
Return. Excel will select the SUM() function.
Click on OK.
Excel displays the Function Arguments dialog. If all is well, it will select the range of
cells C3:C7 for you, as Figure 3.1 shows. Note that Excel has already calculated the
result of the SUM() function and displayed it in the dialog.
The button adjacent to the Number fields allows you to select a range of cells by click-
Using Excel formulae
Figure 3.1
6.
45
Function Arguments dialog for SUM()
ing and dragging. Try it now to see how it works.
When you have finished experimenting, click on OK to close the Function Arguments
dialog.
Entering a function like this might seem a bit long-winded for something as simple as
SUM(), but it’s really useful for functions with more, or more complex, arguments, or for
functions with which you’re not familiar.
Keep this workbook open for the moment, as we’ll add to it in the next step.
Some more functions
Next we’ll add a few more useful functions to our shopping list to show the cheapest and
most expensive items, and the number of items in the list:
1.
In the worksheet you used in the previous section, select cell B10 and enter:
Costliest Tab =MAX(C3:C6) Return
2.
Note that as soon as you enter the ‘(’ for the function MAX(), Excel prompts you with
the correct syntax for the function.
As you can see, the MAX() function displays the highest value from a range of cells.
Now enter:
Cheapest Tab =MIN(C3:C6) Return
3.
You can see from this what the MIN() function does. Now enter:
No. of items Tab =COUNT(C3:C6) Return
4.
The COUNT() function returns the number of cells from the specified range that
contain numbers. It ignores cells that contain text or logical values.
In row 13, enter:
Average cost Tab =AVERAGE(C3:C6) Return
The AVERAGE() function returns the number that is the average of the contents of
46
Step 3—Using spreadsheet formulae
the cells in the specified range. As these cells contain the values 1.25, 1.1, 0.85 and 2.26
in our example, the average returned will be:
(1.25 + 1.1 + 0.85 + 2.26)/4
5.
which is 1.365.
Save and close the workbook, as we’ll use it again later.
The order of processing of formulae
When you write formulae in Excel, you need to remember that it has a predefined order of
priority for processing mathematical expressions. What we mean is that:
=3+4*12
in Excel give the answer 51—that is, Excel gives the multiplication a higher priority than the
addition, so does it first. So this expression is equivalent to:
=3+(4*12)
and not:
=(3+4)*12
which would give the answer 84. Excel uses the following order of priority when executing
formulae:
Priority
Operator
Description
Highest
Colon, comma
Cell references, for example ‘C3:C6’
-
Negation, for example ‘-1’
%
Percentage, for example ‘20%’
^
Exponentiation, for example ‘2^3’ (this means ‘2
cubed’, i.e. 2*2*2)
* and /
Multiplication and division
+ and -
Addition and subtraction
&
Join text strings (‘concatenation’)
= < > <= >= <>
Comparison: equal, less than, greater than, less than
or equal, greater than or equal, not equal
Lowest
Using relative and absolute cell references
47
You can override this order of priority by using brackets. Excel will first evaluate the
expression in the innermost pair of brackets, using the priority shown above, then the next
pair of brackets, and so on. If it finds two mathematical operators with the same priority,
such as multiplication and division, it evaluates the formula from left to right.
Using relative and absolute cell references
You have seen how a formula in Excel can refer to the contents of other cells. You also saw
in the previous step how Excel helpfully edits cell references when you copy or move
formulae (refer back to How Excel handles cell references when cells are copied or moved on
page 28 if you need to). These references are written in the form:
cell row:cell row
For example:
C3:C5
Suppose however that you don’t want Excel to do this. Consider the case in which a cell
contains a number that you always want Excel to use, no matter how formulae that
reference it are copied or moved. Such a value might be something like a currency
conversion, or any fixed value you want to use in other calculations.
To demonstrate this, we’re going to extend our shopping list so that it displays prices in both
pounds sterling and euros:
1.
2.
3.
4.
Reopen your shopping list workbook, if it’s not still open from the previous section.
First, add the titles ‘Item’, ‘Pounds’ and ‘Euros’ in cells B2 to D2.
Drag to select these cells again, then click on the button in the formatting toolbar to
set the titles to bold.
In cell F2, enter:
Euros per Pound Tab 1.52118 Return
5.
(or substitute the current conversion rate)
You can probably only see part of what you typed, as column F will be too narrow to
display the entire phrase. Move the mouse cursor over the boundary between the titles
for columns F and G, then click and drag to make column F wide enough.
48
Step 3—Using spreadsheet formulae
Your worksheet should now look something like this:
6.
Click in cell D3 and enter the following:
=C3*G2 Return
7.
8.
This calculates the price of your eggs in Euros, and the result is displayed, which will
be €1.901475 if you used the exchange rate of €1.52118/£1.
Now click again in cell D3, and using the technique you learned in Moving and copying
data using dragging on page 24, drag to copy its contents to cells D4 to D6.
Not quite what you expected, maybe? As you can see if you select cells D4, D5 or D6,
Excel has changed the reference to cell G2, which contains your conversion rate, to G3,
G4 and G5. However, this is not what you want to happen—you want Excel to use the
contents of cell G2 for all the conversions. Here’s how to stop this happening…
Select cell D3 again. Using the formula bar, change the cell’s contents to:
=C3*$G$2
This form of cell reference, ‘$G$2’, is known as an absolute reference. The ‘$’ signs tell
Excel never to change the cell reference, no matter how often it is moved or copied—
it will always reference cell G2.
9. Repeat step 7. This time you should get correct results in euros for all your items.
10. To complete this exercise, we’ll visit the formatting dialog to set the decimal spaces of
the euro figures to 2.
Select cells D3 to D6, then select Format ➪ Cells… In the Format Cells dialog, select
Number. The number of decimal places should default to 2, so just click on OK.
We’ll have more to say about cell formatting in Step 4. Before you leave this step, try the
following exercises on your own:
■
■
Copy cells C8 to D8 and C10:C11 to D10:D11 to see how Excel handles absolute
function references.
Change the euro conversion rate by changing the value in G2 and watch Excel work for
you!
Using mixed cell references
You can use the ‘$’ notation to make either the
column, the row, or both, references absolute.
For example, a cell reference of ‘$G2’ would
ensure that Excel never changed the column, but
could change the row, when such a reference was
moved or copied.
When you have finished, save your worksheet for
later.
49
Tip
When you are editing a formula in the
formula bar, the F4 key allows you to
toggle between all the combinations
of absolute, row-absolute, columnabsolute and relative references. Excel
is usually clever enough to work out
which reference to change.
Using mixed cell references
We have described how you express a range of cells in Excel. For example, the formula:
=SUM(A1:A4)
is the same as
=SUM(A1,A2,A3,A4)
You might wonder how you express multiple ranges. For example, suppose you wanted to
tell Excel to calculate the sum of cells A1 through A4 and D2 through D6? It’s easy—you
do it like this:
=SUM(A1:A4, D2:D6)
Try this now for yourself, using a blank
worksheet to experiment with. You can select
non-adjacent ranges of cells such as this by:
■
■
■
Clicking and dragging to make the first
selection
Holding down the Ctrl key
Clicking and dragging to make the second
selection.
Tip
You can ‘nest’ Excel functions. For
example:
=SUM(A1:A12,SUM(B1:B12))
means the same as:
=SUM(A1:A12)+SUM(B1:B12)
Understanding Excel error messages
From time to time—although hopefully not too often—Excel will display an error message
in a cell instead of the answer you expect. This is fairly common when working with
formulae. For example, if you enter something like:
=C2*D2
in cell E2, but cell C2 contains text, Excel will display #VALUE! in E2. This is Excel’s way
of telling you that it can’t make sense of what you are trying to do (you can’t multiply text!).
50
Step 3—Using spreadsheet formulae
Excel can display a wide variety of error messages. Those you are most likely to encounter
are:
Message
Meaning
#####
Excel cannot display the cell’s contents, usually because the column is too
narrow for the format selected.
#VALUE!
Excel cannot calculate a formula, usually because one or more of the
values for the formula is of the wrong type.
#DIV/0!
You are trying to divide by zero. This is mathematically impossible.
#NAME?
Excel cannot recognise a cell range or the name of a function. This is
sometimes caused by omitting a closing quote from text.
#REF!
Invalid cell reference, for example if you have deleted a cell that is
referred to in a formula.
#NUM!
A function has the wrong type of argument.
Using conditional functions
Clearly we don’t have room, and you don’t have time, to learn about all the functions that
Excel offers. You need to know about the sum, average, minimum, maximum and count
functions as a minimum, which we’ve already looked at.
However, it also requires to have some idea about logical functions such as IF(). By logical,
we mean functions that compare one or more items and produce a result of TRUE or
FALSE. For example, here is a conditional test:
A3>A4
which means ‘the contents of cell A3 is greater than the contents of cell A4’. Obviously, this
can only either be true or false. IF() allows you to include a test like this in a formula. It
returns one of two values in a cell depending on the conditional test. For example:
=IF(condition,Value if true,Value if false)
The value returned by the function can be of any type that Excel supports. For example, it
might be text:
=IF(A3>A4, "Above", "Equal or below")
Using conditional functions
51
To see this in action, we’ll add a column to our shopping list that compares each item to the
average cost that you added in the exercises on page 48:
1.
2.
3.
Reopen your shopping list worksheet.
If you had difficulties adding the average cost values in the exercises on page 48, carry
out step 3 below, otherwise continue from step 4.
Select cell B13, then enter:
Average cost Tab =AVERAGE(C3:C6) Tab =AVERAGE(D3:D6) Return
4.
5.
We want to add a new column for our
Note
conditional test values, so click on the
column title of column E, then select Insert
If a cell that is the destination of an
➪ Columns. Excel adds a new blank column
absolute reference is itself moved as a
for you.
result of editing, Excel updates all the
absolute references to the cell to keep
Notice that your euro/£ conversion rate is
it correct. This is usually precisely what
now in cell G2 and not cell F2. However,
you want it to do.
your amounts in euros are still correct! If
you look in any of the cells D3 to D6, you’ll
see that the absolute reference to G2 has changed to F2.
Select cell E2 and enter:
Above average? Return
6.
7.
Click and drag the column divider between column E and column F to make column E
wide enough to display the whole title.
Select cell E3 and enter:
=IF(C3>$C$13,"Yes","No") Return
8.
You can type this is as written, or click the relevant cells to build up the formula. as
you prefer. Remember that you can use the F4 key to make the reference to cell C13
absolute.
Click in cell E3 again to select it, then copy it by dragging to cells E4 to E6.
This is what your worksheet should look like now:
52
Step 3—Using spreadsheet formulae
Save the changes to your shopping list worksheet at this point. After you have done so,
experiment with changing the amounts in the Pounds column, and see how it changes the
average item cost, and therefore the results in the Above average? column.
I hope you can see from this how you can use the IF() expression to display information
based on a logical comparison. The results of the function can just as easily be numerical.
You could therefore use an IF() expression to display one of two numbers in a cell based on
some logical comparison, and those numbers themselves could be used in a further formula.
Complex relationships can be built up in this way. For example:
Cells A1:A4 contain numerical data
Cell B4 contains =IF(SUM(A1:A4)<12,1,2)
Cell C4 contains =SUM(A1:A4)*B4
With these formulae, cell B4 will contain the value ‘1’ if the sum of cells A1 to A4 is less
than 12, otherwise it will contain ‘2’. Cell C4 therefore multiplies the sum of A1 through
A4 by 1 if their sum is less than 12, otherwise by 2.
Although this is an abstract example, this sort of calculation is common in the world of
finance and elsewhere. One example is the case of ‘tiered’ interest rates on a savings
account, in which the interest rate paid depends on whether the balance of the account
exceeds specific thresholds. For example:
Done!
Balance
Interest rate
< £1,000
3.75%
£1,000–£9,999.99
4.0%
£10,000–£99,999.99
4.25%
Without an IF() function, it would be difficult or impossible to model this type of
calculation in a spreadsheet.
Using conditional functions
53
Review
In this step, you learned:
■
■
■
■
■
■
■
■
■
■
■
■
You can enter a formula directly into a cell.
You can add relative cell references to a formula by clicking on cells.
Excel has a command that allows you to paste a function into a formula.
You can edit formulae using the formula bar.
What Excel functions are and how they work.
That over 200 functions are available in Excel, many for special purposes.
How to use the basic mathematical operators in formulae.
You can use the Function Arguments dialog to select the arguments for a function.
The order in which Excel evaluates formulae.
The difference between relative and absolute cell references, and their purposes.
How Excel expresses error conditions.
What conditional functions are, and what they are for.
Quiz
1.
2.
3.
4.
5.
6.
What is the purpose of Excel functions?
What is the main difference between a mathematical and a logical function?
What does the COUNT() function do?
Unless you tell it not to, Excel does addition before multiplication: true or false?
How would you tell it not to?
If cell A1 contained =B1*C$1, and you copied it to cell A2, which would cell A2 then
contain? Why?
7. If you then copy it to cell C7, what will C7 contain? Why?
(If you’re not sure of the answers here, try it on a blank worksheet, then go back to
Using relative and absolute cell references on page 47 and revise it.)
8. What does it mean if a cell contains =AVERAGE(A1:A12,C1:C12)?
9. What should you do if your formula displays #VALUE!
10. What does the function =IF(MAX(A1:A6)>MAX(B1:B6),”Red”,”Blue”) do?
Improving a
sheet’s appearance
STEP
4
Checklist
■
■
■
■
■
■
Choosing and using cell data display formats
Defining your own display formats
Setting text formats and options
Using borders to create forms within worksheets
Concealing data from display
Protecting formulae from accidental change
T
his step is about presentation. Although you’ve constructed a working spreadsheet
with your shopping list example that (almost!) does something useful, it’s a long
way short of what Excel is capable of. In this step we’re going to look at Excel’s
features for formatting numbers and text, highlighting and hiding information, preventing
the contents of a worksheet from accidental change, and generally making your worksheet
look beautiful. At the end of the step, your simple shopping list will have become a fully
formatted interactive form.
Setting display formats for data
Excel supports a huge range of display formats for numerical data, and if they are not
sufficient, you can define your own. You saw how these work in How Excel interprets data
entries on page 21. When you enter numerical data in a cell, Excel examines it, makes an
intelligent guess at what sort of number it is, and applies the appropriate formatting to the
number.
56
Step 4—Improving a sheet’s appearance
However, this might not be what you want in all cases. If you remember from Using relative
and absolute cell references on page 47, when you first added your column of prices in euros,
they looked something like this:
Although we set the decimal places of the Euro column to 2 in that exercise, wouldn’t it
look better if the figures were given the correct currency symbol automatically? Here’s how
to do it:
1.
2.
3.
4.
5.
6.
7.
8.
9.
Reopen your shopping list workbook if you need to.
Select the first cell in the Pounds column.
Select Format ➪ Cells…
Tip
Excel displays the Format Cells dialog.
The shortcut key for Format ➪ Cells…
The dialog contains tabs for Number,
is Ctrl-1, and it’s one that is worth
Alignment, Font, Border, Patterns and
remembering, as you’re likely to use
Protection. We’ll be visiting and using all of
the formatting dialog frequently.
these later in this step.
Click in the Category column to select
Currency, then select £ in the Symbol field, 2 in the Decimal places field, and select the
first format under Negative numbers (we’re not interested in negative numbers here).
Click on OK.
Right-click on the selected cell, C3, which should now display £1.25, and choose Copy.
Click and drag to select cells C4 to C6.
You don’t want to paste the cell’s contents, just its format. To do this, select Edit ➪
Paste Special… Excel displays the Paste Special dialog, shown in Figure 4.1.
As you can see, this gives you huge control over what you can paste, allowing you to
copy any attribute or contents between cells. Here we just want to copy the format, so
click in Formats and then on OK.
We’ll apply the euro formats in one step. Click and drag to select cells D3 to D6. Select
Format ➪ Cells…
This time, select Currency and the € symbol. You will find that there is a huge range of
euro settings for different European countries. These use the appropriate local conven-
Setting display formats for data
Figure 4.1
57
Excel’s Paste Special dialog
tion for putting the currency symbol before or after the number, as appropriate. Select
the setting € English (Ireland) . Click on OK.
Your worksheet should now look like this:
What have we forgotten? We need to add
currency formatting to the maximum, minimum
and average values. Do this now using the Edit ➪
Paste Special… command. You can copy and
paste the formats of both currencies with only
three operations—try it yourself first before
reading the hint next.
Tip
Copy C3:D3, click and drag to select
C8:D11, then Ctrl drag to include
C13:D13. Finally paste formats using
Edit ➪ Paste Special…
When you have finished, save your shopping list workbook, as we’ll be using it again later.
Other useful number formats
Excel has many other numerical formats that are useful in specific situations. Before we
move on to formatting text, this section details some of the more common ones.
58
Step 4—Improving a sheet’s appearance
Using number separators
If you are displaying large numbers, but scientific format is inappropriate, you can tell Excel
to include number separators, so that one million, for example, is displayed as:
1,000,000
Try this:
1.
2.
3.
4.
5.
6.
Open a blank workbook.
Enter a large number in any cell.
Select the cell.
Select Format ➪ Cells… and click on Number in the Category menu.
Set the Decimal places value to 0, then click in Use 1000 Separator to enable it.
Finally, click on OK.
Formatting and using dates
When you enter a number that Excel recognises as a date, it assigns a default format that is
based on the settings in Window’s Regional and Language Options control panel. For
example, if this is set to English (United Kingdom) , entering:
1/1/5
in a cell causes Excel to format it and treat it as:
01/01/2005
that is, the 1st January 2005. Similarly, if you enter:
1-1-5
the same thing will occur. Or if you enter:
1-jan-5
Excel will interpret the date in the same way, but apply a different format:
01-Jan-05
It’s important to know that Excel handles all time and date variables in an identical way
internally. This is to allow it to carry out arithmetic on time and date values without you
having to write any complex expressions. Excel’s internal time/date format treats time as
starting from midnight on 1st January 1900. (Most of the time you don’t have to be aware
of that, although it does mean that you cannot calculate with dates earlier than 1900
directly.)
Setting display formats for data
59
Here’s a short exercise to show different date formats:
1.
2.
3.
4.
5.
6.
Start with a blank worksheet.
Select any cell and enter 1/1/0 Tab (1st January 2000)
Note how Excel formats the date when you
Note
press Tab.
Reselect the cell and then select Format ➪
It’s very important to realise that the
cell’s format only affects the way a
Cells… Note that Date is already selected as
numerical value is displayed. Excel
the cell format’s Category.
always
holds numerical data in the
Click to examine the Locale menu. This is
same format internally.
where you can select date formats
appropriate to other countries if you need
to.
Scroll to the last option in the Type list, 14 March 2001, then click on OK.
Time and date arithmetic
Excel allows you to add and subtract dates and times without further complication.
You can even multiply and divide them, although the results can be meaningless!
However, Excel’s ‘persistent’ formatting can be confusing here. To demonstrate this:
1.
2.
Open a blank workbook.
In cell A1, enter the following:
1/1/04 Return 2/1/04 Return
3.
In cell A3, enter:
=A2-A1 Return
4.
What’s this? A3 now contains ‘01/01/1900’. What’s going on?
In fact the result is correct, but the problem is that Excel has taken the automatic
date format from A1 and A2 and applied it to A3. Logical, but wrong.
Using Format ➪ Cells… apply the General format to A3.
Now you get the correct answer, 1 day.
Calculating and formatting percentages
Percentage values are used a great deal in business. Excel makes it easy to calculate and
format percentages. In fact, all that Excel does when you apply a percentage format to a
cell’s contents is to multiply the value the cell contains by 100 before it displays the result.
Similarly, if you enter a value in a cell that has a percentage format applied, Excel divides
that number by 100 internally before using it in calculations.
60
Step 4—Improving a sheet’s appearance
To see how this works in practice:
1.
2.
Start with a blank worksheet.
Click in A1 to select it, then enter:
12 Return 4 Return
3.
4.
In A3, enter =A2/A1
A3 now contains the content of A2 divided by the contents of A1, or 3.3333.
Select A3 again, then select Format ➪ Cells…
In the Format Cells dialog, select the Number tab, then select Percentage from the list
of formats. Click on OK.
A3 should now display 33.33%. This is the percentage that 4 is of 12, i.e. one third, or
33.33%.
So, to work out what percentage a number A is of a number B, divide B by A and apply a
percentage format to the result. You can apply the percentage format easily by clicking on
the
button in the formatting toolbar, although this restricts you to whole numbers only.
Here’s how to calculate and display what a given percentage B of a number A is:
1.
2.
3.
4.
Click in A1 and enter the number A. Click Return.
In cell A2, select Format ➪ Cells…
In the Format Cells dialog, select the Number tab, then select Percentage from the list
of formats. Click on OK.
Enter your desired percentage in A2, then click on Return.
In A3, enter =A1*A2 Return.
A3 will now display the number that is the percentage A2 of the number in A1. For
example, if A1 contains 200 and A2 contains 33%, A3 will display 66, or one-third,
33%, of 200.
These simple exercises show how Excel’s handling of percentages makes it easy to calculate
and display them. As you can see, the percentage format both:
■
■
Converts a decimal fraction into a percentage for display.
Converts an entered percentage into a decimal fraction, so that the percentage can be
calculated using multiplication.
Defining your own formats
If none of the display formats meet your needs, you can add your own. For example, assume
that you want to add a word to describe units such as weeks. You might want to do this for
a calendar or some other form that listed week numbers.
Setting display formats for text
61
It’s easy to do:
1.
2.
3.
4.
In a blank cell, enter the number to be displayed, say 12.
Select Format ➪ Cells…
In the Format Cells dialog, select the Number tab, then select Custom from the list of
formats.
Under Type, select 0. This will display whole integer numbers only.
Click in the editing window beneath Type and enter "Week" and a space before the
zero. Click on OK.
Your week number should now display as Week 12. Excel will remember this format and
save it with the current worksheet.
Excel allows you to create complex custom formats for display of date, time and numerical
information. For example, you might need a special format for a product code, something
like 12-453678-AW. This is possible in Excel. Equally, you can define a format that displays
one text legend if a number is positive, another if the number is negative, such as ‘Profit’
and ‘Loss’.
The formatting codes that are available are well described in Excel’s on-line help under
‘Number format codes’. Take a few moments now to browse the help and see what’s
available.
Setting display formats for text
We mentioned on page 56 that the Format Cells dialog contains tabs for Number, Alignment,
Font, Border, Patterns and Protection. This is where you get to find out all the interesting
things they do.
Setting font styles
You have already come across the
button in Using relative and absolute cell
references on page 47, used to set headings and similar items in bold. Similarly, the
italic and underline buttons allow you to add these effects quickly.
If you want to go beyond this, a full set of text formatting functions similar to Word’s are
located in the Format Cells dialog. We’ll use them here to change the fonts in your shopping
list workbook:
1.
2.
3.
Reopen the shopping list workbook.
Click on the select all button.
Select Format ➪ Cells…
In the Format Cells dialog, select the Font tab, then choose a
different font in the Font list. Use a serif font such as Book Antiqua, Garamond,
62
4.
5.
Step 4—Improving a sheet’s appearance
Georgia or Palatino. (The exact fonts installed on your computer may vary.)
Select a smaller font size, for example 9 point, under Size.
Click on OK. Excel applies your choice of font and size to the entire worksheet.
Note that the titles that you previously set in bold are still bold—Excel has applied the
relevant bold font to the titles.
Save your shopping list workbook with the changes, as we’ll be using it again later.
One style in the Format Cells Font pane that you may not have come across before that is
quite important is ‘double accounting’. This is used on financial reports to highlight final
totals—while single underline is used for subtotals. These styles differ from the standard
single and double underline in that they place more space between the number and the
underline. We’ll use one now to highlight our shopping list totals:
1.
2.
3.
Re-open your shopping list workbook if you need to.
Click and drag to select the two totals figures, which are probably cells C8:D8.
Select Format ➪ Cells…
4.
In the Format Cells dialog, select the Font tab, then select Double Accounting in the list
beneath Underline. Click on OK.
Your worksheet should now look something like this. The font used in this illustration is 9point Book Antiqua:
Save the changes you have made to the workbook.
Setting colours and backgrounds
So far we have steered clear of decorative effects in Excel. However, you won’t be surprised
to hear that it has them a-plenty. What is more surprising is that they can be very useful, for
example for highlighting specific areas or figures within a worksheet.
Setting display formats for text
63
For example, your shopping list, although only simple, has three different areas:
■
■
■
The list of items
The totals line
The statistics section.
In this exercise, we’ll add coloured backgrounds to make these more distinct:
1.
2.
3.
4.
5.
6.
7.
Re-open your shopping list workbook if you need to.
Click and drag to select the items list and
Tip
their titles. These are probably cells B2:E6
in your worksheet.
When highlighting cells, stick to pale
pastel shades to avoid reducing the
Select Format ➪ Cells…
contrast of the text.
In the Format Cells dialog, select the
Patterns tab, then choose a colour to
highlight the selected cells. Click on OK.
Repeat step 3 for the Total line, using a different colour if you want to.
Repeat step 3 for the Costliest, Cheapest, No of items and Average cost cells, again using
a different colour if you want to.
Finally, we’ll change the colour of the actual
Tip
totals figures. This is done using the Font
pane of the Format Cells dialog, so…
Coloured text or numbers, as opposed
to tinted areas, are most useful to
Select the two totals figures only, probably
indicate status information such as
cells C8:D8 in your worksheet.
positive or negative amounts. You can
Select Format ➪ Cells…
include colour in this way in custom
In the Format Cells dialog, select the Font
number formats—see Excel’s help on
tab, click on the widget adjacent to the Color
‘Number format codes’.
field, and choose a colour. Click on OK.
Save the changes to your shopping list workbook.
Setting text alignment, wrapping and direction
Hopefully by now your humble shopping list is starting to look quite professional. You may
have noticed that the numbers are aligned to the right of their respective cells, while the
text, such as the titles, is aligned to the left. These are Excel’s default settings, but they are
easy to change.
64
Step 4—Improving a sheet’s appearance
You can set test alignment quickly and easily using the left, centre, and right
alignment buttons in the Formatting toolbar. Alternatively, the Alignment pane of
the Formatting Cells dialog gives you full control. In the exercises below, we’ll use both:
1.
2.
3.
4.
5.
6.
7.
Re-open your shopping list workbook if it is not already open.
Click and drag to select the titles Pounds and Euros.
Click on the right-align button
Click and drag to select the Above average? title and the No/Yes cells below it.
Click on the right-align button
again.
The Above average? column looks better now, but we’re still not quite happy with it.
Would it look better if it were narrower?
Click on the column title (E in our examples) to select the whole column.
Right-click and select Column Width… Excel displays the Column… dialog:
Enter a value of 8 and click on OK.
Can you see what’s happened? We now cannot see the whole of the Above average?
title. However…
9. Select the cell containing the Above average? title.
10. Select Format ➪ Cells… and click to select the Alignment pane.
11. Click in Wrap text to select it, then click on OK.
8.
Note how the text has wrapped, and that the row height has increased to accommodate it.
Placing text across several columns
Next we’ll add a banner heading to span several columns:
1.
2.
3.
Click in B1 to select the cell.
button to set the
Enter Shopping List Tab, then reselect cell B1 and click on the
words in bold.
Now click and drag to select cells B1:E1, then click on the merge and centre button
The cells are merged, and centre alignment is applied to the title in cell B1.
When you have finished, save your shopping list workbook.
Using cell borders
65
Excel remembers that the title was originally in cell B1—if you reselect cells B1:E1 and click
on the
button again, the cell merge is reversed. You could have achieved the same result
by:
1.
2.
3.
4.
5.
Selecting cells B1:E1.
Selecting Format ➪ Cells…
Clicking on Alignment.
Selecting Center for Horizontal.
Clicking in Merge cells to select this option.
You’ll find that the
button saves a lot of time here!
Setting text direction
Before we leave this topic, select Format ➪ Cells… again and click on the Alignment pane.
Note the Orientation selector.
Click and drag to set
text alignment…
…or enter a numerical
angle in degrees here
Figure 4.2
The Alignment pane of the Format Cells dialog
This allows you to set the angle at which text is displayed. For example, you could merge
several cells in a column and set text alignment to 90 degrees to place text vertically.
Using cell borders
We used coloured fills to highlight the different areas of our simple example worksheet. For
some applications, such as forms, making areas of a worksheet look like a table or form is
more appropriate. You do this using cell rulings, which Excel refers to as ‘borders’. These
66
Step 4—Improving a sheet’s appearance
offer useful visual cues, for example to help users understand which areas of a worksheet
are for data entry, and which contain calculated results.
Here is an example, taken from the Loan Amortization template supplied with Microsoft
Office XP. This is optionally installable into the Spreadsheet Solutions folder for Excel
templates. We have adapted it only by changing the currency symbols from ‘$’ to ‘£’.
Figure 4.3
Loan repayment calculator
Note how the worksheet makes use of ruling to provide visual cues. It is not obvious from
this figure, but it also uses shading to denote calculated results.
This is an example of a fully-fledged worksheet designed to be usable ‘out of the box’. It
uses many of Excel’s more advanced features, and it is a worthwhile exercise to install and
examine it. You can do this by:
■
■
■
Selecting File ➪ New…
Clicking on General Templates… in the task pane
Selecting Spreadsheet Solutions and Loan Amortization .
If these extra templates have not been installed, you will be prompted for the installation
CD-ROM. Follow the instructions on the screen.
Now we’ll add some borders to our shopping list to see how it’s done:
1.
2.
Reopen your shopping list worksheet if you need to.
Drag to select cells B2:E6 (or the titles and amounts in your example).
Protecting a sheet’s contents
3.
Select Format ➪ Cells… and click on the Border tab.
Excel displays the dialog shown in Figure 4.4.
Figure 4.4
4.
5.
6.
67
Excel’s cell border dialog
The Presets allows you to quickly set or clear the outer or inner rulings for a group of
cells.
Click on one of the heavier solid line styles
Note
under Style, then on Outline.
Notice how the Border diagram illustrates
You must always select the line style
first, then apply it using a preset or the
the resulting effect.
Border map, rather than the other way
Now select one of the dotted line styles
around.
under Style, then click on Inside.
Click on OK, then save your worksheet.
Although this is only a simple shopping list, you can use the techniques you have learned
here to construct professional-looking worksheets of your own. Only one key technique no
remains to be learned—how to stop other users changing your formulae.
Protecting a sheet’s contents
To create a robust worksheet that can be used by others, you need to use two techniques:
■
■
Hiding cells that contain information you do not want others to see or change
Protect cells that contain formulae from accidental change.
68
Step 4—Improving a sheet’s appearance
This section shows you how achieve this. We will, as before, use our simple shopping list
example, but the techniques are applicable to spreadsheets of any complexity. There are
two main ways of concealing information in Excel:
■
■
Hiding rows or columns
Using a separate worksheet.
Hiding rows and columns
In our shopping list example, we have a couple of cells that are the ‘odd ones out’—the euro
conversion rate. Here’s how to conceal them by hiding the columns:
1.
2.
3.
Reopen your shopping list worksheet if it’s not already open.
Click in the column titles of the columns the data occupies (probably F and G) to select
them.
Select Format ➪ Column ➪ Hide
Excel conceals the selected columns. Of course, one problem with this technique is that you
might forget that the columns were there in the first place!
To reveal the columns again, the easiest method is to select the entire worksheet and then
select Format ➪ Column ➪ Unhide. Do this now.
Why hide rows and columns?
You might be wondering at this point why one would want to hide rows or columns.
You discovered in Using mixed cell references on page 49 that you can ‘nest’ Excel
functions, using brackets, to build up complex formulae. However, many nested brackets make a formula hard to read, edit or understand. A better way to construct
complex formulae is to use multiple cells to calculate different parts of the formula,
referencing the results in subsequent cells. This also makes complex formulae much
easier to test and debug.
If you use this technique, you want to hide these cells from view, otherwise they will
display partial calculations and confuse people who use your worksheet.
Using separate worksheets
The other way to conceal data you don’t want people to see or be able to access is to put it
on a separate worksheet. We’ll do that now with the euros conversion factor:
1.
2.
3.
Reopen your shopping list worksheet if it’s not already open.
Click to select the title Euros per Pound and the conversion factor.
Right-click and select Cut.
Protecting a sheet’s contents
4.
5.
6.
7.
8.
69
Click on the worksheet tab for Sheet 2.
Click anywhere convenient in Sheet 2.
Right-click and select Paste.
Click on the worksheet tab for Sheet 1 again.
Notice that the euros figures are still correct.
Click to select the cell containing the first amount in euros.
The formula bar should show something like this:
=C3*Sheet2!$C$3
This is how Excel expresses references that cross between worksheets.
9. Now right-click on the worksheet tab for Sheet 2, and select Rename.
10. Enter Euros as the worksheet’s name, then click on the tab for Sheet 1.
If you still have a cell containing a euro amount selected in Sheet 1, you will see that Excel
has changed the formula to =C3*Euros!$C$3. Giving worksheets meaningful names like this
is helpful.
Using cell locking and worksheet protection
If you looked at the loan repayment worksheet in the last section, you will have discovered
that you could only enter data where the worksheet allowed you to. You couldn’t even
select other cells.
This is achieved using a feature that Excel calls cell protection. Cell protection allows you to
lock all or some cells in a worksheet, as well an entire workbook. Cell protection consists of
two parts:
■
■
The lock/unlock property of each cell
The protection setting for the worksheet.
For a cell to be non-editable, it must be locked and the worksheet must be locked. In a new
worksheet, all cells are locked by default, but the worksheet is not locked. This means that
you can edit normally within the worksheet. When you apply protection to the worksheet,
therefore, all cells become non-editable.
To make only certain cells editable, you need to clear the locks on these cells, then lock the
worksheet. For example, in your shopping list worksheet, the only cells where you want to
be able to enter data are the items and the amounts in Pounds. All the other values on the
worksheet are calculated—that is, their cells contain formulae. Here’s how to protect the
cells you don’t want to be changed:
1.
Reopen your shopping list worksheet if it’s not already open.
2.
3.
Select the cells that form the Item and Pounds columns, for example cells B3:C6.
Select Format ➪ Cells… and click on the Protection tab.
70
4.
5.
Step 4—Improving a sheet’s appearance
Click in Locked to clear the cell lock flags, then click on OK.
Now select Tools ➪ Protection ➪ Protect Sheet…
Excel displays the Protect Sheet dialog, as shown in Figure 4.5.
Figure 4.5
Excel’s Protect Sheet dialog
This allows you to selectively add back ‘prohibited’ activities to a locked worksheet.
You aren’t interested in partially locked worksheets at this stage, so deselect all options
except Select unlocked cells , then click on OK.
You should now find that you can only select and
edit the cells for items and amounts in Pounds—
everything else is locked. Note that by
preventing users of the worksheet from being
able to select locked cells, you have also
prevented them from viewing those cells’
contents.
To protect an entire workbook, select Tools ➪
Protection ➪ Protect Workbook… This allows you
to prevent others from resizing the workbook’s
window or adding or deleting additional
worksheets.
Warning
You may have noticed that the Protect
Sheet dialog allows you to set a
password that must be supplied
before the worksheet can be unlocked.
If you do this and forget the password,
there is no way that you can then
unlock the worksheet. Ever. Be
careful!
Congratulations—you now have a fully functional, formatted and ‘ruggedised’ spreadsheet.
Admittedly it only does something very simple, but the techniques you have learned are
equally applicable to much more complex problems. There only remains one final touch,
before you save your shopping list—think of it as the icing on the cake:
1.
Select Tools ➪ Options…
2.
Click on the View tab.
Protecting a sheet’s contents
3.
4.
71
Deselect Gridlines and Row & column headers .
Click on OK.
You now have a nice little interactive form that hardly looks like a worksheet at all, as Figure
4.6 shows. To get the gridlines and headers back, just reverse the steps above.
Done!
Figure 4.6
The finished worksheet
72
Step 4—Improving a sheet’s appearance
Review
In this step, you learned that:
■
■
■
■
■
■
■
■
■
■
■
■
■
■
Excel has a wide range of cell formats for numerical, date, time, and financial data.
You can copy and paste formats between cells.
You can add number separators such as commas to make large numbers more readable.
You can add and subtract date information—although you have to be careful about
formatting.
Excel’s formatting for percentages makes it easy to work with them.
You can define your own cell formats, and these can be quite complex.
Excel has similar controls for font, size, and colour as does Word.
You can colour or shade cells or groups of cells, which can provide visual cues for the
worksheet’s user.
Excel has a comprehensive set of controls that allow you to wrap text in cells, span text
across multiple cells, and set text at any angle.
Using cell borders allows you to simulate forms in a worksheet, making it easier to
understand.
Hiding rows and columns is a useful way of storing and protecting complex calculations.
You can use a separate worksheet to store data you don’t want to be displayed.
Excel updates relative cell references when you move data to another worksheet within
the same workbook.
Cell locking allows you to ensure that only cells designed to receive data are editable.
Protecting a sheet’s contents
73
Quiz
1.
2.
What do cell formats do?
If you’re not happy with the format that Excel has applied to a cell, which command
allows you to change it?
3. Name one difference between Excel’s Number formats and its Accounting formats.
4. What is a number separator, and why is it useful?
5. If you entered 12/1/05 in cell A1, 20 in B1 and =A1+B1 in A2, what would cell A2
display?
6. If you entered a number A in A1 and another number B in B1, how would you calculate
and display the percentage that A is of B?
7. What is the difference between setting an underline on a cell’s contents and adding a
lower border to a cell?
8. What does the Orientation selector in the Alignment pane of the Format Cells
dialog do?
9. Why might you want to hide rows or columns in a worksheet?
10. For a cell’s contents to be protected from change, two things must be true. What are
they?
Working with charts
and graphs
STEP
5
Checklist
■
■
■
■
■
■
■
The difference between charts and graphs
How to create a simple pie chart
How to create different types of chart
Adding legends to your chart
Editing charts and graphs
Copying and moving charts and graphs
Adding a linked chart to a Word document
U
p to this point in our work with Excel we have only dealt with numbers and text.
Excel has another huge and very important trick up its sleeve, though—it is very
good indeed at displaying data graphically. Visual display of information is often
a great deal easier for readers to grasp quickly than columns of figures, so it is important to
be able to use Excel’s chart and graph features.
What’s a chart, what’s a graph?
By now you may be becoming alarmed, particularly if you are one of the many of us for
whom mathematics is a tricky, or even terrifying, subject. However, you don’t need to
worry—Excel makes it all very easy. But first we have to define what we mean by chart or
graph:
76
■
Step 5—Working with charts and graphs
Chart is a term that has come to us from America. It tends now to be applied to any
graphical representation of data that is not a traditional graph. For example, the terms
bar chart and pie chart are very common in business:
– A bar chart represents numerical quantities as vertical or horizontal bars in which the
length of the bar represents the size of each value.
– A pie chart represents proportions of a whole, or percentages, as slices of a flat cylinder, or ‘pie’, in which the size of the slice represents that quantity’s proportion of
the whole.
Because Excel is an American product, it tends to refer to all graphical representations
of data as ‘charts’.
■
Graph is a term with a specific mathematical meaning, in which numerical data with
more than one dimension is plotted on as many axes as there are dimensions to the data.
This sounds complex, but it isn’t really. Consider the following pairs of numbers:
1
–
12
2.3
–
24
3
–
15.4
4.5
–
16
Creating a simple chart
77
Such numbers could represent the relationship of one thing to another—it doesn’t matter what at this stage. Here’s what they look like as a graph:
Can you see that it’s much easier to see the relationship between the two sets of values
when they are displayed like this?
Although Excel refers to all graphical displays of data as ‘charts,’ we’ll use the terms in use
in the UK here.
Excel applies the term series to the data used in the charts and graphs above. This is short
for data series, and all it means is a set of related data. For example, your shopping list
consists of a list of pairs of information, in this case items’ names and their prices. This is
what Excel refers to as a data series. Similarly, the list of numerical values in the graph
example is a data series. Each individual data item in a series is referred to as a data point.
Excel has no problems plotting a chart or graph with more than one data series.
Creating a simple chart
Let’s see just how easy it is to create a chart. We’re going to produce the pie chart shown
on the preceding page, which is based on your shopping list workbook. Excel makes it really
easy to do this by providing a Chart Wizard:
1.
2.
3.
4.
5.
Open your shopping list workbook again.
If you left the worksheet that contains the data protected, you will need to clear that
protection, otherwise Excel won’t allow you to add a chart to the worksheet, so…
Select Tools ➪ Protection ➪ Unprotect Sheet…
If the Protection menu shows Protect Sheet… instead, the sheet is already unprotected.
Click and drag to select the items and their corresponding cost in pounds (cells B3:C6).
Select Insert ➪ Chart…
Excel displays the first dialog of the Chart Wizard, shown in Figure 5.1. This allows you
to choose from the many types of graph and chart that are available.
Select Pie under Chart type, then choose the second option, the 3-dimensional
pie chart. Click on Next >.
78
Step 5—Working with charts and graphs
Figure 5.1
6.
7.
8.
9.
Excel’s Chart Wizard—first dialog
In the second wizard dialog, ensure that Series in columns is selected. This means that
Excel will treat each of the two selected columns of data as the two parts of each data
point.
Click on Next >.
Add a title for your chart in the third wizard dialog if you wish, for example Shopping.
Click on Next >.
The fourth and final wizard dialog offers you the choice between:
■ Embedding the chart in the current worksheet
■ Creating a new worksheet and placing the chart there.
Both of these options have advantages and disadvantages, which we discuss below. For
this exercise, accept the default, which is to embed the chart in the current worksheet.
Click on Finish.
Excel creates the pie chart for you and displays it in the current worksheet—probably
obscuring your data. You can click and drag it to a new location if you wish. The chart is
‘live’—it is still connected to your data, as you can demonstrate by entering a new value for,
say, meat. Did the chart change?
Finally, save the shopping list workbook, as we will use it later.
Creating other types of chart
79
Embedded versus floating charts
Whether you choose to embed a graph or chart in a worksheet, or to give it its own
worksheet, depends largely on the design of your application and how you intend it to
be used:
■
■
Embedding a chart in a worksheet allows you to see the chart change as the data
changes. This is useful if you are using the worksheet to analyse data. However, it
can obscure your working area unless you are running Excel on a monitor with a
large screen. It also means that you cannot easily print just the chart. (We deal with
printing worksheets in Step 6.)
Giving a chart its own worksheet leaves you with more working space on your data
worksheet, but means that you cannot see both the data and the chart at the same
time. It does make it easy to print just the chart, however.
Creating other types of chart
You saw in the first dialog of the Chart Wizard that Excel can create
many different types of chart and graph. Some are purely decorative,
others place specific requirements on your data, and do not make sense
if the data does not meet those requirements. For example, X/Y scatter
plots are not meaningful unless each data point has at least two
numerical values. More exotically, ‘bubble’ plots, shown on the right,
relate three sets of numerical values, in which the size of the bubble is
used to represent the third variable.
In the next exercise, we’ll use a bar graph format to display both the
pounds and euros data from your shopping list. This is thus a 2-series
chart, as it displays two sets of numerical data:
1.
2.
3.
4.
5.
6.
Reopen the shopping list workbook if it’s not already open.
Click and drag to select the data in the Item, Pounds and Euros columns, including the
titles.
Select Insert ➪ Chart…
Select the fourth option in the Chart Wizard dialog, for the two-dimensional
bar chart. Click on Next >.
In the second dialog, accept the default, series in columns.
Click on Next >, then click on Next > again to dismiss the data label options, as we don’t
want to change any of these.
In the fourth wizard dialog, click in As new sheet, then click on Finish.
80
Step 5—Working with charts and graphs
Excel displays your 3-D bar chart with values for pounds and euros. However, there’s a
minor problem. Excel has used its ‘intelligence’ to label the vertical axis in pounds, whereas
we want it to indicate both pounds and euros. It should not therefore have any units. Here’s
how to fix this:
1.
2.
3.
Double-click on any value on the vertical axis. Excel displays the Format Axis dialog.
This should looks familiar to you—its Number pane is identical to the Number pane of
the Cell Format dialog.
Under Category, click on Number. Leave the decimal places at 2.
Click on OK.
Now the graph looks as we want it to. To see the tricks Excel allows you to use with 3-D
charts, click on the front right-hand corner of the bar chart to select it, release the mouse,
click again and drag. This might require a few tries, but when successful you should get a
‘wireframe’ outline of the chart. Dragging it allows you to set the relative viewpoint of the
chart—even from below!
In the example shown here, we’ve also set the legends to 16-point Arial Bold, as this text is
more in proportion to the chart itself. We’ll show you how to do that later in this step.
Meanwhile, save the changes to your shopping list workbook.
Adding legends to your chart or graph
You have already seen how to use the options in the Chart Wizard to add legends to a chart,
and how to edit the formats of axes legends. Excel has many options for adding legends to
charts. These tend to be specific to the type of chart or graph you are using. These are
available from the Chart Options dialog, which differs between different chart and graph
types.
Editing charts and graphs
81
To try this out:
1.
2.
3.
Reopen the shopping list example workbook if it’s not already open.
Use the worksheet tabs to make sure that Sheet 1 is displayed.
Right-click on the pie chart and select Chart Options… from the pop-up
menu.
Excel displays the Chart Options dialog.
Warning
4. Click on the Legend tab and experiment
with the different legend positions.
Excel displays different pop-up menus
depending on which part of a chart is
5. Click on the Data Labels tab and experiment
selected. This can lead to some
with the various options.
confusion. For the examples here,
Note that the Percentage option allows you
when we say ‘right-click on the…
to display numerical information that was
chart’, we mean the white space
not available before.
surrounding the chart object, not the
chart itself.
6. When you have finished trying out the
options, close the Chart Options dialog by
clicking on Cancel, then select your 3-D bar chart by clicking on the Chart1 worksheet
tab.
7. Right-click on the chart and select Chart Options…
Note that this time the Chart Options dialog has panes for Axes and Gridlines.
8. Click on the Titles pane and add titles for Chart title (whatever you like) and Amount for
Value (Z) axis .
9. Click on the Legend tab and experiment with different legend positions. Choose
whichever you find most pleasing.
10. Click on the Data Labels tab and experiment with the options there.
11. Click on the Data Table tab and add a data table to the preview to see what it does.
Don’t add it to your graph, though.
12. When you have finished, click on OK to close the Chart Options dialog.
This exercise should give you a good idea of the options available for charts and graphs.
Remember that these vary depending on the type of chart or graph with which you are
working.
Editing charts and graphs
Editing items in charts and graphs is very simple. All you have to do is:
■
Select the item to be edited, right-click and:
– Select the relevant Format option, or
– Select Clear to delete the item, or
82
■
Step 5—Working with charts and graphs
Double-click on the item you want to edit.
We’ll demonstrate this on the pie chart you embedded in your shopping list:
1.
2.
Reopen the shopping list example workbook if it is not already open.
Click on the title, Shopping. Excel displays the text box for the title:
Text box
3.
4.
Click after the word Shopping. You should get a text cursor.
Enter the word List.
Double-click on the legend. Excel displays the Format Legend dialog.
Figure 5.2
Excel’s Format Legend dialog
In the Patterns pane, select a pale grey and click in Shadow.
In the Font pane, change the font to Arial Bold.
In the Placement pane, change the legend placement to Left.
Click on OK.
Double-click on the pie chart object. In Data Labels, select Percentage.
Click on OK.
10. Now double-click on the entire chart. Excel displays the Format Chart Area dialog,
which is similar to the Format Legend dialog.
5.
6.
7.
8.
9.
Editing charts and graphs
83
11. In the Patterns pane, select a pale pastel colour and click in Round corners.
12. Finally, click on OK.
When you have finished, save your changes to the workbook.
Colour is a useful device both for making your worksheet look more attractive and for
drawing attention to specific areas. The enhancements you make are a matter of taste, but
you should always aim for simplicity and clarity.
As an exercise, try some of these techniques on
the bar chart contained in the Chart1 worksheet.
Note that this chart has more objects you can
click on than the pie chart—it has axes and,
because it is a 3-D bar chart, the ‘walls’ and
‘floor’ have their own properties too:
■
■
■
Tip
To change the colour of only one slice
of a pie chart, click once to select the
entire pie, then again to select the
single slice. You can then use the
methods described above to change
the slice’s colour, or even move it out
of the ‘pie’
Try changing the scale options—just
double-click on the vertical axis labels.
Try changing the bar colour—double-click
on a bar.
Change all the fonts to 16 point Arial Bold—double-click on a legend and select the
Font pane of the relevant Format dialog that is displayed.
Changing a chart’s type
If none of the options for a particular chart type seem to be right, Excel allows you to change
the type of a chart even after you have placed and edited it. Try this now:
1.
2.
Reopen the shopping list example workbook if it is not already open.
Right-click on the embedded pie chart in Sheet1, and select Chart Type…
3.
Select a completely different chart type, such as the fifth option under
Cylinder.
Click on OK.
Use the techniques you learned in the previous section to change the font to Arial Bold.
4.
84
5.
Step 5—Working with charts and graphs
Click on the chart object to select it, then drag the top border up to make the chart
taller.
With luck, you’ll end up with something like this.
Editing a chart’s data range
You may find, once you’ve created a chart or graph, that you need to change the source data
for the chart. For example, if the data is contained in a table within a worksheet, and you
add to it, you will want to include the new data in the chart.
Excel makes this easy to do. You have two options, both controlled from the Source Data
dialog:
■
■
Redefine the data range by clicking and dragging
Redefine the data range by directly editing the data series specification.
To see how this works, we’ll change the data range on the pie chart in our shopping list
workbook:
1.
2.
3.
Reopen the shopping list example workbook if it is not already open.
Right-click on the pie chart and select Source Data…
Excel displays the Source Data dialog, as Figure 5.3 shows.
You have two options here:
■ Edit the source data range for the chart in the Data range field. For example, here
it is currently =Sheet1$B$3:$C$6—that is, an absolute reference to the range of
cells B3:C6 in Sheet1.
■ Click on the button to the right of the Data range field. When you do this, the
dialog contracts to allow you to see the worksheet and to adjust the data range by
clicking and dragging a new selection of the source data. (This works even if the
source data is on a different worksheet.) When you have finished, clicking on the
button again restores the dialog.
Try both of these methods now to reduce the data range to B3:C5, and see what
Copying and moving charts
Figure 5.3
4.
85
Excel’s Source Data dialog
happens. Note that the preview in the Source Data dialog shows you the effect—you
don’t have to click on OK to see what will happen.
When you have finished experimenting, close your workbook and discard the changes.
Copying and moving charts
To move a chart or graph within a worksheet, just click on it and drag it to the required
location. If the chart or graph is the only object in a worksheet, Excel automatically allocates
it the full worksheet, so you cannot move it by dragging.
You can cut and paste charts and graphs in the
same way as you would any other data in Excel.
To cut or copy a chart, just right-click on the
chart and select Cut or Copy from the pop-up
menu. You can then paste the chart in another
worksheet or even another workbook.
Tip
When you copy a chart to its own
workbook, the live data links remain
to the chart’s source workbook.
Try this now:
1.
2.
3.
4.
Reopen the shopping list example workbook, if it is not already open.
Right-click on the shopping list pie chart and select Cut.
Select File ➪ New… and click on Blank Workbook in the task pane.
Right-click in cell A1 and select Paste.
86
5.
6.
7.
8.
Step 5—Working with charts and graphs
Excel pastes the pie chart into the new workbook’s Sheet1 worksheet.
Save the new workbook. Call it Shopping Pie (or anything else that takes your fancy that
you can remember).
Position both workbooks so that you can see them on the screen. You may have to make
either or both windows smaller to do this. See Figure 5.4.
Change items in the cost data in the shopping list worksheet. Verify that the pie chart
changed—the pie chart remains linked to the shopping list data, even though they are
in different workbooks.
Click to select the workbook containing the pie chart. Right-click on the chart and
select Source Data…
Note that the data specification in the Data range field is:
='(Shopping list.xls)Sheet1'!$B3$C6
This is how Excel expresses an absolute reference between workbooks. It’s made up as
follows:
9.
Shopping list.xls
The file name of the workbook containing the source data
Sheet1
The name of the worksheet within the workbook containing the source data
$B3$C6
The absolute cell reference within the worksheet
Click OK to close the Source Data dialog, then save both workbooks.
Adding charts to Word documents
One very useful feature of Excel and Word is the ability to embed ‘live’ Excel charts and
worksheets in Word documents. Here’s how to do it:
1.
2.
3.
4.
5.
Re-open the workbook that contains your
Warning
pie chart, if it’s not already open.
Right-click on the pie chart object and select
Linked data is updated between Excel
workbooks as soon as the data
Copy.
changes as long as both workbooks
Start Word with a new blank document.
are open. However, data is only
You can of course also do this with an exist- updated between an Excel workbook
ing Word document—we are only using a
and a Word document when the Excel
new document here for the sake of the
workbook that contains the data is
exercise.
saved.
Click in the Word document where you
want to paste the chart.
Right-click and select Paste, or click the
button on Word’s formatting toolbar.
Adding charts to Word documents
Figure 5.4
6.
Done!
87
Linked workbooks
Click on the paste options button at the bottom right of the
pasted chart and select Link to Excel Chart .
The chart in the Word document will now remain linked to the
data in the Excel worksheet containing the chart. If you doubleclick on the chart in Word, Excel is launched and opens the
workbook containing the chart. This is referred to as an embedded chart.
Paste options
88
Step 5—Working with charts and graphs
Review
In this step, you learned:
■
■
■
■
■
■
■
■
■
■
■
Charts and graphs are very important for representing numerical data visually.
Excel has a wide range of charts and graphs built in.
Charts and graphs are plotted from a data series, which is made up of data points.
Excel’s Chart Wizard makes it easy to add a chart or a graph to a worksheet.
You can embed a chart or graph in a worksheet, or put it in a worksheet of its own.
Both methods have advantages and disadvantages.
It’s easy to add legends to your chart.
Once you have created your chart, it remains linked to the data series it displays.
You can edit anything in a chart or graph, including the data series it displays, and even
the chart type itself.
Charts and graphs can be copied and pasted to other worksheets or workbooks and still
retain their ‘live’ link to the original data series.
Charts and graphs can be copied and pasted to Word documents, and retain their ‘live’
data links to the Excel workbook containing the data series if the correct option is used.
Quiz
1.
2.
3.
4.
5.
6.
7.
8.
9.
If you want to plot how a car’s fuel consumption varies with its speed, would you use
a chart or a graph?
Why do pie charts always illustrate percentages, no matter what the data?
Embedding a chart in the worksheet that contains the data series it displays, rather than
its own worksheet, gives you some advantages. Name one.
If you wanted to add items to the data series displayed by a chart, which command
would you use?
What does the Data Table pane of the Chart Options dialog do?
How do you change the colour of a chart’s background?
How would you change the colour of a single slice of a pie chart?
How could you add more ticks to the vertical scale of your bar chart? Try it and see if
it works.
If you open an Excel workbook and find a chart whose data range is shown as:
='(Rabbit breeding.xls)Population'!$B2$C12
what would it tell you?
10. Word lets you embed an Excel chart that is linked to the Excel workbook containing
its source data, so that changes to the source data cause changes to the copy of the chart
in the Word document. When might this be a bad idea?
Preparing and
printing data
STEP
6
Checklist
■
■
■
■
■
■
■
■
Checking the maths in your worksheet
Checking your spelling
Setting the area to be printed
Adding headers and footers
Setting the page breaks
Setting printing options
Printing a worksheet or workbook
Saving a workbook in an alternative file format
T
his step tells you how to get your Excel data onto paper. Excel has similar printing
controls to Word, but also has some unique abilities.
This step follows the preparations for
printing in a logical order. However, don’t
assume that this is a fixed order that must always
be followed. You will probably find, for example,
that you make many visits to the Print Preview
while adjusting printing options.
Tip
If all or part of your workbook is
intended to be printed at any stage,
it’s a good idea to design it with this in
mind from the start.
90
Step 6—Preparing and printing data
How Excel prints workbooks
An Excel workbook can contain many worksheets, tables, chart or graphs. When you print
information from a workbook, Excel gives you several options:
■
■
■
You can print the entire workbook
You can print only the active worksheet
You can print just a selected area from the active worksheet.
In addition, you can add headers and footers to each sheet. Excel offers a wide range of data
objects to construct headers and footers, such as time, date, page number, and file name. It
even allows you to insert graphical objects in headers and footers.
We will demonstrate these options as we encounter them.
Preparing a worksheet for printing
Before you print your work in Excel and—most likely—give it to others, it’s vital to ensure
that it is correct. There are several aspects to this:
■
Ensuring that all calculations are correct. Excel offers you no shortcuts for this, you just
have to check through carefully. However, it’s often useful to apply unary (one) and
zero values as a check, depending on the calculations involved.
For example, if your worksheet calculates, say, the prices for a quantity of various
products, setting the quantities to 1, or 10, and the price to a round number such as 2
or 5, 20 or 50, allows you to visually check results more easily. It’s also important to
check that all cells that are supposed to contain the same formula, actually do.
You should also check that your worksheet does not contain any of the errors shown in
the table in Understanding Excel error messages on page 49. Excel does offer the ability
to check through for errors in formulae. We describe this below.
■
■
Checking spelling. Excel has a built-in spelling checker like Word’s. This allows you to
spell-check all the text in a worksheet easily. We describe how to use it below.
Checking formatting. This is best done visually, and involves checking that all text and
numbers are formatted consistently, use the correct font and so on. For example, have
you used the correct formatting for all currency values? What happens if a value is
negative? It is shown correctly?
Preparing a worksheet for printing
91
Checking for errors in formulae
If you are working on a large or complex
worksheet, you may have chosen to ignore some
of the error messages you encountered. Excel
allows you to check for all errors in formulae,
either in one operation or cell by cell.
Here’s a short exercise that illustrates how these
features work:
1.
2.
3.
Note
This feature checks for errors in syntax
or use of Excel formulae, such as
dividing by zero, incorrect nesting of
brackets, or circular references. It does
not guarantee that your formulae will
give the correct result, as it cannot
know whether or not you have
specified the correct formula! That is
up to you.
Reopen the shopping list example
workbook.
Select Tools ➪ Options…, click on Error
Checking, and ensure that Enable
background error checking is selected. Click on OK.
Enter a deliberate error. For example, click in the first amount in the Euro column and
change:
=C3*Euros!$C$3
to
=C3*Euros!$C$3/0
This introduces a deliberate divide by zero error. Your worksheet should now look like
this:
4.
As you can see, the divide by zero error has propagated to the euro totals, costliest,
cheapest and average values. Excel has also highlighted the cells that contain errors by
placing a small green mark in the top-left corner of each cell.
Click to select one of the cells which contains an error.
Excel displays a small error button next to the cell Click on this to display a menu
of options. Help on this error does what it says, while the next option will be Show Calculation Steps… if the cell contains the error, or Trace Error if the error has propagated
92
5.
Step 6—Preparing and printing data
from another cell.
To demonstrate the error tracing feature, click in the Cheapest cell for euros, then click
on the button and select Trace Error. Excel displays the source of the error, as shown
below:
You will see, if you are trying this yourself, that the arrow from the Eggs total to the
Cheapest cell is red. Excel uses red arrows to denote the cell or cells that cause the
error. The arrow from the Pounds cell is blue, and indicates that the Pounds value is an
input to the cell with the error (remember, it’s multiplied by the Euros per Pound value
on the second worksheet). The black arrow with the is there to warn you that the
Euros value with the error is used in another worksheet—it’s used in the bar chart in
the Chart1 worksheet. If you select this now, you’ll see that the offending value is represented as zero in the bar chart.
I think you’ll agree that Excel’s error auditing is pretty neat. For worksheets of any
complexity, it’s a life-saver. Next we’ll demonstrate how to batch check for errors. Leave
the deliberate divide by zero error in the Eggs (Euros) cell, and try this:
1.
Select Tools ➪ Error Checking…
Excel displays the Error Checking dialog:
Figure 6.1
Excel’s error checking dialog
The buttons in this dialog perform similar functions to the menu options displayed
Preparing a worksheet for printing
2.
3.
93
when you click on a button for a cell with an error. The second button’s legend
changes from Show Calculation Steps… for a cell that contains an error, to Trace Error
for a cell that contains an error propagated from another cell. Try some of the options.
Click on Next to proceed to the next error. Note that Excel ‘visits’ each cell that
contains an error, whether the error is contained in the cell, or propagated from another
cell.
When you have visited all the cells that contain errors, Excel displays the following
dialog:
Figure 6.2
No more errors
It also displays this dialog if you select Tools ➪ Error Checking… in a worksheet that does
not have any errors.
When you have finished these exercises, close your shopping list worksheet, discarding the
changes.
Checking spelling
Excel’s spell checking is similar to Word’s. The main differences are in the options available,
and the fact that you can select an area of a worksheet and have Excel spell-check only the
selected area.
To see how this works, try this:
1.
2.
3.
4.
Reopen the shopping list worksheet.
First, set the language option. Choose Tools ➪ Options…, click on Spelling and select
the required language, for example English (U.K.).
Change Eggs to some non-word, such as ‘Grubble’.
Select Tools ➪ Spelling…
Excel stops at the first spelling error with the dialog shown in Figure 6.3.
94
Step 6—Preparing and printing data
Figure 6.3
Excel’s spell checking dialog
The options here are the same as for Word’s spell checking:
Ignore once
This allows you to skip the error that is currently highlighted.
Ignore all
This allows you to skip all occurrences of the error that is currently
highlighted. This is useful, for example, for any word that occurs
frequently but which will not be in Excel’s spelling dictionary, such
as a person or place name.
Add to dictionary
This allows you to add the highlighted word to Excel’s spelling
dictionary. This stops the word from being flagged as a spelling
error in future. Only do this for words you are sure are correct!
Change
This applies the selected change option to the highlighted word in
your worksheet.
Change all
This applies the selected change option to all other occurrences of
the highlighted word in your worksheet.
AutoCorrect
This creates an autocorrect entry for Excel that will in future
change the incorrect word to the word currently highlighted under
Suggestions. This encourages careless typing!
Options…
Displays the spelling options. This is equivalent to selecting Tools ➪
Options ➪ Spelling.
5.
Select the relevant option. Continue until Excel finds no further errors.
Preparing a worksheet for printing
95
Setting the print area
When you work with a Word document, you
Note
typically either want to print all of it, or only
certain pages. Excel has no concept of pages until
Setting the print area is optional. If
you format a worksheet for printing, and will
you do not set a print area, Excel will
happily print hundreds of blank sheets if you
print the entire worksheet or
aren’t careful. Fortunately it allow you to print
workbook, as you specify.
only part of a worksheet. You do this by defining
the print area. This specifies which part of a
worksheet will be output when you print that worksheet. A print area setting remains in
force in a worksheet until you change it.
Here’s an exercise to show how to set up a print area:
1.
Using your shopping list workbook, select Sheet1 and then File ➪ Print Preview.
Excel displays the worksheet as it would appear on the currently selected paper size.
Note the useful range of buttons to allow you to access all the other printing options
from the preview screen.
2.
3.
Click on Close to close the Print Preview.
Click and drag to select just the title Shopping List and the table of items below it—
omit the totals and other data.
Select File ➪ Print Area ➪ Set Print Area. Excel places a dotted line around the print
area.
Select File ➪ Print Preview again. As you can see, Excel will now print only the area you
have marked as the print area.
4.
5.
There is no concept of multiple print areas in
Excel. That is, you cannot Ctrl-click to select two
or more areas of a worksheet and then set the
print area. If you do this, Excel merely uses the
first area you selected as the print area.
To clear the print area, select File ➪ Print Area ➪
Clear Print Area . You do not need to have any
specific group of cells selected when you do this.
Note
Worksheets that contain only charts
have no concept of a print area. If a
worksheet contains both data and one
or more embedded charts, the charts
are printed if any part of them
overlaps a print area, otherwise they
are omitted from printing.
96
Step 6—Preparing and printing data
Setting print margins
The print margins dictate the amount of white space surrounding your worksheet when
printed. Generally you will not need to change these, but it’s easy to do so:
1.
2.
3.
4.
5.
Select File ➪ Page Setup…
Click on Margins.
Use the widgets to set the margin sizes you need.
Click in the vertical or horizontal Center on page boxes to activate these options if you
wish.
Click on OK.
You can also set the margins interactively by selecting File ➪ Print Preview, clicking on the
Margins button and dragging the margins to the desired locations.
Adding headers and footers
Excel provides you with a wide range of data that can be included in headers and footers
when you print a worksheet or workbook. In the following exercise, we’ll add the filename
of the worksheet as a header, and page numbers and a date as footers:
1.
2.
3.
Using your shopping list worksheet, select Sheet1.
Select File ➪ Page Setup… and then select Header/Footer.
The pull-down menu for the Header field provides you with a collection of useful
predefined headers. However, we will use the custom header and footer feature, so…
Click on Custom Header…
Excel displays the Header dialog. This
Note
contains a left, centre and right section that
correspond to what you want to print at the
Excel has no concept of mirrored lefttop left, top centre and top right of the page. right pages, as Word does.
The dialog is equipped with buttons that
allow you to insert data in the header and format it. The buttons have the following
functions:
Allows you to set the text font
and size for any header data.
Inserts the full file and folder
path.
Inserts the current page number.
Inserts the file name.
Inserts the total number of
pages.
Inserts the worksheet name.
Inserts the date.
Inserts a graphic.
Preparing a worksheet for printing
Inserts the time.
97
Allows you to format an inserted
graphic for size, scaling and
cropping.
Here we want to add the filename only in the header, so…
4. Click in the field titled Center section, then click on the
button.
Excel adds the text &[File] to the centre header field.
5. We decide that we want our headers in Arial Bold, so double-click on &[File] to select
it, then click on the
button.
Excel opens the Font dialog. Select Arial under Font and Bold under Font style. Click on
OK.
6. Click OK again to close the Header dialog.
7. Click on Custom Footer…
Excel displays the Footer dialog. This is identical to the Header dialog.
8. Click in the Left section field, then on the
button to add the page number.
9. Click in the Right section field, then on the
button to add the date.
10. Repeat step 5 to set both the page number and the date in Arial Bold.
11. Click on OK to close the Footer dialog.
12. Click on Print Preview in the Page Setup dialog to see the effect.
When you have finished, click Close to close the page preview and save your workbook.
Adding page breaks
It may happen for larger worksheets that even after setting a print area, some of your data
falls across page breaks. To deal with this problem, Excel allows you to add forced page
breaks in the same way as Word.
To set a forced page break:
1.
2.
Select any cell in the first column of the row you want to be at the top of the page (or
select the whole row).
Select Insert ➪ Page Break.
Excel adds a page break immediately above the selected cell.
To remove a page break, select a cell or the row below the page break, then select Insert ➪
Remove Page Break (no, we don’t think it’s very logical either). If you cannot find this menu
option, you have the wrong cell or group of cells selected.
Excel allows lateral as well as vertical page breaks. If you select a cell that’s not in the first
column, then select Insert ➪ Page Break, Excel inserts page breaks at the row above the
selected cell and in the column to the left of it. This might be a little tricky to grasp, so
98
Step 6—Preparing and printing data
here’s a simple exercise to illustrate it (omit the first two steps if you already have this print
area selected from the previous exercise):
1.
2.
3.
4.
5.
Using your shopping list worksheet, click and drag to select just the title Shopping List
and the table of items below it—omit the totals and other data.
Select File ➪ Print Area ➪ Set Print Area. Excel places a dotted line around the print
area.
Click to select the cell containing the Pounds total.
Select Insert ➪ Page Break.
Notice now that you have a horizontal page break above the row containing the selected
cell, and also a vertical page break to its left.
Select File ➪ Print Preview to see the effect.
It’s not terribly helpful here, but this ability is a
life-saver when formatting large worksheets for
printing.
Finally, Excel has a useful page break view,
accessible by selecting View ➪ Page Break
Preview. In this view, you can click and drag page
breaks. Right-clicking on a cell in the Page Break
Preview provides several useful commands:
■
■
■
Warning
To clear a combined page break such
as this, you must select the same cell at
the intersection of the breaks as you
used to set them, otherwise you will
clear only the horizontal or the vertical
page break, not both.
Insert page break
Remove page break
Reset all page breaks
as well as several print area commands. Experiment with it now to see how it works.
Setting printing options
The last step before printing is to set the remaining printing options. These are done from
the Page Setup dialog.
Setting repeating titles
If you have a table, for example, that requires more than one page, it’s useful to be able to
repeat the titles on all pages. Alternatively, you can instruct Excel to repeat a column on
every page. To do this:
1.
2.
3.
Select File ➪ Page Setup… and click on Sheet.
Click on the button to the right of the Rows to repeat at top or Column to repeat at
left fields.
Select the row or column to repeat in the worksheet.
Preparing a worksheet for printing
4.
5.
6.
99
Click on the button to return to the Page Setup dialog.
Click on Print Preview to see the results.
Click on OK to confirm.
By default Excel does not print gridlines or row and column headers. In this dialog, you can
tell Excel to print them if you need to.
The Cell errors as field allows you to select how any remaining errors are printed. The Page
order options control how worksheets that are wider than the paper are printed.
Setting the page orientation, scaling and print quality
The Page pane of the Page Setup dialog is where you set the page orientation, scaling and
paper size. Alter selecting File ➪ Page Setup…, select the required orientation:
Next, select the scaling options. You have the choice of setting a scaling percentage using
the Adjust to option, or of letting Excel scale the worksheet automatically to fit the paper
with the Fit to option.
100
Step 6—Preparing and printing data
Unfortunately, the zoom option offered by
setting Adjust to to a value of greater than 100%
also enlarges any headers and footers you might
have defined. This may not be what you want.
If you set a value greater than 1 for the Fit to…
pages wide setting, you need to pay attention to
the Page order setting to determine how your
pages are printed.
Warning
Be careful when using Fit to. Always
check for results with Print Preview
before printing—you may find that
you have to return and reset the print
area (see page 95) to avoid printing a
large number of blank pages.
The Paper size field allows you to select the paper for the printer currently selected. The
choices here will depend on the printer—some printers can be loaded with more than one
paper size.
Some printers also offer variable print quality. For example, most inkjet printers offer a
‘draft’ quality that is faster and uses less ink. Some laser printers offer similar functions,
although these are normally expressed as dots per inch (dpi). 300 dpi is generally accepted
as the minimum quality for laser printers, 600 dpi is the normal setting for office work. A
few printers may offer higher resolutions where quality is important. The Print quality field
allows you to select from the available options, if they are present.
Printing a worksheet or workbook
When you have satisfied yourself that you’ve set all the printing options as you wish,
selecting File ➪ Print displays the Print dialog (Figure 6.4).
Figure 6.4
Excel’s print dialog
Printing a worksheet or workbook
101
This is very similar to Word’s Print dialog. The options have the following functions:
Name
Allows you to select printers other than the printer currently defined
as your default printer.
Properties…
Allows you to set printer-specific functions, such as selecting a special
paper tray, or printing thumbnails.
Print range
All prints all pages required by the Print what setting. You can select a
different range of pages using the From and To fields.
Print what
Allows you to select whether to print the entire workbook, the
currently-selected worksheets, or a selected area on a worksheet. You
can print more than one worksheet by selecting the first worksheet,
then holding down the Shift key while selecting subsequent
worksheets.
Copies
Allows you to set how many copies should be printed. The Collate
option ensures that pages are printed in sequence if you are printing
multiple copies of a worksheet or workbook that require more than
one page when printed.
Print to file
This allows you to output the print image to a file as PostScript.
Print what needs some explanation. Here’s how to print all the options available:
To print this
Do this
Part of a worksheet
Select the area to be printed, select File ➪ Print, select Selection
under Print what.
An entire worksheet
Display the worksheet, select File ➪ Print, select Active sheet(s)
under Print what.
Selected worksheets
Shift-click on the worksheet tabs to select the worksheets to be
printed, select File ➪ Print, select Active sheet(s) under Print what.
An entire workbook
Select File ➪ Print, select Entire workbook under Print what.
102
Step 6—Preparing and printing data
Saving Excel data using different file types
We’re almost through with Excel, but there’s
Warning
one final thing you need to know. When you
saved your first Excel workbook in Step 1, you
Some alternative file types are not
saw that the Save As dialog had a Save as type
capable of saving all the information
field, the default for which was Microsoft Excel
in an Excel workbook. If this is the
Workbook. There are a number of other file types
case, Excel warns you when you save a
that you can use to save data from an Excel
workbook as one of these file types, as
workbook, and you need to be aware of the
shown in Figure 6.5. You should also
purpose of these. The more important of these
be aware that Excel itself cannot open
some of the file types described here.
are listed in this section. When you save all or
part of a workbook as one of these file types,
Excel automatically adds the correct name extension to identify the file type. Be aware that
the term ‘file format’ is also used for file types.
Figure 6.5
An Excel save warning for alternative file types
Templates
When you save an Excel workbook as a template, everything in the workbook is saved, but
there are two key differences when compared to saving as a workbook:
■
■
Excel automatically selects your Templates folder as the default location where the file
is to be saved. This is the folder that Excel looks in if you select the General Templates…
option from the task pane that is displayed when you select File ➪ New…
Excel saves the workbook in its template format. This preserves all the information in
the workbook, but changes the name of any new workbooks created from the template,
by adding a digit after it. Thus, for example, if you save a workbook as a template with
the name Shopping List, Excel would name new workbooks created from the template
as Shopping List1, Shopping List2, Shopping List3, and so on.
Templates are extremely useful for any workbook that you are intending to use many times
with different data.
Saving Excel data using different file types
103
Text formats
Excel’s text file types allow you to save numerical data from a workbook in a form that
allows it to be used in other programs such as Word. Excel has two main text file types:
■
■
Tab-delimited. This file type saves the numerical information as a set of values
separated by tab characters.
CSV. This is shorthand for ‘comma separated value’, from which you can guess that the
individual numerical values are separated by commas when a worksheet is saved as this
file type. CSV is a widely supported standard for transferring data between different
applications and different computer systems.
Both file types save only numerical data, not formulae or formatting, and only save the
information contained in the active worksheet. Figure 6.6, for example, shows what our
shopping list example looks like in the two text formats when displayed in the Notepad text
editor, with the CSV version in front.
Figure 6.6
The shopping list example in text formats
Web page, Web archive
As their name suggests, these file types store data in a form that can be read by a Web
browser. This is HTML, which stands for Hypertext Markup Language. The Web Page file
type gives you the option of saving the active worksheet or an entire workbook. Web
Archive is a special file type that allows a workbook to be saved in its entirety, complete
with graphics, so that it appears as a complete Web site in a browser. This is illustrated in
Figure 6.7.
104
Step 6—Preparing and printing data
Figure 6.7
The shopping list example as a Web archive, viewed in Explorer
Previous versions of Excel
From time to time complex applications like Excel have to change their default file type
(workbook) to accommodate new features in the application. If you need to transfer a
workbook to a computer, or a client, that uses an older version of Excel, you can still save
workbooks in file types that are compatible with these older versions. The relevant file types
are Excel 5.0/95, Excel 97-2002/95 , Excel 4.0, Excel 3.0 and Excel 2.1.
Other applications
As well as the file types we’ve already described, Excel can save your workbook in files of
types designed to be opened by other, non-Microsoft, applications. These file types include
several that can be opened by Lotus 1-2-3, a spreadsheet application from IBM, Quattro
Pro, a spreadsheet application from Borland Software Corporation, and dBase, a database
application.
And finally…
Done!
Congratulations—you’ve completed the steps on Excel. But don’t forget to run through the
quiz on page 106.
Saving Excel data using different file types
105
Review
In this step, you learned:
■
■
■
■
■
■
■
■
■
■
■
■
The correctness of calculations is up to you!
Excel offers a clever method for tracking down maths errors.
Excel has a spelling checker.
You need to tell Excel what to print, by defining a print area.
If a worksheet’s contents occupy less than a page, you can centre the contents on the
page.
You can define headers and footers for a worksheet, which are placed on every page
printed from that worksheet.
Headers and footers can contain automatic data such as page number, time, date, the
workbook’s filename.
You can add forced page breaks in a worksheet to improve the presentation of the
worksheet on paper.
You can force Excel to repeat a title row on every page of a printout.
You can scale a worksheet manually or automatically to make it fit a specific paper size
for printing.
Using printing options, you can print:
– Part of a worksheet
– An entire worksheet
– Selected worksheets
– An entire workbook.
Excel offers a variety of alternative file types that you can use to save a workbook or
worksheet for different purposes and different application programs.
106
Step 6—Preparing and printing data
Quiz
1.
There are three critical things you should check before printing a worksheet for
distribution to others. What are they?
2. What is the purpose of the button that is sometimes displayed next to a cell?
3. What does the icon indicate when Excel is displaying an error audit?
4. When checking spelling, you click AutoCorrect for an unknown word. What is the effect
of this?
5. What is the purpose of the print area setting?
6. What does the
button do when used in a header or footer?
7. What would you do if you wanted the headers or footers in a worksheet to be printed
in a different font to the rest of the worksheet?
8. What would you select in a worksheet if you wanted to clear a page break set on a row?
9. You are working on a very wide worksheet (that is, it uses many columns of data). What
printing options might you use?
10. You have a worksheet that contains some data and an embedded chart. You want Excel
to print both the data and the chart. What settings would you choose for:
– Print area
– Print what in the Print dialog?
Glossary
Absolute reference
A cell reference that does not change even if the cell containing the reference is moved or copied. Absolute references can
refer to row, column, or both, and are denoted by placing a ‘$’
sign before the relevant reference. For example, ‘$C2’ makes
the column reference absolute, ‘C$2’ makes the row reference absolute, and ‘$C$2’ makes both row and column reference absolute.
Application program
Any computer program that processes data. Application
programs include productivity software such as spreadsheets,
word processors, database management systems, as well as
special-purpose applications such as accounting, payroll,
billing, inventory, computer-aided design, manufacturing
control and others.
Auto-fill
A feature that allows additional cells to be filled with data or
formulae based on a pattern of selected cells. For example,
selecting cells containing the values ‘1’ and ‘2’, and then
dragging, causes Excel to fill the new cells with integers whose
value increases by 1 for each additional cell.
Bit
Short for ‘binary digit’, the basic unit of information in digital
computer systems. A single bit can have the values 0 or 1.
108
Glossary
Cell protection
A feature that allows the contents of cells to be temporarily
made read-only.
Central processing unit
The part of a computer system that interprets and executes
the instructions contained in the software.
Chart
A feature that allows numerical data to be displayed graphically. Excel offers many chart types, including column, bar,
line, pie and more complex types.
Computer
A general-purpose machine that processes data according to a
set of stored instructions in the form of an operating system
and application programs.
Computer-aided design
The use of application programs to create dimensioned
drawings, specifications, parts lists, and other design-related
elements.
Cursor
An indicator in an application program that marks the active
point in a document or other data object, usually the point at
which new data can be inserted as text or a graphical object.
Data
Information represented in a form suitable for processing by
computer.
Data point
A single item of data in a data series.
Data series
A set of related data points.
Database
A set of files in a computer that store a set of related data such
that a program can consult it to answer questions. Databases
are created and managed by a database management system.
Database management
system
Software that allows the modelling, storage and retrieval of
data in a database, as well as ensuring its security and integrity. Often referred to as a DBMS.
Dependent (cell)
In Excel, a cell whose displayed value is dependent on the
data stored in another cell.
Glossary
109
Embedded chart
A chart that is contained within an Excel worksheet that also
contains data, rather than occupying a worksheet of its own, or
a chart embedded in a Word document.
File
A collection of computer data held on a storage medium in a
defined format. For example, a Word document, an Excel
workbook, or a PowerPoint presentation.
Folder
A virtual container used to hold files within a computer’s file
system.
Function
A built-in operator that computes and displays a mathematical value based on the data held in one or more cells.
Graph
A way of displaying numerical data with more than one
dimension by plotting on as many axes as there are dimensions
to the data.
Graphical user interface
A computer operating system or application that allows data to
be displayed and manipulated using windows and a mouse.
See also WIMP.
Hardware
The term used to describe physical computing devices such as
the processor, monitor, keyboard, mouse and so on. Contrast
with software.
HTML
Hypertext markup language, the language used to encode the
contents of Web pages.
Hyperlink
An active reference in a hypertext document that, when
clicked, transfers the viewer to the destination of the reference.
Hypertext
A form of displaying information in which hyperlinks allow
other documents or resources to be referenced in whatever
order the viewer chooses.
Icon
In the context of computer software, a small, often clickable
graphic that is used to represent a file, folder, disk or other
computer resource.
110
Glossary
Inkjet
A type of printer technology in which tiny drops of ink are
sprayed onto the paper to form an image.
Instruction
An item of information from a computer program that the
central processing unit interprets as a command to act on data,
rather than an item of data itself. Both instructions and data
are composed of bits.
Laser printer
A type of high-quality printer that forms images on paper by
depositing a powdered ink using electrostatic charges placed
on the paper by a low-powered laser. Laser printers
commonly feature a high printing resolution, and may be
monochrome or colour.
Mantissa, exponent
The two parts of a number when it is expressed in scientific
notation. The mantissa contains the significant digits of the
number in the range 0–9, and the exponent contains the
power of ten to be applied to the mantissa. For example,
12.25 is ‘1.225E1’ in scientific notation, while 1001 is
‘1.001E3’.
Menu
The part of a graphical user interface that is used to select
commands using a mouse. Menus can be pull-down, extending from the top of a window when clicked, or pop-up,
appearing at the mouse cursor position when clicked.
Modifier key
A non-alphanumeric key that is used to perform special
functions when pressed at the same time as an alphanumeric
key. Windows computers use the Ctrl (Control) and Alt
(Alternate Function) keys as modifier keys.
Monitor
The computer peripheral used to show information generated
by a computer.
Name extension
The part of a file name following the ‘.’ that is used to identify
the file’s type. For example, ‘.doc’ (Word document), ‘.xls’
(Excel workbook), ‘.txt’ (plain text file).
Operating system
The software responsible for the direct control and management of a computer’s hardware and system operations, as well
as providing a means of running application software.
Glossary
111
Peripheral
Any computer hardware that is attached to the system unit to
extend its abilities. For example, keyboard, mouse, monitor,
external hard drive, scanner, printer.
PostScript
A page description language developed by Adobe Systems to
allow high-quality printing on any printer equipped with the
required software to decode it. Most modern laser printers
use the PostScript language.
Print area
The area in an Excel worksheet that is designated for printing.
This can be less than the whole worksheet.
Program
The sequence of stored instructions that is interpreted and
executed by a computer in order to perform some useful task.
See also application program.
Series (data)
See data series.
Shortcut key
A key combination, typically including a modifier key, that
performs a specific function in an application program, such as
selecting a menu command. Shortcuts keys are designed to
provide experienced users with a quicker alternative to selecting commands with the mouse.
Software
A term generally used for any computer program, to distinguish it from hardware.
Spreadsheet
In the context of software, an application program that
consists of one or more grids of cells, each of which can
contain data or formulae that display the results of calculations based on the value of data in other cells. See also
workbook, worksheet.
Taskbar (Windows)
The bar along the lower edge of the screen in Windows
operating systems, used for storing and selecting individual
windows.
Thumbnail (printing)
Scaled down images of a document’s pages, often created to
check for text flow through the document’s pages.
112
Glossary
WIMP
An acronym standing for ‘window icon menu pointer’, the
design basis of modern graphical user interfaces for operating
systems and application programs.
Word processor
An application designed to allow the creation, editing and
printing of documents, usually both text and graphics.
Workbook
An Excel file consisting of one of more worksheets.
Worksheet
An individual Excel spreadsheet within a workbook.
Index
A
Absolute reference 47, 107
Application program 107, 111
Auto-fill, in Excel 33, 107
AVERAGE function 45
B
Background, setting in Excel 62
Bit 107
Book
overview v
text features vi
Border, on cells in Excel 65
Browser 103
C
Cell
absolute reference 47
borders in Excel 65
clearing 31
deleting 31, 32
dependent 29, 108
inserting 32
locking, protection in Excel 69
mixed references 49
protection 69, 108
relative reference 47
selecting in Excel 24
Cell reference, changes in copy or move 28
Central processing unit 108
Chart 108, 109
adding legends in Excel 80
adding to Word documents 86
changing type in Excel 83
copying in Excel 85
creating simple in Excel 77
editing data range in Excel 84
editing in Excel 81
in Excel 75
moving in Excel 85
other types in Excel 79
Chart Wizard 77, 79, 80
Clearing cell in Excel 31
Colour, setting in Excel 62
Column
deleting in Excel 32
inserting in Excel 32
locking in Excel 8
selecting in Excel 24
Comment, adding to cell 30
Computer 108
Computer-aided design 108
Conventions vi
Copying
chart in Excel 85
data in Excel 24–29
worksheet in Excel 12
COUNT function 45
114
Creating
other chart types in Excel 79
simple chart in Excel 77
Cursor 108
Customising
Excel 13
D
Data 108
defining formats in Excel 60
display formats in Excel 55
editing chart range in Excel 84
editing in cells 23, 30
interpretation in Excel 21
moving and copying in Excel 24–29
non-adjacent in Excel 26
number formats in Excel 57
search, replace in Excel 34
sorting in Excel 36
Data point 77, 108
Data series 23, 77, 84, 108
Database 108
functions in Excel 42
Database management system 108
DBMS, see Database management system
Default printer 101
Deleting
cell 31, 32
worksheet in Excel 12
Dependent cell 29, 108
#DIV/0! error message 50
Document
setting default location in Excel 14
E
Editing
cell data in Excel 23
chart data range in Excel 84
charts, graphs in Excel 81
Embedded chart 79, 87
in Excel 95, 109
Error
checking in Excel 91
messages in Excel 49
Excel 1–104
absolute reference 47, 107
adding chart, graph legends 80
Index
adding comments to cells 30
adding document details 16
adding headers and footers 96
adding new worksheet 10
adding page breaks 97
auto-fill 33, 107
AVERAGE function 45
calculating, displaying percentages 59
cell borders 65
cell locking, protection 69
cell references in copy or move 28
changing chart type 83
charts, graphs 75
checking for errors 91
checking spelling 93
clearing, deleting cells 31
compatibility with older versions 104
compatibility with other applications 104
conditional references 50
controlling recalculation 14
copying data between workbooks 27
copying worksheet 12
copying, moving charts 85
COUNT function 45
creating automatic series 33
creating formulae 43
creating other chart types 79
creating simple chart 77
customising 13
data point 77, 108
data series 23, 77, 84, 108
defining data formats 60
deleting cell, row, column 32
deleting worksheet 12
dependent cell 29, 108
displaying text 61
displaying toolbars 15
editing cell data 23
editing chart data range 84
editing charts, graphs 81
editing data in cells 30
enabling toolbars 7
error messages 49
file types 10
formulae 41
function 4, 42, 45, 109
getting help 17
Index
graph 4, 109
how input is interpreted 21
inserting cell, row, column 32
locking row, column 8
MAX function 45
MIN function 45
mixed references 49
moving data between workbooks 27
moving, copying data 24–29
non-adjacent data 26
number formats 57
opening, saving workbooks 9
order of processing formulae 46
preparing worksheet for printing 90
printing 89–104
printing worksheet, workbook 100
protecting worksheet contents 67
relative reference 47
renaming worksheet 11
saving as Web page 103
saving to different file type 102
saving to text format 103
search, replace data 34
selecting cell, column, row 24
setting colour, background 62
setting default document location 14
setting display formats 55
setting font style 61
setting menu length 13
setting print area 95
setting print margin 96
setting printing options 98
setting toolbars defaults 15
setting up titles 98
shortcut keys 17
sorting data 36
text wrapping, alignment 63
toolbars 14, 15
undoing changes 32
user interface 5
using different views 7
using templates 102
working with worksheets 10
115
Exponent 22, 110
F
File 109
saving as different type in Excel 102
types in Excel 10
Folder 109
Font
serif 61
setting style in Excel 61
Footer 5
adding in Excel 96
Formula
checking for errors 91
creating in Excel 43
in Excel 41
order of processing in Excel 46
Function 4, 109
conditional 50
in Excel 42, 45
G
Graph
adding legends in Excel 80
editing in Excel 81
in Excel 4, 75, 109
Graphical user interface 109
H
Hardware 109
##### error message 50
Header
adding in Excel 96
Help
in Excel 17
HTML 103, 109
Hyperlink 109
Hypertext 109
I
Inkjet 100, 110
Inserting cell 32
Instruction 110
116
L
Laser printer 100, 110
Legend, adding to chart, graph in Excel 80
Locking row, column in Excel 8
M
Mantissa 22, 110
MAX function 45
Menu 110
setting length in Excel 13
MIN function 45
Modifier key 17, 110
Monitor 79, 110
Moving
chart in Excel 85
data in Excel 24–29
N
#NAME? error message 50
Name extension 102, 110
#NUM! error message 50
O
Operating system 110
P
Page break, in Excel 97
Password 70
Percentage, using in Excel 59
Peripheral 111
PostScript 101, 111
Print area 97, 98, 100, 111
setting in Excel 95
Print margin, setting in Excel 96
Printer
inkjet 100, 110
laser 100, 110
Printing
Excel workbooks 90
in Excel 89–104
setting options in Excel 98
worksheet, workbook 100
Program 111
R
Recalculation, controlling in Excel 14
#REF! error message 50
Index
Reference
absolute in Excel 47
conditional in Excel 50
mixed in Excel 49
relative in Excel 47
Renaming
worksheet in Excel 11
Row
deleting in Excel 32
inserting in Excel 32
locking in Excel 8
selecting in Excel 24
S
Saving
different file type in Excel 102
workbook in Excel 9
Searching
for data in Excel 34
Selecting cell, column, row in Excel 24
Series, creating automatic in Excel 33
Serif font 61
Shortcut key 111
in Excel 17
Software 111
Sorting
data in Excel 36
Spelling
checking in Excel 93
Spreadsheet 1–104, 111
description 1
Style
fonts in Excel 61
T
Taskbar 27, 111
Template, in Excel 102
Text
alignment, wrapping in Excel 63
display formats in Excel 61
Thumbnail 101, 111
Title, setting in Excel 98
Toolbar
customising in Excel 14, 15
displaying in Excel 15
enabling in Excel 7
setting defaults in Excel 15
Index
U
Undoing
in Excel 32
User interface
Excel 5
V
#VALUE! error message 50
View
in Excel 7
W
Warnings in text vi
Web
saving data from Excel 103
Web browser 103
WIMP 112
Wizard 77, 79, 80
117
Word
adding Excel charts 86
Word processor 112
Workbook 4, 6, 10, 12, 16, 27, 112
adding document details 16
and worksheet 4
opening, saving 9
printing 90, 100
saving as different file type 102
Worksheet 4, 7, 8, 112
adding new 10
and workbook 4
copying 12
deleting 12
preparing for printing 90
protecting contents 67
renaming 11
working with 10