124
Guide to Excel

Guide to excel

Embed Size (px)

DESCRIPTION

 

Citation preview

Page 1: Guide to excel

Guide to Excel

Page 2: Guide to excel
Page 3: Guide to excel

Contents

Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . v

1 Getting started with Excel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1What is a spreadsheet? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1A trip around the interface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5Opening, saving, closing, reopening . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9Working with worksheets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10Bending Excel to your will. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .13Adding document details . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .16Shortcut keys . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .17Getting help on Excel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .17

2 Working with spreadsheet data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .21How Excel interprets data entries. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .21Editing cell data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .23Searching for data, replacing data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .34Sorting data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .36

3 Using spreadsheet formulae . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .41Using Excel formulae . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .41Using relative and absolute cell references . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .47Using mixed cell references. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .49Understanding Excel error messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .49Using conditional functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .50

4 Improving a sheet’s appearance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .55Setting display formats for data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .55Setting display formats for text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .61Using cell borders . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .65

Page 4: Guide to excel

Contentsiv

Protecting a sheet’s contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67

5 Working with charts and graphs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75What’s a chart, what’s a graph? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75Creating a simple chart. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77Creating other types of chart. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79Adding legends to your chart or graph. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80Editing charts and graphs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81Copying and moving charts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85Adding charts to Word documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86

6 Preparing and printing data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89How Excel prints workbooks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90Preparing a worksheet for printing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90Printing a worksheet or workbook . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100Saving Excel data using different file types . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102

Glossary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107

Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113

Page 5: Guide to excel

Preface

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.

T

Page 6: Guide to excel

Prefacevi

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.

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.

We also use the panels shown on the right to highlight special or important pieces of information.

Conventions used in the steps

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:

MaryJoePeterFrankSue

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

Note

It’s important to remember this.

Tip

This can make your life easier.

Warning

Be aware of this.

Stop!

Don’t do this.

Page 7: Guide to excel

S T E P

1

Getting started

with Excel

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 special-purpose 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

Checklist

■ Introduction to spreadsheets■ Excel’s basic user controls■ Creating, opening and saving workbooks■ Working with worksheets■ Customising Excel■ Getting help

T

Page 8: Guide to excel

Step 1—Getting started with Excel2

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.

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.

Figure 1.1 A blank Excel document

Page 9: Guide to excel

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

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

3. Enter Flour Tab 1.1 Return Potatoes Tab 0.85 Return Meat Tab 2.26.

Here’s what things should look like now.

4. “So what?”, you may be thinking at this stage. Now click in the cell two below Meat and type Total Tab.

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

Page 10: Guide to excel

Step 1—Getting started with Excel4

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.

Page 11: Guide to excel

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.

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

The formatting toolbar

Task pane

Column titles

Row titles

Cell selector

Formula bar

The standard toolbar

More tools hiding here… …and hereHelp

Horizontal scroll bar(obscured by task pane)

Worksheet tabs

Menu bar

Worksheet selector widgets

Vertical scroll bar(obscured by task pane)

Figure 1.2 Excel’s user interface

Page 12: Guide to excel

Step 1—Getting started with Excel6

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!

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

Page 13: Guide to excel

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

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

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

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

2. Try selecting different zoom values. The Selection value zooms the view to the size of the currently-selected cells, if any.

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

Page 14: Guide to excel

Step 1—Getting started with Excel8

Full screen viewing is useful when you are working with large worksheets, or if you are working only in Excel.

4. Now select File ➪ New and click on Blank workbook in the task pane to open a new blank workbook.

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

6. Close the blank workbook using the close icon in the workbook window—not the entire application’s close icon.

Locking rows and columns

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. Select File ➪ New and click on Blank workbook in the task pane to open a new blank workbook.

2. Click in cell A1 and then enter:

Title A Tab Title B Tab Title C Return

to simulate the start of a table of data.

3. Add some numbers to cells A2 to C8—it doesn’t matter what they are.

4. 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 unfreeze panes, select Window ➪ Unfreeze Panes.

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

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.

Page 15: Guide to excel

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

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

3. Finally, click on Save, then close Excel by selecting File ➪ Exit or by clicking on the application window’s close icon .

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

Figure 1.3 Excel’s Save As dialog

Page 16: Guide to excel

Step 1—Getting started with Excel10

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:

■ 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. Right-click on any of the existing worksheet tabs.

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

3. 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. Right-click on the worksheet tabs of the worksheet to be moved.

2. Select Move or Copy…

Excel displays the Move or Copy dialog, as shown in Figure 1.5.

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.

Page 17: Guide to excel

Working with worksheets 11

3. 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. Double-click on the name in the worksheet tab. Excel highlights the worksheet’s name.

2. Enter a new name.

3. Click anywhere outside the worksheet tab to deselect it.

Figure 1.4 Excel’s Insert dialog

Figure 1.5 The Move or Copy dialog

Page 18: Guide to excel

Step 1—Getting started with Excel12

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.

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. With your shopping list example workbook open, select File ➪ New.

Excel displays the New Workbook task pane.

2. 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. Right-click on the worksheet tab labelled Sheet 1 in the shopping list workbook.

2. Select Move or copy…

Excel displays the Move or Copy dialog, as shown in Figure 1.5 on page 11.

3. Select Book 1 from the To book pop-up menu.

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

Figure 1.6 Deleting a non-empty worksheet

Warning

Once you click on Delete, the data that the sheet contained is gone for good—there is no Undo operation!

Page 19: Guide to excel

Bending Excel to your will 13

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.

Figure 1.7 Worksheet after copying

Page 20: Guide to excel

Step 1—Getting started with Excel14

Here’s how you turn this feature off, so that you get whole menus all the time:

1. Select Tools ➪ Customize…

2. Click on the Options tab.

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

4. 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. Select Tools ➪ Options… and select the Calculation tab.

2. Click in Manual to enable this option.

3. 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. Select Tools ➪ Options.

2. Click on the General tab.

3. In the Default file location field, enter the full pathname of the folder you want to use as the default for your Excel document.

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

Page 21: Guide to excel

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. Select Tools ➪ Customize…

2. Click on the Toolbars tab if it’s not already displayed.

3. Click to select the toolbars you want. Notice that there are toolbars here that aren’t even displayed in the View menu!

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

Page 22: Guide to excel

Step 1—Getting started with Excel16

■ 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. Select Tools ➪ Customize…

2. Click on the Commands tab.

3. Select Built-in Menus from the Categories list.

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

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.

Note

As Excel treats the menu bar as just another toolbar, it’s possible to Alt-drag an entire menu off the menu bar! If you do this, you will need to use a different method to replace the menu.

Figure 1.8 A new Excel menu

Page 23: Guide to excel

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.

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.

Figure 1.9 Document properties

Page 24: Guide to excel

Step 1—Getting started with Excel18

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.

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.

Page 25: Guide to excel

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.

Quiz1. How is a cell defined in Excel?

2. How do you tell Excel that the contents of a cell is a formula?

3. Can a formula in a worksheet make use of data stored in another worksheet?

4. What is the editing field used for in Excel?

5. How many rows does an Excel worksheet have?

6. How do Excel templates differ from workbooks?

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

Page 26: Guide to excel
Page 27: Guide to excel

S T E P

2

Working with

spreadsheet data

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. Open a blank workbook in Excel.

2. Click in cell A1 to highlight it.

3. Enter the following:

12 Return

12.25 Return

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

Page 28: Guide to excel

Step 2—Working with spreadsheet data22

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

Now do another short exercise:

1. Click again in A1 to select it.

2. Enter the following:

14 Return

14 Return

14 Return

14 Return

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.

1. In scientific notation, numbers are expressed as a mantissa and an exponent. The mantissa con-tains the significant digits of the number in the range 0–9, and the exponent contains the powerof ten to be applied to the mantissa. For example, 12.25 is ‘1.225E1’ in scientific notation, while1001 is ‘1.001E3’. For numbers less than 1 a negative exponent is used, for example 0.0033 iswritten as ‘3.3E-3’. If this seems hard to understand, try mentally moving the decimal point in themantissa by the number of places after the ‘E’ in the exponent, to the left if negative, and to theright if positive. Scientific notation provides a convenient way to handle very large or very smallnumbers.

Page 29: Guide to excel

Editing cell data 23

You should now see something like this:

Here’s what’s happened:

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.

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 there-fore 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’.

Page 30: Guide to excel

Step 2—Working with spreadsheet data24

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

2. To select a range of cells, click in the first cell and drag to select all the required cells.

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

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

5. To select an entire column, click on the column title.

6. To select an entire row, click on the row number.

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

8. 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. Open a new blank workbook in Excel if you need to.

2. Enter three numbers in three cells of the same column, using Return to move between cells.

3. Click in the first cell again and drag downwards to select all three cells. You should see something like this:

Page 31: Guide to excel

Editing cell data 25

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

5. 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. Using the same workbook you used in the previous exercise, select the three cells that contain numbers again.

2. With the mouse cursor within the selected cells but not over their boundary, right-click to display the pop-up menu.

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

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

Page 32: Guide to excel

Step 2—Working with spreadsheet data26

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. Close your currently open workbook, if you have one open, discarding the data.

2. Open a new blank workbook.

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

Page 33: Guide to excel

Editing cell data 27

6. 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 click-ing 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.

Page 34: Guide to excel

Step 2—Working with spreadsheet data28

1. In the worksheet you already have open, click and drag to select some data.

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

3. Click on the sheet selector for Sheet 2.

4. 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. Select File ➪ New and click on the Blank Workbook link in the task pane.

Excel opens a new blank workbook in the same window.

2. Select Window ➪ Book1 to return to the original workbook.

3. Click and drag to select some data.

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

5. Select Window ➪ Book2 to display the second workbook.

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

Page 35: Guide to excel

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. Open a new blank workbook.

2. Click in cell A1 to select it.

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

—which is not very exciting.

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

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

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.

Page 36: Guide to excel

Step 2—Working with spreadsheet data30

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.

Page 37: Guide to excel

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. Close your current workbook, if you have one open, discarding the changes.

2. Open a new blank workbook.

3. Enter numbers in the first few rows, as shown below:

Page 38: Guide to excel

Step 2—Working with spreadsheet data32

4. Click to select cell B4.

5. Right-click and select Delete… from the pop-up menu. In the dialog, select Shift cells up. Click on OK.

6. Now select Edit ➪ Undo and repeat step 5, this time selecting Shift cells left.

7. 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. Click on the title of column C to select the entire column.

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

3. Now select Edit ➪ Undo and click on the titles of columns C, D and E to select them.

4. Select Insert ➪ Columns.

This time, because you had three columns selected, Excel has inserted three new blank columns.

5. Now select Edit ➪ Undo and click on the title of row 4 to select it.

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

Page 39: Guide to excel

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. Close your current workbook, if you have one open, discarding the changes.

2. Open a new blank workbook.

3. Click in cell A1 to select it.

4. Enter 1 Return 2.

5. Now drag to select the first two rows.

6. Move the mouse cursor over the auto-fill handle—this is the dark square at the lower-right 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 numer-ical series with an increment of 1. It has therefore continued the series in the destina-tion 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.

Page 40: Guide to excel

Step 2—Working with spreadsheet data34

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. Close your current workbook, if you have one open, discarding the changes.

2. Open a new blank workbook.

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

Don’t miss the apostrophe from the last number.

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

5. Click in cell A1 to select it, then select Edit ➪ Find…

Excel displays the Find and Replace dialog, as shown in Figure 2.1.

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

Page 41: Guide to excel

Searching for data, replacing data 35

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.

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.

Figure 2.1 Excel’s Find and Replace dialog

Figure 2.2 Excel’s expanded Find and Replace dialog

Page 42: Guide to excel

Step 2—Working with spreadsheet data36

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. Close the Find and Replace dialog, if you left it open at the end of the last exercise.

2. Click in cell A1 to selected it, then select Edit ➪ Replace…

Excel displays the Find and Replace dialog with the Replace pane selected.

3. Enter 12 in the Find what field, and 14 in the Replace with field.

4. Click on Find next. Excel advances to cell B3, the first occurrence of 12.

5. Click on Replace.

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

Figure 2.3 Excel’s Find All feature in action

Page 43: Guide to excel

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. Close your current workbook, if you have one open, discarding the changes.

2. Open a new blank workbook.

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

4. Enter the following data:12 Return 1 Return 24 Return 23 Return 15 Return

5. Click to select any of the cells that have numerical contents.

6. Click on the sort button in the Standard toolbar. Excel sorts the column of numbers in ascending value.

7. 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. Close your current workbook, if you have one open, discarding the changes.

2. Open a new blank workbook.

3. Click to select cell B3.

4. Enter the following data:

Peter Tab 2500 Return Mary Tab 1233 Return Joe Tab 4500 Return

Mike Tab 3422 Return Al Tab 5600

You can think of this as maybe monthly revenue per salesperson, or something relevant like that.

5. Click in cell B5 (or any cell containing data in column B).

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

7. Select Edit ➪ Undo to remove the sort, then click in cell C5 (or any cell in column C that contains data).

Note

You can only sort data by one or more columns—you cannot sort data by rows.

Page 44: Guide to excel

Step 2—Working with spreadsheet data38

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.

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. Drag to select the range of cells B3 to C7.

2. Select Data ➪ Sort… Excel displays the Sort dialog, as shown in Figure 2.5.

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

Figure 2.4 Excel’s Sort Warning dialog

Figure 2.5 Excel’s Sort dialog

Page 45: Guide to excel

Sorting data 39

Done!

4. Click on OK to perform the sort.

You’ve now used both types of sort that Excel offers. Finally, as exercises:

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

Page 46: Guide to excel

Step 2—Working with spreadsheet data40

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.

Quiz1. What is the purpose of a cell format in Excel?

2. How could you copy the contents of column B and column D at the same time?

3. How would you copy a block of cells from one worksheet to another within the same workbook?

4. What happens to cell references when you move or copy a formula?

5. How does Excel use colour to make editing formulae easier? Try it to remind yourself.

6. If you entered 1/3/05 in a cell, selected the cell and duplicated it by dragging, what would the new cell contain? Why?

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

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

Page 47: Guide to excel

S T E P

3

Using spreadsheet

formulae

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.

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

Page 48: Guide to excel

Step 3—Using spreadsheet formulae42

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 self-explanatory:

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 infor-mation about the state of other cells. For example ISBLANK(), which returns FALSE if a cell or range of cells has contents, else TRUE.

Page 49: Guide to excel

Using Excel formulae 43

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. Open a new blank workbook.

2. Click in cell B3 to select it.

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

4. Enter:

Flour Tab 1.1 Return Potatoes Tab 0.85 Return Meat Tab 2.26.

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 trigo-nometrical 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-distri-bution 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.

Category Includes

χ

Page 50: Guide to excel

Step 3—Using spreadsheet formulae44

Here’s what things should look like now.

5. Click in the cell two below Meat and type Total Tab.

6. Click in the formula bar and type ‘=’

7. Now click in cell C3. Note that Excel has entered ‘C3’ in the formula bar.

8. Enter ‘+’ and then click in cell C4.

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

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. Click in cell C8 to select it.

2. In the formula bar, drag to select C3+C4+C5+C6.

3. Select Insert ➪ Function…

4. In the Insert Function dialog, enter sum in the Search for a function field, then press Return. Excel will select the SUM() function.

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

+ Add

- Subtract

* Multiply

/ Divide

Page 51: Guide to excel

Using Excel formulae 45

ing and dragging. Try it now to see how it works.

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

Note that as soon as you enter the ‘(’ for the function MAX(), Excel prompts you with the correct syntax for the function.

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

The COUNT() function returns the number of cells from the specified range that contain numbers. It ignores cells that contain text or logical values.

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

Figure 3.1 Function Arguments dialog for SUM()

Page 52: Guide to excel

Step 3—Using spreadsheet formulae46

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

which is 1.365.

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

Lowest = < > <= >= <> Comparison: equal, less than, greater than, less than or equal, greater than or equal, not equal

Page 53: Guide to excel

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. Reopen your shopping list workbook, if it’s not still open from the previous section.

2. First, add the titles ‘Item’, ‘Pounds’ and ‘Euros’ in cells B2 to D2.

3. Drag to select these cells again, then click on the button in the formatting toolbar to set the titles to bold.

4. In cell F2, enter:

Euros per Pound Tab 1.52118 Return

(or substitute the current conversion rate)

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

Page 54: Guide to excel

Step 3—Using spreadsheet formulae48

Your worksheet should now look something like this:

6. Click in cell D3 and enter the following:

=C3*G2 Return

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.

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

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

Page 55: Guide to excel

Using mixed cell references 49

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.

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.

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

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, column-absolute and relative references. Excel is usually clever enough to work out which reference to change.

Tip

You can ‘nest’ Excel functions. For example:

=SUM(A1:A12,SUM(B1:B12))

means the same as:

=SUM(A1:A12)+SUM(B1:B12)

Page 56: Guide to excel

Step 3—Using spreadsheet formulae50

Excel can display a wide variety of error messages. Those you are most likely to encounter are:

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

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.

Page 57: Guide to excel

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. Reopen your shopping list worksheet.

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

3. Select cell B13, then enter:

Average cost Tab =AVERAGE(C3:C6) Tab =AVERAGE(D3:D6) Return

4. We want to add a new column for our conditional test values, so click on the column title of column E, then select Insert ➪ Columns. Excel adds a new blank column for you.

Notice that your euro/£ conversion rate is now in cell G2 and not cell F2. However, 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.

5. Select cell E2 and enter:

Above average? Return

6. Click and drag the column divider between column E and column F to make column E wide enough to display the whole title.

7. Select cell E3 and enter:

=IF(C3>$C$13,"Yes","No") Return

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.

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

Note

If a cell that is the destination of an absolute reference is itself moved as a result of editing, Excel updates all the absolute references to the cell to keep it correct. This is usually precisely what you want it to do.

Page 58: Guide to excel

Step 3—Using spreadsheet formulae52

Done!

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:

Without an IF() function, it would be difficult or impossible to model this type of calculation in a spreadsheet.

Balance Interest rate

< £1,000 3.75%

£1,000–£9,999.99 4.0%

£10,000–£99,999.99 4.25%

Page 59: Guide to excel

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.

Quiz1. What is the purpose of Excel functions?

2. What is the main difference between a mathematical and a logical function?

3. What does the COUNT() function do?

4. Unless you tell it not to, Excel does addition before multiplication: true or false?

5. How would you tell it not to?

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

Page 60: Guide to excel
Page 61: Guide to excel

S T E P

4

Improving a

sheet’s appearance

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.

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

Page 62: Guide to excel

Step 4—Improving a sheet’s appearance56

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. Reopen your shopping list workbook if you need to.

2. Select the first cell in the Pounds column.

3. Select Format ➪ Cells…

4. Excel displays the Format Cells dialog.

The dialog contains tabs for Number, Alignment, Font, Border, Patterns and Protection. We’ll be visiting and using all of these later in this step.

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

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

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

8. We’ll apply the euro formats in one step. Click and drag to select cells D3 to D6. Select Format ➪ Cells…

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

Tip

The shortcut key for Format ➪ Cells… is Ctrl-1, and it’s one that is worth remembering, as you’re likely to use the formatting dialog frequently.

Page 63: Guide to excel

Setting display formats for data 57

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.

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.

Figure 4.1 Excel’s Paste Special dialog

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…

Page 64: Guide to excel

Step 4—Improving a sheet’s appearance58

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. Open a blank workbook.

2. Enter a large number in any cell.

3. Select the cell.

4. Select Format ➪ Cells… and click on Number in the Category menu.

5. Set the Decimal places value to 0, then click in Use 1000 Separator to enable it.

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

Page 65: Guide to excel

Setting display formats for data 59

Here’s a short exercise to show different date formats:

1. Start with a blank worksheet.

2. Select any cell and enter 1/1/0 Tab (1st January 2000)

3. Note how Excel formats the date when you press Tab.

4. Reselect the cell and then select Format ➪ Cells… Note that Date is already selected as the cell format’s Category.

5. Click to examine the Locale menu. This is where you can select date formats appropriate to other countries if you need to.

6. Scroll to the last option in the Type list, 14 March 2001, then click on OK.

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.

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. Open a blank workbook.

2. In cell A1, enter the following:

1/1/04 Return 2/1/04 Return

3. In cell A3, enter:

=A2-A1 Return

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.

4. Using Format ➪ Cells… apply the General format to A3.

Now you get the correct answer, 1 day.

Note

It’s very important to realise that the cell’s format only affects the way a numerical value is displayed. Excel always holds numerical data in the same format internally.

Page 66: Guide to excel

Step 4—Improving a sheet’s appearance60

To see how this works in practice:

1. Start with a blank worksheet.

2. Click in A1 to select it, then enter:

12 Return 4 Return

3. In A3, enter =A2/A1

A3 now contains the content of A2 divided by the contents of A1, or 3.3333.

4. 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. Click in A1 and enter the number A. Click Return.

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

3. Enter your desired percentage in A2, then click on Return.

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

Page 67: Guide to excel

Setting display formats for text 61

It’s easy to do:

1. In a blank cell, enter the number to be displayed, say 12.

2. Select Format ➪ Cells…

In the Format Cells dialog, select the Number tab, then select Custom from the list of formats.

3. Under Type, select 0. This will display whole integer numbers only.

4. 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. Reopen the shopping list workbook.

2. Click on the select all button.

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

Page 68: Guide to excel

Step 4—Improving a sheet’s appearance62

Georgia or Palatino. (The exact fonts installed on your computer may vary.)

4. Select a smaller font size, for example 9 point, under Size.

5. 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. Re-open your shopping list workbook if you need to.

2. Click and drag to select the two totals figures, which are probably cells C8:D8.

3. 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 9-point 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.

Page 69: Guide to excel

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. Re-open your shopping list workbook if you need to.

2. Click and drag to select the items list and their titles. These are probably cells B2:E6 in your worksheet.

3. Select Format ➪ Cells…

In the Format Cells dialog, select the Patterns tab, then choose a colour to highlight the selected cells. Click on OK.

4. Repeat step 3 for the Total line, using a different colour if you want to.

5. 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 totals figures. This is done using the Font pane of the Format Cells dialog, so…

6. Select the two totals figures only, probably cells C8:D8 in your worksheet.

7. Select Format ➪ Cells…

In the Format Cells dialog, select the Font tab, click on the widget adjacent to the Color 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.

Tip

When highlighting cells, stick to pale pastel shades to avoid reducing the contrast of the text.

Tip

Coloured text or numbers, as opposed to tinted areas, are most useful to indicate status information such as positive or negative amounts. You can include colour in this way in custom number formats—see Excel’s help on ‘Number format codes’.

Page 70: Guide to excel

Step 4—Improving a sheet’s appearance64

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. Re-open your shopping list workbook if it is not already open.

2. Click and drag to select the titles Pounds and Euros.

3. Click on the right-align button

4. Click and drag to select the Above average? title and the No/Yes cells below it.

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

6. Click on the column title (E in our examples) to select the whole column.

7. Right-click and select Column Width… Excel displays the Column… dialog:

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

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. Click in B1 to select the cell.

2. Enter Shopping List Tab, then reselect cell B1 and click on the button to set the words in bold.

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

Page 71: Guide to excel

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. Selecting cells B1:E1.

2. Selecting Format ➪ Cells…

3. Clicking on Alignment.

4. Selecting Center for Horizontal.

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

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

Figure 4.2 The Alignment pane of the Format Cells dialog

Click and drag to set text alignment…

…or enter a numerical angle in degrees here

Page 72: Guide to excel

Step 4—Improving a sheet’s appearance66

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 ‘£’.

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. Reopen your shopping list worksheet if you need to.

2. Drag to select cells B2:E6 (or the titles and amounts in your example).

Figure 4.3 Loan repayment calculator

Page 73: Guide to excel

Protecting a sheet’s contents 67

3. Select Format ➪ Cells… and click on the Border tab.

Excel displays the dialog shown in Figure 4.4.

The Presets allows you to quickly set or clear the outer or inner rulings for a group of cells.

4. Click on one of the heavier solid line styles under Style, then on Outline.

Notice how the Border diagram illustrates the resulting effect.

5. Now select one of the dotted line styles under Style, then click on Inside.

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

Figure 4.4 Excel’s cell border dialog

Note

You must always select the line style first, then apply it using a preset or the Border map, rather than the other way around.

Page 74: Guide to excel

Step 4—Improving a sheet’s appearance68

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. Reopen your shopping list worksheet if it’s not already open.

2. Click in the column titles of the columns the data occupies (probably F and G) to select them.

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

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. Reopen your shopping list worksheet if it’s not already open.

2. Click to select the title Euros per Pound and the conversion factor.

3. Right-click and select Cut.

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

Page 75: Guide to excel

Protecting a sheet’s contents 69

4. Click on the worksheet tab for Sheet 2.

5. Click anywhere convenient in Sheet 2.

6. Right-click and select Paste.

7. Click on the worksheet tab for Sheet 1 again.

Notice that the euros figures are still correct.

8. 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. Select the cells that form the Item and Pounds columns, for example cells B3:C6.

3. Select Format ➪ Cells… and click on the Protection tab.

Page 76: Guide to excel

Step 4—Improving a sheet’s appearance70

4. Click in Locked to clear the cell lock flags, then click on OK.

5. Now select Tools ➪ Protection ➪ Protect Sheet…

Excel displays the Protect Sheet dialog, as shown in Figure 4.5.

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.

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.

Figure 4.5 Excel’s Protect Sheet dialog

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!

Page 77: Guide to excel

Protecting a sheet’s contents 71

Done!

3. Deselect Gridlines and Row & column headers.

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

Figure 4.6 The finished worksheet

Page 78: Guide to excel

Step 4—Improving a sheet’s appearance72

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.

Page 79: Guide to excel

Protecting a sheet’s contents 73

Quiz1. What do cell formats do?

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

Page 80: Guide to excel
Page 81: Guide to excel

S T E P

5

Working with charts

and graphs

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:

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

Page 82: Guide to excel

Step 5—Working with charts and graphs76

■ 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 cyl-inder, 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

Page 83: Guide to excel

Creating a simple chart 77

Such numbers could represent the relationship of one thing to another—it doesn’t mat-ter 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. 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…

2. Select Tools ➪ Protection ➪ Unprotect Sheet…

If the Protection menu shows Protect Sheet… instead, the sheet is already unprotected.

3. Click and drag to select the items and their corresponding cost in pounds (cells B3:C6).

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

5. Select Pie under Chart type, then choose the second option, the 3-dimensional pie chart. Click on Next >.

Page 84: Guide to excel

Step 5—Working with charts and graphs78

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

7. Add a title for your chart in the third wizard dialog if you wish, for example Shopping.

Click on Next >.

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

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

Figure 5.1 Excel’s Chart Wizard—first dialog

Page 85: Guide to excel

Creating other types of chart 79

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. Reopen the shopping list workbook if it’s not already open.

2. Click and drag to select the data in the Item, Pounds and Euros columns, including the titles.

3. Select Insert ➪ Chart…

4. Select the fourth option in the Chart Wizard dialog, for the two-dimensional bar chart. Click on Next >.

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

6. In the fourth wizard dialog, click in As new sheet, then click on Finish.

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.

Page 86: Guide to excel

Step 5—Working with charts and graphs80

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

2. Under Category, click on Number. Leave the decimal places at 2.

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

Page 87: Guide to excel

Editing charts and graphs 81

To try this out:

1. Reopen the shopping list example workbook if it’s not already open.

2. Use the worksheet tabs to make sure that Sheet 1 is displayed.

3. Right-click on the pie chart and select Chart Options… from the pop-up menu.

Excel displays the Chart Options dialog.

4. Click on the Legend tab and experiment with the different legend positions.

5. Click on the Data Labels tab and experiment with the various options.

Note that the Percentage option allows you to display numerical information that was not available before.

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

Warning

Excel displays different pop-up menus depending on which part of a chart is selected. This can lead to some confusion. For the examples here, when we say ‘right-click on the… chart’, we mean the white space surrounding the chart object, not the chart itself.

Page 88: Guide to excel

Step 5—Working with charts and graphs82

■ Double-click on the item you want to edit.

We’ll demonstrate this on the pie chart you embedded in your shopping list:

1. Reopen the shopping list example workbook if it is not already open.

2. Click on the title, Shopping. Excel displays the text box for the title:

3. Click after the word Shopping. You should get a text cursor.

Enter the word List.

4. Double-click on the legend. Excel displays the Format Legend dialog.

5. In the Patterns pane, select a pale grey and click in Shadow.

6. In the Font pane, change the font to Arial Bold.

7. In the Placement pane, change the legend placement to Left.

8. Click on OK.

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

Text box

Figure 5.2 Excel’s Format Legend dialog

Page 89: Guide to excel

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:

■ 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. Reopen the shopping list example workbook if it is not already open.

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

4. Use the techniques you learned in the previous section to change the font to Arial Bold.

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’

Page 90: Guide to excel

Step 5—Working with charts and graphs84

5. 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. Reopen the shopping list example workbook if it is not already open.

2. Right-click on the pie chart and select Source Data…

Excel displays the Source Data dialog, as Figure 5.3 shows.

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

Page 91: Guide to excel

Copying and moving charts 85

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.

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

Try this now:

1. Reopen the shopping list example workbook, if it is not already open.

2. Right-click on the shopping list pie chart and select Cut.

3. Select File ➪ New… and click on Blank Workbook in the task pane.

4. Right-click in cell A1 and select Paste.

Figure 5.3 Excel’s Source Data dialog

Tip

When you copy a chart to its own workbook, the live data links remain to the chart’s source workbook.

Page 92: Guide to excel

Step 5—Working with charts and graphs86

Excel pastes the pie chart into the new workbook’s Sheet1 worksheet.

5. Save the new workbook. Call it Shopping Pie (or anything else that takes your fancy that you can remember).

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

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

8. 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. 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. Re-open the workbook that contains your pie chart, if it’s not already open.

2. Right-click on the pie chart object and select Copy.

3. Start Word with a new blank document.

You can of course also do this with an exist-ing Word document—we are only using a new document here for the sake of the exercise.

4. Click in the Word document where you want to paste the chart.

5. Right-click and select Paste, or click the button on Word’s formatting toolbar.

Shopping list.xls The file name of the workbook containing the source data

Sheet1 The name of the worksheet within the workbook contain-ing the source data

$B3$C6 The absolute cell reference within the worksheet

Warning

Linked data is updated between Excel workbooks as soon as the data changes as long as both workbooks are open. However, data is only updated between an Excel workbook and a Word document when the Excel workbook that contains the data is saved.

Page 93: Guide to excel

Adding charts to Word documents 87

Done!

6. 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 double-click on the chart in Word, Excel is launched and opens the workbook containing the chart. This is referred to as an embed-ded chart.

Figure 5.4 Linked workbooks

Paste options

Page 94: Guide to excel

Step 5—Working with charts and graphs88

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.

Quiz1. If you want to plot how a car’s fuel consumption varies with its speed, would you use

a chart or a graph?

2. Why do pie charts always illustrate percentages, no matter what the data?

3. Embedding a chart in the worksheet that contains the data series it displays, rather than its own worksheet, gives you some advantages. Name one.

4. If you wanted to add items to the data series displayed by a chart, which command would you use?

5. What does the Data Table pane of the Chart Options dialog do?

6. How do you change the colour of a chart’s background?

7. How would you change the colour of a single slice of a pie chart?

8. How could you add more ticks to the vertical scale of your bar chart? Try it and see if it works.

9. If you open an Excel workbook and find a chart whose data range is shown as:='(Rabbit breeding.xls)Population'!$B2$C12what 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?

Page 95: Guide to excel

S T E P

6

Preparing andprinting data

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.

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

TTip

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.

Page 96: Guide to excel

Step 6—Preparing and printing data90

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?

Page 97: Guide to excel

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. Reopen the shopping list example workbook.

2. Select Tools ➪ Options…, click on Error Checking, and ensure that Enable background error checking is selected. Click on OK.

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

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.

4. 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 Calcu-lation Steps… if the cell contains the error, or Trace Error if the error has propagated

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.

Page 98: Guide to excel

Step 6—Preparing and printing data92

from another cell.

5. 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 rep-resented 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:

The buttons in this dialog perform similar functions to the menu options displayed

Figure 6.1 Excel’s error checking dialog

Page 99: Guide to excel

Preparing a worksheet for printing 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.

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

3. When you have visited all the cells that contain errors, Excel displays the following dialog:

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. Reopen the shopping list worksheet.

2. First, set the language option. Choose Tools ➪ Options…, click on Spelling and select the required language, for example English (U.K.).

3. Change Eggs to some non-word, such as ‘Grubble’.

4. Select Tools ➪ Spelling…

Excel stops at the first spelling error with the dialog shown in Figure 6.3.

Figure 6.2 No more errors

Page 100: Guide to excel

Step 6—Preparing and printing data94

The options here are the same as for Word’s spell checking:

5. Select the relevant option. Continue until Excel finds no further errors.

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.

Figure 6.3 Excel’s spell checking dialog

Page 101: Guide to excel

Preparing a worksheet for printing 95

Setting the print area

When you work with a Word document, you typically either want to print all of it, or only certain pages. Excel has no concept of pages until you format a worksheet for printing, and will happily print hundreds of blank sheets if you aren’t careful. Fortunately it allow you to print 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. Click on Close to close the Print Preview.

3. Click and drag to select just the title Shopping List and the table of items below it—omit the totals and other data.

4. Select File ➪ Print Area ➪ Set Print Area. Excel places a dotted line around the print area.

5. Select File ➪ Print Preview again. As you can see, Excel will now print only the area you have marked as the print area.

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

Setting the print area is optional. If you do not set a print area, Excel will print the entire worksheet or workbook, as you specify.

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.

Page 102: Guide to excel

Step 6—Preparing and printing data96

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. Select File ➪ Page Setup…

2. Click on Margins.

3. Use the widgets to set the margin sizes you need.

4. Click in the vertical or horizontal Center on page boxes to activate these options if you wish.

5. 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. Using your shopping list worksheet, select Sheet1.

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

3. Click on Custom Header…

Excel displays the Header dialog. This contains a left, centre and right section that correspond to what you want to print at the top left, top centre and top right of the page.

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.

Note

Excel has no concept of mirrored left-right pages, as Word does.

Page 103: Guide to excel

Preparing a worksheet for printing 97

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

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

Inserts the time. Allows you to format an inserted graphic for size, scaling and cropping.

Page 104: Guide to excel

Step 6—Preparing and printing data98

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

2. Select File ➪ Print Area ➪ Set Print Area. Excel places a dotted line around the print area.

3. Click to select the cell containing the Pounds total.

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

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

■ 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. Select File ➪ Page Setup… and click on Sheet.

2. Click on the button to the right of the Rows to repeat at top or Column to repeat at left fields.

3. Select the row or column to repeat in the worksheet.

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.

Page 105: Guide to excel

Preparing a worksheet for printing 99

4. Click on the button to return to the Page Setup dialog.

5. Click on Print Preview to see the results.

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

Page 106: Guide to excel

Step 6—Preparing and printing data100

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.

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

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.

Figure 6.4 Excel’s print dialog

Page 107: Guide to excel

Printing a worksheet or workbook 101

This is very similar to Word’s Print dialog. The options have the following functions:

Print what needs some explanation. Here’s how to print all the options available:

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.

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.

Page 108: Guide to excel

Step 6—Preparing and printing data102

Saving Excel data using different file types

We’re almost through with Excel, but there’s one final thing you need to know. When you saved your first Excel workbook in Step 1, you saw that the Save As dialog had a Save as type field, the default for which was Microsoft Excel Workbook. There are a number of other file types that you can use to save data from an Excel workbook, and you need to be aware of the purpose of these. The more important of these 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.

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.

Warning

Some alternative file types are not capable of saving all the information in an Excel workbook. If this is the case, Excel warns you when you save a workbook as one of these file types, as shown in Figure 6.5. You should also be aware that Excel itself cannot open some of the file types described here.

Figure 6.5 An Excel save warning for alternative file types

Page 109: Guide to excel

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.

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.

Figure 6.6 The shopping list example in text formats

Page 110: Guide to excel

Step 6—Preparing and printing data104

Done!

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…

Congratulations—you’ve completed the steps on Excel. But don’t forget to run through the quiz on page 106.

Figure 6.7 The shopping list example as a Web archive, viewed in Explorer

Page 111: Guide to excel

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.

Page 112: Guide to excel

Step 6—Preparing and printing data106

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

Page 113: Guide to excel

Glossary

Absolute reference A cell reference that does not change even if the cell contain-ing 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 refer-ence absolute, and ‘$C$2’ makes both row and column refer-ence 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.

Page 114: Guide to excel

Glossary108

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 graphi-cally. 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 integ-rity. Often referred to as a DBMS.

Dependent (cell) In Excel, a cell whose displayed value is dependent on the data stored in another cell.

Page 115: Guide to excel

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 mathemati-cal 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 refer-ence.

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.

Page 116: Guide to excel

Glossary110

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, extend-ing 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 manage-ment of a computer’s hardware and system operations, as well as providing a means of running application software.

Page 117: Guide to excel

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 select-ing commands with the mouse.

Software A term generally used for any computer program, to distin-guish 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 calcula-tions 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.

Page 118: Guide to excel

Glossary112

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.

Page 119: Guide to excel

Index

AAbsolute reference 47, 107Application program 107, 111Auto-fill, in Excel 33, 107AVERAGE function 45

BBackground, setting in Excel 62Bit 107Book

overview vtext features vi

Border, on cells in Excel 65Browser 103

CCell

absolute reference 47borders in Excel 65clearing 31deleting 31, 32dependent 29, 108inserting 32locking, protection in Excel 69mixed references 49protection 69, 108relative reference 47selecting in Excel 24

Cell reference, changes in copy or move 28

Central processing unit 108Chart 108, 109

adding legends in Excel 80adding to Word documents 86changing type in Excel 83copying in Excel 85creating simple in Excel 77editing data range in Excel 84editing in Excel 81in Excel 75moving in Excel 85other types in Excel 79

Chart Wizard 77, 79, 80Clearing cell in Excel 31Colour, setting in Excel 62Column

deleting in Excel 32inserting in Excel 32locking in Excel 8selecting in Excel 24

Comment, adding to cell 30Computer 108Computer-aided design 108Conventions viCopying

chart in Excel 85data in Excel 24–29worksheet in Excel 12

COUNT function 45

Page 120: Guide to excel

Index114

Creatingother chart types in Excel 79simple chart in Excel 77

Cursor 108Customising

Excel 13

DData 108

defining formats in Excel 60display formats in Excel 55editing chart range in Excel 84editing in cells 23, 30interpretation in Excel 21moving and copying in Excel 24–29non-adjacent in Excel 26number formats in Excel 57search, replace in Excel 34sorting in Excel 36

Data point 77, 108Data series 23, 77, 84, 108Database 108

functions in Excel 42Database management system 108DBMS, see Database management systemDefault printer 101Deleting

cell 31, 32worksheet in Excel 12

Dependent cell 29, 108#DIV/0! error message 50Document

setting default location in Excel 14

EEditing

cell data in Excel 23chart data range in Excel 84charts, graphs in Excel 81

Embedded chart 79, 87in Excel 95, 109

Errorchecking in Excel 91messages in Excel 49

Excel 1–104absolute reference 47, 107adding chart, graph legends 80

adding comments to cells 30adding document details 16adding headers and footers 96adding new worksheet 10adding page breaks 97auto-fill 33, 107AVERAGE function 45calculating, displaying percentages 59cell borders 65cell locking, protection 69cell references in copy or move 28changing chart type 83charts, graphs 75checking for errors 91checking spelling 93clearing, deleting cells 31compatibility with older versions 104compatibility with other applications 104conditional references 50controlling recalculation 14copying data between workbooks 27copying worksheet 12copying, moving charts 85COUNT function 45creating automatic series 33creating formulae 43creating other chart types 79creating simple chart 77customising 13data point 77, 108data series 23, 77, 84, 108defining data formats 60deleting cell, row, column 32deleting worksheet 12dependent cell 29, 108displaying text 61displaying toolbars 15editing cell data 23editing chart data range 84editing charts, graphs 81editing data in cells 30enabling toolbars 7error messages 49file types 10formulae 41function 4, 42, 45, 109getting help 17

Page 121: Guide to excel

Index 115

graph 4, 109how input is interpreted 21inserting cell, row, column 32locking row, column 8MAX function 45MIN function 45mixed references 49moving data between workbooks 27moving, copying data 24–29non-adjacent data 26number formats 57opening, saving workbooks 9order of processing formulae 46preparing worksheet for printing 90printing 89–104printing worksheet, workbook 100protecting worksheet contents 67relative reference 47renaming worksheet 11saving as Web page 103saving to different file type 102saving to text format 103search, replace data 34selecting cell, column, row 24setting colour, background 62setting default document location 14setting display formats 55setting font style 61setting menu length 13setting print area 95setting print margin 96setting printing options 98setting toolbars defaults 15setting up titles 98shortcut keys 17sorting data 36text wrapping, alignment 63toolbars 14, 15undoing changes 32user interface 5using different views 7using templates 102working with worksheets 10

Exponent 22, 110

FFile 109

saving as different type in Excel 102types in Excel 10

Folder 109Font

serif 61setting style in Excel 61

Footer 5adding in Excel 96

Formulachecking for errors 91creating in Excel 43in Excel 41order of processing in Excel 46

Function 4, 109conditional 50in Excel 42, 45

GGraph

adding legends in Excel 80editing in Excel 81in Excel 4, 75, 109

Graphical user interface 109

HHardware 109##### error message 50Header

adding in Excel 96Help

in Excel 17HTML 103, 109Hyperlink 109Hypertext 109

IInkjet 100, 110Inserting cell 32Instruction 110

Page 122: Guide to excel

Index116

LLaser printer 100, 110Legend, adding to chart, graph in Excel 80Locking row, column in Excel 8

MMantissa 22, 110MAX function 45Menu 110

setting length in Excel 13MIN function 45Modifier key 17, 110Monitor 79, 110Moving

chart in Excel 85data in Excel 24–29

N#NAME? error message 50Name extension 102, 110#NUM! error message 50

OOperating system 110

PPage break, in Excel 97Password 70Percentage, using in Excel 59Peripheral 111PostScript 101, 111Print area 97, 98, 100, 111

setting in Excel 95Print margin, setting in Excel 96Printer

inkjet 100, 110laser 100, 110

PrintingExcel workbooks 90in Excel 89–104setting options in Excel 98worksheet, workbook 100

Program 111

RRecalculation, controlling in Excel 14#REF! error message 50

Referenceabsolute in Excel 47conditional in Excel 50mixed in Excel 49relative in Excel 47

Renamingworksheet in Excel 11

Rowdeleting in Excel 32inserting in Excel 32locking in Excel 8selecting in Excel 24

SSaving

different file type in Excel 102workbook in Excel 9

Searchingfor data in Excel 34

Selecting cell, column, row in Excel 24Series, creating automatic in Excel 33Serif font 61Shortcut key 111

in Excel 17Software 111Sorting

data in Excel 36Spelling

checking in Excel 93Spreadsheet 1–104, 111

description 1Style

fonts in Excel 61

TTaskbar 27, 111Template, in Excel 102Text

alignment, wrapping in Excel 63display formats in Excel 61

Thumbnail 101, 111Title, setting in Excel 98Toolbar

customising in Excel 14, 15displaying in Excel 15enabling in Excel 7setting defaults in Excel 15

Page 123: Guide to excel

Index 117

UUndoing

in Excel 32User interface

Excel 5

V#VALUE! error message 50View

in Excel 7

WWarnings in text viWeb

saving data from Excel 103Web browser 103WIMP 112Wizard 77, 79, 80

Wordadding Excel charts 86

Word processor 112Workbook 4, 6, 10, 12, 16, 27, 112

adding document details 16and worksheet 4opening, saving 9printing 90, 100saving as different file type 102

Worksheet 4, 7, 8, 112adding new 10and workbook 4copying 12deleting 12preparing for printing 90protecting contents 67renaming 11working with 10

Page 124: Guide to excel