Excel - EzyLearn

Computer Training
What do you want to know today?
To book for training
Phone
1300 888 869
Excel
Module 303
AutoFill, Calculations & Formatting
© 2005 Steve Slisar: The copyright for this publication is owned by Steve Slisar. This publication or parts of it may not be reproduced in any
form physical or digital without the written consent of the copyright owner.
303 Excel 2005 - v4 050901
www.ezylearn.com.au
303 Excel 2005 - v4 050901
Table of Contents
TABLE OF CONTENTS...................................................................................................................................... 1
DOWNLOADING THE EXERCISE FILES ..................................................................................................... 2
EXTRACTING THE EXERCISE FILES .......................................................................................................... 3
CALCULATIONS ................................................................................................................................................ 4
FORMULA BASICS ............................................................................................................................................... 4
ENTERING FORMULAS ......................................................................................................................................... 4
FUNCTIONS ......................................................................................................................................................... 6
AUTOCALCULATE ............................................................................................................................................... 7
AUTOFILL TO COPY FORMULAS ........................................................................................................................... 8
FORMATTING..................................................................................................................................................... 9
GOALS ................................................................................................................................................................ 9
EXAMPLES OF FORMATTING ............................................................................................................................... 9
FORMATTING NUMBERS.............................................................................................................................. 10
NUMBER FORMATTING IN THE TOOLBAR ........................................................................................................... 10
NUMBER FORMATTING USING THE MENU BAR ................................................................................................... 10
DATE FORMAT .................................................................................................................................................. 11
FONT FORMATTING ........................................................................................................................................... 12
FORMAT PAINTER ............................................................................................................................................. 13
ALIGNING TEXT ................................................................................................................................................ 14
AUTOFORMATS ................................................................................................................................................. 16
REPEAT LAST ACTION....................................................................................................................................... 16
©2005 Steve Slisar
1
Phone: 1300 888 869
www.ezylearn.com.au
303 Excel 2005 - v4 050901
Downloading the exercise files
1. Visit our web site www.ezylearn.com.au
2. Click on the Training Module button (left panel)
3. On the right side, click on exercise files (next to the module you are doing)
4. You will be taken to a download page with a list of all the modules that require
exercise files. (see below)
©2005 Steve Slisar
2
Phone: 1300 888 869
www.ezylearn.com.au
5. Click on the module you want the exercise files for and you will be asked whether you
want to save or open. Click on Open. (or Run) (below)
303 Excel 2005 - v4 050901
Extracting the exercise files
6. After you click on open, your computer will open the file and you will then have the
opportunity to extract (or “unzip”) the files onto your own computer.
7. Notice what it says in the box under “Unzip to folder:” This is where the exercise files
will be extracted. You need to remember this for when you use Word or Excel and
want to open the exercise files.
8. The key to remember is that all exercise files will be in the C:\SLISAR folder.
9. Click the Unzip button and when the work is done, you will be told how many files
were extracted and moved to the “Unzip to folder:”
10. Click OK, then click Close on the window behind it.
11. Just remember the PATH of where the exercise files are found C:\SLISAR.
©2005 Steve Slisar
3
Phone: 1300 888 869
www.ezylearn.com.au
303 Excel 2005 - v4 050901
Calculations
Formula Basics
Formulas are used in Excel to calculate values. They all start with equals “=”, and they all use
cell references. It is important to use cell references when typing formulas because you can
then change the values in the cells and the results will automatically update.
In this example, we work out our profit (B4) by subtracting Expenses (B3) from Income (B2).
Notice that in the example on the right, we have the same formula, but when we change the
income, our Profit/Loss is automatically updated to reflect the new value. All because we
used the cell references on not specific values.
Formula keys
Notice that the multiply and divide keys are not on the keyboard?
Instead we use the * and the / keys, you’ll notice both of these in
your numeric keypad. Make sure your numeric keypad is turned on
first.
/
*
+
-
divide
multiply
add
subtract
You can use the numeric keypad just like you would a calculator.
Entering formulas
We are going to add the values in our spreadsheet to see how much we spend each month.
There are several ways to type in formulas and we are going to look at three of them:
a) Type the full formula in the cell
b) Use the mouse to click on the cells you want to refer to
c) Use the arrow keys to enter the cells you want to refer to.
©2005 Steve Slisar
4
Phone: 1300 888 869
www.ezylearn.com.au
303 Excel 2005 - v4 050901
Exercise: Enter formulas using the keyboard
We’ll start off by typing the formula. Make sure that you have downloaded the exercise files
from the EzyLearn website and are using the downloaded exercise file.
1. Open the file called costs2.
2. Click on A14 and type “Total”, then press the Tab key
3. In cell B13, Type the following formula: =B6+B7+B8+B9+B10+B11+B12
4. Press the Enter key. What is the answer? …………………………..
5. Notice how the answer goes into the cell.
6. Click on cell B13. Can you see the formula written in the formula bar?
That is why we have the formula bar, what you type in the cell isn’t always what is
displayed there and the formula bar makes it easier for us to deal with.
Exercise: Using the mouse to enter formulas
1. The costs2 file should still be open.
2. Click in C13 (that is where you want the result to go)
3. Press “=”, Click on C6 then press +
When you clicked on a cell, it put that cell reference into the formula bar?
4. Click on C7 then press +, Click on C8 then press +, Click on C9 then press +
5. Click on C10 then press +, Click on C11 then press +,
6. Click on C12 then press Enter
The thing to remember with this method is that as soon as you press =, Excel thinks you
are adding to the formula, so no matter where you click you are still in Formula mode.
If you find that you have made a mistake with your formula and you just want to start
again from scratch, press the esc key on your keyboard.
Exercise: Using the arrow keys to enter formulas
1.
2.
3.
4.
5.
6.
7.
8.
The costs2 file should still be open.
Type the following values into the spreadsheet.
Click in cell D13, and press “=”
Arrow up to D6, press +, then Arrow up to D7, press +
Arrow up to D8, press +, then Arrow up to D9, press +
Arrow up to D10, press +, then Arrow up to D11, press +
Arrow up to D12,
Press Enter
IMPORTANT: When we enter a formula and press an arrow key, Excel doesn’t enter the
value (like when we type text or values), instead it moves our text cursor around the
formula. If we want to accept the formula we need to press the Enter key.
Exercise: Another use for equals
You should have the costs2 file open and on your screen
1. Click in cell F1 and type the word “Summary”, then press enter
2. You should be in cell F2, type July, then press enter
3. You should be in cell F3, type August then press enter
4. You should be in cell F4, type September then press enter
5. Click in cell G2 and type “=”, then click on cell B13 and press Enter
6. What value went into cell G2? ……………………
7. Click in cell G3 and type “=C13” and press Enter
8. Click in cell G4 and type “=D13” and press Enter
Notice how formulas are used for much more than doing calculations.
They can be used to get information where you want it.
©2005 Steve Slisar
5
Phone: 1300 888 869
www.ezylearn.com.au
303 Excel 2005 - v4 050901
Functions
A function is a preset calculation like SUM, AVERAGE, etc. They often allow you to
perform more complicated calculations much faster.
These are the two buttons in the toolbar which give you access to Functions. The only
one we will have a look at in this course is AutoSum which is the left most of these two.
AutoSum
This function allows you to add the values in a given range of cells. When you select this
command, Excel will automatically enter the function into the active cell and select a
range of cells it thinks you want to add. If you are happy with what it has chosen you just
have to press the Enter key.
Exercise: AutoSum then select cells
1. Make sure costs2 file is still open.
2. Select cells B13:D13, and press the delete
button (this clears the formulas you previously
entered into those cells).
3. Click in cell B13,
4. Click the AutoSum button
5. If the formula is correct (see left) press Enter.
Notice that there is a Marquee (dotted line) around the
selected cells, and that the cells B6:B12 are
highlighted in the active cell.
There is another way to use the AutoSum button and that is to select the cells you’d like to
add together and then click on the AutoSum button. It will add the cells together and place the
answer at the end of them.
Exercise: AutoSum after selecting cells
1.
2.
3.
4.
5.
6.
Make sure costs2 is still open.
Select cells C6:C12
Click the AutoSum button
Press Enter
Save the file
Close the file
Notice that the result is placed at the bottom of the list.
AutoSum - What does it mean
=SUM(D6:D12)
SUM
(D6:D12)
:
is a function that adds all the values in a given range
everything in the brackets is what they call an argument. It has a syntax (a
correct way that it should be written)
The colon stands for everything between
©2005 Steve Slisar
6
Phone: 1300 888 869
www.ezylearn.com.au
303 Excel 2005 - v4 050901
AutoCalculate
This is a calculation that is automatically made for you in the Status bar. You need to make
sure that the Status bar is turned on and then you can choose the method of calculation you
want to have performed automatically.
Right-Click to change AutoCalculate
If you Right-click anywhere in the menu bar you will be presented with
these options (Excel XP). Notice that we have Sum ticked, this means that
when we select a range of cells, Excel will automatically calculate the sum
of them and display it in the Status bar.
Exercise: Use AutoCalculate
1.
2.
3.
4.
5.
Open the file called Fruit Sales
Right-click in the Status bar.
Which option has a tick next to it?
Click on Sum if that is not already ticked
Select cells B6 to D6
Look for the total in the status bar. Does it show the same value in
the as it does in cell E6 where there is a formula that ads the values
together?
6. Select cells B6 to B8
7. Does the Status bar show the same value as that in cell B9?
See how easy and handy AutoCalculate is?
8. Leave the file open
Exercise: More complicated AutoCalculations
1. Select cells B6 to D8
What is the Sum of these cells? ………………..
2. Right-click on the Status bar and choose Average from the shortcut menu
What is the average of these cells? …………….
3. Right-click on the Status bar and click on Max
What is the maximum value in the selected cells? …………………
4. Right-click on the Status bar and click on Count from the shortcut menu.
How many cells are there in the selection? …………………
5. Change the AutoCalculation back to Sum
6. You should still have cells B6 to D8 selected, so press and hold the Ctrl key down
and while it is down, click and drag from B12 to D14.
7. Work out the following calculations for the selected cell ranges
i. Sum?
………
ii. Average
………
iii. Min
………
iv. Count
………
8. Change the AutoCalculate to Sum.
9. Close the file without saving changes
©2005 Steve Slisar
7
Phone: 1300 888 869
www.ezylearn.com.au
303 Excel 2005 - v4 050901
AutoFill to copy formulas
We’ve used AutoFill to create a series and now we’ll use it as a quick way to copy formulas
from one cell to several others. It will save us a lot of time.
When a formula is copied, the cell references are automatically adjusted relative to the
change in the column and row positions. This is based on what they call Relative Cell
References.
Exercise: Copy formulas using the Fill Handle
1. Open the file Fruit Sales and click on
cell B9
2. Move your mouse to the fill handle
and drag across to E9.
3. Click in cell D9 and notice that the
formula is correct
4. Click in cell B15 and then click and
drag the fill handle to E15
5. Click in cell B17 and then click and
drag the fill handle to E17
Have another go…
This time we will fill down rather than
across. It works both ways.
1. Click in cell E6 and click and drag
the fill handle down to E8
2. Click in cell E12 and click and drag
the fill handle down to E14
3. Save the changes you have just made
and close the file.
©2005 Steve Slisar
8
Phone: 1300 888 869
www.ezylearn.com.au
303 Excel 2005 - v4 050901
Formatting
Formatting is the word used to change the appearance of your spreadsheet, just like when you
change the formatting of text in a Word Processor.
Goals
Apply formatting to text and numbers
Duplicating formatting from one cell to another using Format Painter
Use AutoFormats
Change Alignment & Borders
Examples of Formatting
Point out in the diagram above where each of the following formatting applies.
Exercise: Identify types of formatting
1.
2.
3.
4.
5.
Text formatting
Merge and Centre
Currency formatting
Rotating text
Right aligned text
©2005 Steve Slisar
6. Background (or fill) colour
7. Indentation
8. Column width
9. Row height
10. Borders
9
Phone: 1300 888 869
www.ezylearn.com.au
303 Excel 2005 - v4 050901
Formatting Numbers
When entering numbers in Excel you only need to type them in. You can change their
appearance after you’ve done all your typing. Any number formatting you do does not change
the number entered into the cell. The default number format for all cells in a new worksheet is
General Format.
Number formatting in the toolbar
The following buttons in the “Formatting Toolbar” effect the number formatting.
Currency
Comma
Percentage
Increase decimal
Decrease Decimal
When using Excel, you can enter text as simply as possible and change the way it looks later.
Number formatting is one of the ways you can change the way text looks.
Number formatting using the menu bar
Using formatting options we can make many changes to the way
the information is presented. Click on Format in the menu bar
and then Cells and you will see a number of options appear in the
“Format Cells” dialog box. The headings (tabs) show the
different areas where you can change formatting. Let’s go for a
tour of these.
Notice that in the diagram to the left that we have selected the
Currency Style? When this option is selected it gives us a
number of further options:
i) How many decimal places
ii) Which currency symbol
iii) How to show negative values
The other common command here is what type of date
formatting do you want?
Exercise: Apply number formatting
1.
2.
3.
4.
5.
Open the file Sales Report and go to the VIC sheet.
Select the range B4:H10, then Click Format, Cells and go to the Number tab
Choose Currency, Change Decimal places to 0, Click on OK
Go to the QLD sheet, Select cells B4:H10
Click on the Currency button in the formatting toolbar
Notice that it gives us 2 decimal places?
6. Click on the decrease decimal button twice to reduce it to 0 decimal places.
7. Click the Totals sheet, Select cells B4:H10
8. Make them currency with no decimal places (use any method you prefer)
©2005 Steve Slisar
10
Phone: 1300 888 869
www.ezylearn.com.au
303 Excel 2005 - v4 050901
Date Format
The date can be formatted in a number of ways. You may
enter the date in a format that you like, yet Excel may
display it differently. The reason is all to do with Date
Formatting.
Notice in the top diagram that cell B2 is displayed as 1/1
even though we typed 1/01/2001 (see formula bar)
In the bottom diagram we have the same information in the
formula bar, but the contents of the cell look completely
different.
Exercise: Change the date format
1. Open the file Sales Report and make sure you are in
the NSW sheet
2. Click on cell B2 and notice how it was written (in the
formula bar)
3. Choose Format, Cells… and make sure you are in
the numbers tab
4. Click on the Date Category and then select the type
which says 14-Mar-98 and click OK. (it will look
like the example below)
©2005 Steve Slisar
11
Phone: 1300 888 869
www.ezylearn.com.au
303 Excel 2005 - v4 050901
Font Formatting
Here is where you can change the way text looks in each cells or in a group of cells. Notice a
Preview Pain shows you what the text will look like. Your first step is to highlight the cells
that you want to highlight.
Font formatting on the formatting toolbar
Bold
Font
Italic underline
Font size
text colour
decrease text
increase text
Font formatting using the menu bar
Select the cells (or text) you want to format
and then click on Format, Cells to come up
with the Format Cells dialog box below. Then
click the Font tab.
Exercise: Change Font formatting
1. Make sure Sales Report is open and you are in the VIC sheet.
2. Select cell A1 and click on the drop down arrow next to the font size box in the
toolbar.
3. Choose the font size 24 points.
4. Select cells A3:H3 and change the font to Comic Sans MS and the size to 11 points.
5. Select cell A3 and make the font size 16pt and change the colour to blue.
6. Change the width of column A to 12 (89 pixels)
7. Change the width of columns B:G to 11.00 (82 pixels)
Exercise: Make several font formatting changes
To do this exercise you simply have to remember the formatting in each area and then apply it
to different areas in the spreadsheet. Do it this slow way and you’ll really appreciate the easy
way we are about to show you (format painter).
1. Make sure that Sales Report is open and go to the VIC sheet and click on cell A3.
Notice the formatting for that cell (Comic Sans MS, 16points, Blue, Bold etc).
2. Apply that same formatting to Sheet QLD, cell A3.
If you are asked to refer to that cell in an excel spreadsheet they would write it as QLD!A3
(the ! means that QLD is a sheet name and the A3 is a cell within that sheet)
3. Click in VIC!A1 and notice the formatting for that cell.
4. Apply the formatting in VIC!A1 to QLD!A1 (using either the formatting toolbar or the
menu bar)
©2005 Steve Slisar
12
Phone: 1300 888 869
www.ezylearn.com.au
303 Excel 2005 - v4 050901
Format Painter
This is a fantastic button which allows you to copy all the formatting of a
given cell and pasting it (duplicating it) in any other cell or group of cells. In
the previous exercise, we had to remember the formatting that we applied
somewhere by click in the cell and memorizing the formatting. Using the
format painter button we can do it much easier.
Here are the steps for using format painter:
a) Click in the cell whose formatting you’d like to duplicate elsewhere
b) Turn Format Painter on (there are two ways of doing that)
i. Click once on the format painter button (this will allow you to apply
that formatting only once and then turn the feature off)
ii. Double click on the Format Painter button (this will allow you to paste
that formatting many times until you decide you are finished
c) If you double-clicked to turn format painter on, click on the format painter
button (or press the esc key) to turn the feature off.
Exercise: Using format painter within a sheet
1. Make sure the file Formatting
Exercise is open.
2. Make sure you in the Page
Break Preview SHEET.
3. Click in cell A4 and change the
colour of the text to Orange ,
font to Comic Sans MS,
14points & not bold.
4. Double-click the Format
Painter button
5. Click in cell A9 and notice that
it copies the formatting of cell
A4 exactly.
6. Now that Format Painter is still
turned on, click in cells A11,
A16 & A17 individually.
Exercise: Using Format Painter between sheets
1. Open the file Sales Report Formatted
2. Click on the Totals sheet and select cell A3.
If someone wanted to display the last command, they could write it down as
TOTALS!A3 (Totals! means the Totals Sheet
3. Turn on the Format Painter (double-click)
4. Go to Sheet QLD and click on cell A3
Notice it copies the formatting between sheets
5. Make QLD sheet look exactly the same as the TOTALS sheet.
Exercise: Format Painter using Select all button
1.
2.
3.
4.
Click in a sheet that is formatted a way you like.
Click the Select All button (left of A column header)
Click the Format Painter button, then go to a sheet you want to format, and
Click on the Select All button (in the new sheet)
©2005 Steve Slisar
13
Phone: 1300 888 869
www.ezylearn.com.au
303 Excel 2005 - v4 050901
Aligning Text
Now we’ll have a look at changing the alignment of text. This includes things like
a) Indentation
b) Alignment (both horizontally which we most know about but also vertically
from top to bottom)
c) Rotation
d) Text Wrapping within cells
e) Merging cells
On Formatting toolbar
Left
Centre
Right
Merge & Centre
Using the menu bar
Select the cells you want to format, then click on Format, Cells and within the Format Cells
dialog box, click the Alignment tab to get the formatting options.
Notice that you have Horizontal AND Vertical alignment options, plus the option to change
the orientation (rotation) of the text.
Wrap Text
Wraps text within a cell and automatically adjusts the
row height to the space required.
Shrink to Fit
Shrinks the text so that it fits into the cell (cell size
does not change)
Merge Cells
Merges data across selected cell. Used in conjunction
with the Centre command when creating headings
which spread across many columns.
©2005 Steve Slisar
14
Phone: 1300 888 869
www.ezylearn.com.au
303 Excel 2005 - v4 050901
Exercise: Alignment formatting
1. Make sure the file Formatting Exercise is open
2. Select the cells B3:J3
3. Click on the Centre button
in the formatting toolbar
4. Select Cells A1:J1 and click on the merge and centre button
5. Notice that the cells are now merged and the text is centred.
6. Click in cell A1 then click on Format, Cells (menu bar) Alignment tab and notice that
a. The cells are merged, and
b. The Horizontal alignment is set to centred.
7. AutoFit column A.
8. Select cells B4:J4 and choose Format, Cells.
9. Click the alignment tab and change the orientation to 45% by
a. Clicking and dragging the Text indicator to 45%, or
b. Typing 45 into the Degrees box.
10. Select cells A5:A8 and A12:A15 (remember to use the Ctrl
key)
11. Click on the increase indent button
You have now used some of the most popular and common formatting options used in Excel.
It is a good idea to change the formatting of other spreadsheets you have created or been
given to go over some of the many options shown to you.
Despite these great formatting options available to us, it can be difficult sometimes to make
something look really professional so Microsoft have given us some AutoFormats.
©2005 Steve Slisar
15
Phone: 1300 888 869
www.ezylearn.com.au
303 Excel 2005 - v4 050901
AutoFormats
AutoFormats are pre-designed formatting options which anyone can use. They can change the
number, fonts, borders, alignment and other formatting all in one go.
AutoFormats are great to use if you want to quickly make a table look great without having to
think about which formatting to use.
Exercise: AutoFormats
1. Make sure you have the
Formatting Exercise file open.
2. Click on the AutoFormat sheet
(notice we have create a bare basic
spreadsheet for you to improve quickly)
3. Select cells A3:H8 and choose
Format, AutoFormat.
4. From the list choose Classic 3
and click OK. You may notice
that it has made quite a few
changes.
Exercise: AutoFormat options
1. If you have just completed the
last exercise, press the undo
button to bring the table back
to how we had it.
2. Make sure cells A3:H8 are selected
3. Choose AutoFormat from the Format option in the menu bar
4. Choose the Classic 3 options but before you go any further, click on the options
button.
Notice that you have the option to stop the software from applying all the AutoFormat
options. The option we don’t want to apply are Width/Height
5. Uncheck the Width/Height box and then click on OK.
Notice that the columns don’t change (really handy if you have spent a lot of time
trying to make everything fit.
Repeat Last Action
The F4 key on your keyboard (above the number 5 key) is the Repeat Last action key and we
will use it to quickly apply the last AutoFormat we did to the range of cells beneath the ones
we have just changed.
Exercise: F4 key
1. Select cells A10:H16
2. Press the F4 Key
Make sure you try this at some time in this course as it is a really handy way of repeating
something quickly. Remember if you press undo or something similar, that is your last
command so pressing F4 will simply do that command again.
©2005 Steve Slisar
16
Phone: 1300 888 869