THE COMPLETE
Microsoft Excel 2007
LEVEL 3
CompleteVISUALTM
Step-by-step Series
Computer Training Manual
www.computertrainingmanual.com
Microsoft
Excel 2007
Level 3
Copyright Notice
Copyright 2007 EBook Publishing. All rights reserved. No part of this publication may be reproduced, transmitted, or
translated into any language, in any form or by any means, electronically or mechanical, including photocopying,
recording, storage in a database or retrieval system, or otherwise, without the prior written permission of EBook
Publishing.
Disclaimer
We take great care to ensure the accuracy of these materials; however, EBook Publishing makes no warranty, express or
implies, including without limitation any warranty concerning the adequacy, accuracy or completeness of such information
or material or the results to be obtained from using such information or material. EBook Publishing reserves the right to
revise this publication and to make changes in its content at any time, without obligation to notify any person or entity of
such revisions or changes.
Microsoft
Excel 2007
Level 3
HOW TO USE THIS MANUAL
The CompleteVISUALTM step-by-step computer training manual is specially
developed and organized based on the Instructional Design concepts, to ensure
the effectiveness of the learning process.
Most of the tasks in each chapter fit into a single page for easy reference. Most
tasks are summarized to less than 10 key steps and accompanied by actual
screen illustrations. Every step you go through is practical and relevant. All
chapters are independent. No exercise files need to be installed prior to the
training, so you can start training from the modules that best suit you or your
trainees. However, the module sequence that we suggest is designed to optimize
your computer learning process.
Section name. Each
section groups related
chapters to make sure you
learn all the related features
and skills in complete
details.
Chapter name. Each
chapter is an independent
learning unit. No exercise
files need to be installed
prior to the training. This
lets you start your training
anywhere or anytime you
like.
Chapter introduction.
Each chapter begins with a
presentation and illustration
to prepare you for the
concepts you will learn.
Microsoft
Excel 2007
Level 3
HOW TO USE THIS MANUAL
Instructions
You are asked to
Click the Office Button >> Open.
Click the Office Button to expand the menu, and then, click the
Open command.
Hold down the Shift key while pressing the Tab key on the
keyboard.
Type the phrase Photo from Kevin Jeff.
Press <Shift>+<Tab>
Type Photo from Kevin Jeff.
Handy summary. Each
Task Name. Each task consists of a series of fully
illustrated step-by-step instructions, which help you
through the hands-on activities.
task concludes with a
summary that reinforces the
key steps in the task. It also
serves as a cue card for a
specific task.
Visual step-by-step
instructions take you
through hands-on activities
to accomplish each task.
These instructional actions
appear in bold.
The important commands or
keywords are highlighted in
this font and style.
The text that you need to
type in appears in this font
and styles such.
Detailed descriptions
and explanations on
each step help you to learn
more about the step that you
have just performed.
Actual screen
illustrations such as the
dialog boxes and the result
outcomes are displayed to
show you how they appear
on screen. This helps you
to learn visually and
effectively.
Appropriate tips, tricks,
and shortcuts that you may
find useful are included to further
enhance your skills.
A rectangle or circle is used
to draw your attention to the
part of the illustration that
you are dealing with.
Microsoft
Excel 2007
Level 3
TABLE OF CONTENTS
WORKING WITH TABLES ............................................................................... 7
Creating Tables .......................................................................................................................... 8
How To Create A Table .................................................................................................... 10
How To Change The Style Of A Table.............................................................................. 11
How To Create A New Table Style ................................................................................... 12
How To Show Or Hide Table Elements ............................................................................ 13
How To Create A Calculation In A Table .......................................................................... 14
How To Insert And Delete A Table Row ........................................................................... 15
How To Resize A Table .................................................................................................... 16
How To Convert A Table To A Range .............................................................................. 17
How To Sort The Data In A Table ..................................................................................... 18
How To Perform Multiple Sort ........................................................................................... 19
How To Customize The Sort Order ................................................................................... 20
Using The AutoFilter ............................................................................................................... 21
How To Enable / Disable The AutoFilter ........................................................................... 21
How To Apply / Remove The Filter ................................................................................... 22
How To Customize The Filter ........................................................................................... 23
Using The Advanced Filter ..................................................................................................... 24
How To Define The Criteria Range ................................................................................... 25
How To Use The Advanced Filter ..................................................................................... 26
Using Simple Database Functions......................................................................................... 27
How To Find The Sum Of Specific Records Using The Insert Function Button ............... 29
How To Find The Average Of Specific Records ............................................................... 31
How To Find The Maximum / Minimum Value Of Specific Records ................................. 32
How To Find The Number Of Records ............................................................................. 33
Using The VLOOKUP Function .............................................................................................. 34
How To Use VLOOKUP To Find Data .............................................................................. 36
How To Limit The Lookup Value For An Exact Match ...................................................... 38
How To Use The Closest Match For The Lookup Value .................................................. 39
CREATING A PIVOTTABLE AND ANALYZING DATA ................................ 40
Creating A PivotTable ............................................................................................................. 41
How To Create A PivotTable ............................................................................................ 42
Updating A PivotTable ............................................................................................................ 44
How To Update The Information In A PivotTable ............................................................. 45
How To Change The Layout Of A PivotTable ................................................................... 46
How To Add An Information Field To A PivotTable .......................................................... 47
How To Arrange Information In A PivotTable ................................................................... 48
How To Filter The Report In A PivotTable ........................................................................ 49
How To Filter Specific Records ......................................................................................... 50
Working With Calculated Fields In A PivotTable .................................................................. 51
How To Change The Calculated Field Value Settings ...................................................... 52
How To Insert A Calculated Field ..................................................................................... 53
How To Delete Calculated Fields ...................................................................................... 55
How To Change A PivotTable Options ............................................................................. 56
Creating A Chart From A PivotTable ..................................................................................... 57
How To Create A Chart From A PivotTable ...................................................................... 58
Exploring What-If Tables ........................................................................................................ 60
How To Create A One Variable What-If Table .................................................................. 61
 2008 ComputerTrainingManual.com
5
Microsoft
Excel 2007
Level 3
TABLE OF CONTENTS
How To Create A Two Variables What-If Table ................................................................ 63
Using Scenarios ....................................................................................................................... 65
How To Create Scenarios ................................................................................................. 66
How To Apply A Scenario ................................................................................................. 69
Implementing Problem Solving .............................................................................................. 70
How To Use The Goal Seek Tool ..................................................................................... 72
How To Load Add-Ins ....................................................................................................... 74
How To Use The Solver Tools .......................................................................................... 76
USING WORKGROUP FEATURES ............................................................... 78
Using Comments ..................................................................................................................... 79
How To Add A Comment Into A Cell ................................................................................. 80
How To Show/Hide Comments Permanently ................................................................... 81
How To Show/Hide Comment Indicators .......................................................................... 82
How To Inspect A Workbook ............................................................................................ 84
How To Apply Password Protection To The Editable Cells .............................................. 87
Sharing Workbooks ................................................................................................................. 88
How To Enable Workbook Sharing ................................................................................... 89
How To Merge Copies Of Shared Workbooks .................................................................. 92
How To Accept Or Reject Changes In A Merged Workbook ............................................ 93
How To Protect A Shared Workbook ................................................................................ 94
How To Track Changes In The Same Workbook ............................................................. 95
How To Accept Or Reject Changes From Different Users ............................................... 97
AUTOMATING ROUTINE TASKS WITH MACROS ...................................... 98
Understanding Macros ............................................................................................................ 99
How To Record A New Macro ........................................................................................ 102
How To Run A Macro ...................................................................................................... 104
How To Create A Run Macro Button On The Quick Access Toolbar ............................. 105
How To Show The Developer Tab .................................................................................. 106
How To Create A Macro Command Button On A Worksheet ......................................... 107
How To Edit The Command Button ................................................................................ 108
Editing A Macro ..................................................................................................................... 109
How To Edit Macro Coding ............................................................................................. 109
How To Rename A Macro ............................................................................................... 110
How To Delete A Macro .................................................................................................. 111
Using A Relative Reference Macro ...................................................................................... 112
How To Record A Relative Reference Macro ................................................................. 113
How To Run A Relative Reference Macro ...................................................................... 115
INTEGRATING DATA WITH OTHER APPLICATIONS ............................... 116
Importing / Exporting Data ................................................................................................... 117
How To Use The Text Import Wizard .............................................................................. 119
How To Export Data To Another File Type ..................................................................... 122
How To Copy Data From Other Applications .................................................................. 123
How To Insert An Object ................................................................................................. 125
Retrieving Data From A Database ........................................................................................ 127
How To Get Specific Information From Microsoft Query ................................................ 128
 2008 ComputerTrainingManual.com
6
Working
With Tables
Objectives:
When you have completed these
lessons, you will be able to:
Create A Table
Change And Create Table Style
Show Or Hide Table Elements
Create A Calculation In A Table
Insert And Delete A Table Row
Resize A Table
Convert A Table To A Range
Sort The Data In A Table
Customize The Sort Order
Enable / Disable The AutoFilter
Apply / Remove The Filter
Customize The Filter
Define The Criteria Range
Use The Advanced Filter
Find The Sum, Average, Maximum /
Minimum Value Of Specific Records
Find The Number Of Records
Use VLOOKUP To Find Data
Limit The Lookup Value For An Exact
Match
Use The Closest Match For The Lookup
Value
 2007 ComputerTrainingManual.com
7
Microsoft
Excel 2007
Level 3
WORKING WITH TABLES
Creating Tables
(Previously known as list)
A database is a collection of organized information. Normally, a database uses a
table to keep data in the form of fields and records. An Excel worksheet table can be
used as a database because the worksheet columns serve as fields while rows serve
as records.
Some of the new or improved functionality for tables are listed as below.
Table header rows
Table header rows can be turned on or off. When table headers are displayed, they stay
visible with the data in the table columns by replacing the worksheet headers when you
move around in a long table.
Calculated columns
A calculated column uses a single formula that adjusts for each row. It automatically
expands to include additional rows so that the formula is immediately extended to those
rows. All that you have to do is enter a formula once—you don't need to use the Fill or
Copy commands.
Automatic AutoFiltering
Helps you to sort and filter the data in the table.
Structured references
It allows you to use table column header names in formulas instead of cell references,
such as A1 or R1C1.
 2007 ComputerTrainingManual.com
8
Microsoft
Excel 2007
Level 3
WORKING WITH TABLES
Total rows
You can now use custom formulas and text entries in total rows but this is not supported
in earlier versions of Excel. If you want the table to remain in earlier versions of Excel,
you can remove the custom text and use only the formulas that are available in the total
row.
Table styles
You can quickly format a table by applying a theme-based table style but this
formatting cannot be displayed in earlier versions of Excel.
You can also resize the table easily using the sizing handle in the lower-right corner of
the table. However, you cannot create a table in a shared workbook.
 2007 ComputerTrainingManual.com
9
Microsoft
Excel 2007
Level 3
WORKING WITH TABLES
Before you begin, create a new worksheet with the data as
shown below or copy the [Creating Tables] worksheet from
the `Level3’ workbook.
How To Create A
Table
1.
Click any cell in the table.
Type in the table or copy the table from the Level3 workbook.
SUMMARY
1. Click any cell in the
table.
2. Click the Insert tab.
In the Tables group,
click the Table
button.
3. Click the OK button.
TIPS
 A table helps you to
manage and analyze
data easily. You can
then sort the records,
filter records, format
the data and perform
simple data analysis
easily.
2.
Click the Insert tab. In the Tables group, click the
Table button.
You can also press <Ctrl>+<T> to create the table. The table range is
automatically entered in the Create Table dialog box.
3.
Click the OK button.
The table is created, as shown below.
 2007 ComputerTrainingManual.com
10
Microsoft
Excel 2007
Level 3
WORKING WITH TABLES
How To Change
The Style Of A
Table
1.
Click any cell in the table you want to format.
You will not see the Design tab if you do not select any cell in the table.
SUMMARY
1. Click any cell in the
table.
2. Click the Design tab.
In the Table Styles
group, click the style
you want.
2.
TIPS
Click the Design tab. In the Table Styles group, click
the style you want.
The table styles shown on your computer may look different from those listed
below.
 You can also clear
the table style by
clicking the more
button, and then, click
Clear.
If you want to see more table styles, click the more button
The new table style applies to the table, as shown below.
.
 2007 ComputerTrainingManual.com
11
Microsoft
Excel 2007
Level 3
WORKING WITH TABLES
How To Create A
New Table Style
1.
Click the Home tab. In the Styles group, click the
Format as Table button.
SUMMARY
1. Click the Home tab.
2. In the Styles group,
click the Format as
Table button.
3. Click New Table
Style.
4. In the Name box,
type the style name.
5. In the Table Element
box, click the table
element you want to
format, and then click
the Format button to
specify the format.
6. Click the OK button.
.
2.
Click New Table Style.
The New Table Quick Style dialog box appears.
3.
In the Name box, type My New Style. In the Table
Element box, click the table element you want to
format, and then click the Format button to specify the
format.
After you have formatted the table element, it will be bold, as shown below. The
Preview area lets you preview your new table style.
TIPS
 The new style
appears in the
Custom area of the
table style list.
4.
Click the OK button.
The new table style is created.
 2007 ComputerTrainingManual.com
12
Microsoft
Excel 2007
Level 3
WORKING WITH TABLES
How To Show Or
Hide Table
Elements
1.
Click any cell in the table which you want to show or
hide the table elements.
2.
Click the Design tab. In the Table Style Options
group, click to select or clear the table element check
boxes.
The descriptions of the elements are shown in the table below.
SUMMARY
1. Click any cell in the
table.
2. Click the Design tab.
In the Table Style
Options group, click
to select or clear the
table element check
boxes.
.
Table Elements
Description
Header Row
Show / hide the header row. Headers stay
visible with the data by replacing the
worksheet headers when you scroll your
screen to move around in a large table.
Totals Row
Show / hide the totals row. They help you to
use a single formula that adjusts for each row
in a table.
First Column
Show / hide special formatting for the first
column of the table.
Last Column
Show / hide special formatting for the last
column of the table.
Banded Rows
Format odd and even rows differently for ease
of reference.
Banded Columns
Format odd and even columns differently for
ease of reference.
 2007 ComputerTrainingManual.com
13
Microsoft
Excel 2007
Level 3
WORKING WITH TABLES
How To Create A
Calculation In A
Table
1.
Click any cell in the table to which you want to create
calculation.
2.
Click the Design tab. In the Table Style Options
group, click to select the Total Row check box.
SUMMARY
1. Click any cell in the
table.
2. Click the Design tab.
In the Table Style
Options group, click
to select the Total
Row check box.
3. Click the cell in which
you want to create
the calculation.
4. Click the drop-down
button.
5. Click the function you
want.
The total row appears below the table, as shown below.
3.
Click the cell in which you want to create the
calculation. Then, click the drop-down button.
A list of functions appears, as shown below. Note: You can add calculation to
each of the columns.
4.
Click the function you want.
The calculation is created.
 2007 ComputerTrainingManual.com
14
Microsoft
Excel 2007
Level 3
WORKING WITH TABLES
How To Insert
And Delete A
Table Row
1.
Click the cell C6. Click the Home tab. In the Cells
group, click the Insert drop-down button.
If you click the Insert Sheet Rows, a new row is inserted for the entire worksheet.
SUMMARY
To insert a new table
row
1. Click the cell where
you want to insert a
new table row.
2. Click the Home tab.
In the Cells group,
click the Insert dropdown button.
3. Click Insert Table
Rows Above.
2.
Click Insert Table Rows Above.
A new table row is inserted to the table.
To delete a table row
1. Click the cell where
you want to delete the
table row.
2. Click the Home tab.
In the Cells group,
click the Delete dropdown button.
3. Click Delete Table
Rows
3.
In the Cells group, click the Delete drop-down button.
If you click the Delete Sheet Rows, the entire row is removed from the entire
worksheet.
4.
Click the Delete Table Rows button.
The table row is removed from the table.
 2007 ComputerTrainingManual.com
15
Microsoft
Excel 2007
Level 3
WORKING WITH TABLES
How To Resize A
Table
1.
Move your mouse pointer over the small triangle at the
lower-right corner of the table.
The pointer changes to a double-headed arrow, as shown below. Note: For this
exercise, simply add in a new Profit column, as shown below.
SUMMARY
1. Move your mouse
pointer over the small
triangle at the lowerright corner of the
table.
2. Click and drag to
resize the table.
3. Release the mouse.
2.
TIPS
Click and drag to resize the table.
Here, you drag to include the Profit column.
 You can also use the
ribbon to resize the
table.
Click in the table.
Then, click the
Design tab. In the
Properties group,
click Resize Table.
.
3.
Release the mouse.
The table is resized, as shown below.
 2007 ComputerTrainingManual.com
16
Microsoft
Excel 2007
Level 3
WORKING WITH TABLES
How To Convert
A Table To A
Range
1.
Click any cell in the table which you want to convert to
a normal range.
2.
Click the Design tab. In the Tools group, click the
Convert to Range button.
SUMMARY
1. Click any cell in the
table.
2. Click the Design tab.
In the Tools group,
click the Convert to
Range button.
3. Click the Yes button.
The Microsoft Office Excel dialog box appears, as shown below.
3.
Click the Yes button.
The table is converted to a range. Make sure you change the range back to a
table for the next task.
 2007 ComputerTrainingManual.com
17
Microsoft
Excel 2007
Level 3
WORKING WITH TABLES
How To Sort The
Data In A Table
1.
Click any cell in the column which you want to sort.
Before you begin, delete the Total row if you have it created in the previous task.
Here, you will sort the records by the Sales Values.
SUMMARY
1. Click the cell where
you want to sort the
column.
2. Click Data tab. In the
Sort & Filter group,
click the sort options
you want.
2.
Click the Data tab. In the Sort & Filter group, click the
Sort Larges to Smallest button.
The table data is sorted. The highest profit is shown in the top row.
TIPS
 You can sort the
records in ascending
or descending order
using any field in the
table. You are able to
sort multiple fields
too.
 The
appears next
to the Row Header to
indicate that the
records are sorted by
that column.
 You can also sort by
cell color, font color
and cell icon.
.
 2007 ComputerTrainingManual.com
18
Microsoft
Excel 2007
Level 3
WORKING WITH TABLES
How To Perform
Multiple Sort
1.
Here, you will sort the records by the Product Name and then by the Sales
Values.
2.
Click the Data tab. In the Sort & Filter group, click the
Sort button.
A Sort dialog box appears to help you sort the records by multiple columns or
rows, according to your custom list, case-sensitive sorts and etc.
SUMMARY
1. Click any cell in the
table.
2. Click the Data Tab.
In the Sort & Filter
group, click the Sort
button.
3. Specify the sorting
criteria.
4. Click the Add Level
button.
5. Specify the second
sorting criteria.
6. Click the OK button.
Click any cell in the column which you want to sort.
3.
Click the Sort by drop-down arrow, click Product, and
then click the Order drop-down arrow, click A to Z
option.
A Sort dialog box appears to help you sort the records by multiple columns or
rows, according to your custom
TIPS
 To delete a sort level,
click to select the sort
level you want to
delete, then, click the
Delete Level button.
4.
Click the Add Level button. Then, sort the second
level by Sales Value in Largest to Smallest order.
You have just set the two sorting criteria. First, Excel will sort the record by the
Product Name in ascending order and then by Sales Value in Descending order.
5.
Click the OK button.
The database is sorted by the Product Name and then by the Sales Values, as
shown below.
 2007 ComputerTrainingManual.com
19
Microsoft
Excel 2007
Level 3
WORKING WITH TABLES
How To
Customize The
Sort Order
1.
Click any cell in the column which you want to sort.
Here, you will sort the records by the Month and then by the Sales Values.
2.
Click the Data tab. In the Sort & Filter group, click the
Sort button.
A Sort dialog box appears to help you sort the records by multiple columns or
rows, according to your custom list, case-sensitive sorts and etc.
SUMMARY
1. Click any cell in the
table.
2. Click the Data tab. In
the Sort & Filter
group, click the Sort
button.
3. Click the Order dropdown arrow for the
sort options you want
to set.
4. Click the Custom
List.
5. Click to select the
custom list you want.
6. Click the OK button.
7. Click the next OK
button.
3.
For the first level sort, click the Order drop-down
arrow. And then, click the Custom List.
The Custom Lists dialog box appears.
TIPS
 You can click the
Options button to set
more sorting options.
4.
Click to select Jan, Feb,……from the list. And then,
click the OK button.
The sorting settings appear as shown below. Note: If you want to sort in another
list order, click the Add button to add in a new custom list.
5.
Click the OK button.
The records are sorted by month, then by the sales values.
 2007 ComputerTrainingManual.com
20
Microsoft
Excel 2007
Level 3
WORKING WITH TABLES
Using The AutoFilter
At times, you may want to show only the essential records. You can temporarily hide all
the rows that you do not need to view. If you have defined the range as a table, you can
filter the records using the drop-down arrows that appear on each header name. If you
have not defined the range as a table, you can still use the built-in AutoFilter, a filtering
mechanism that allows you to apply simple criteria to filter your records.
How To Enable /
Disable The
AutoFilter
1.
Click any cell in the table. Click the Data tab. In the
Sort & Filter group, click the Filter button.
The Filter button is a toggle button.
SUMMARY
1. Click any cell in the
table.
2. Click the Data tab. In
the Sort & Filter
group, click the Filter
button.
Drop-down arrows appear at each column header, as displayed below. When
you click the Filter button again, the drop-down arrows disappear. When you
click the Filter button again, the drop-down arrows disappear.
2.
Click the Filter button again.
The drop-down arrows disappear.
 2007 ComputerTrainingManual.com
21
Microsoft
Excel 2007
Level 3
WORKING WITH TABLES
How To Apply /
Remove The
Filter
1.
Click any cell in the table.
Make sure the drop-down arrow for the column headers are displayed.
SUMMARY
1. Click any cell in the
table.
2. To apply the filter
click the table header
drop-down arrow you
want, and then
specify the filter.
3. Click the OK button.
4. To remove the filter,
click the table header
drop-down arrow you
want, and then click
Clear Filter From
“<HeaderName>”
2.
Click the Month drop-down arrow and click at Feb to
remove its check mark. And then, click the OK button.
This means you want to display only the records for Mar.
Only the records for Mar are displayed.
3.
Click the Month drop-down arrow and click Clear Filter
From “Month”.
The table will be reset to show all the records.
 2007 ComputerTrainingManual.com
22
Microsoft
Excel 2007
Level 3
WORKING WITH TABLES
How To
Customize The
Filter
1.
Click the Sales Value drop-down arrow and click
Number Filters >> Custom Filter.
The Custom AutoFilter dialog box appears. Note: You can also click the preset
options from the list to help you create your customized filter more easily.
SUMMARY
1. Click the header
drop-down arrow for
the column you want
to filter.
2. Click Number Filters
>> Custom Filter.
3. Specify the criteria.
4. Click the OK button.
TIPS
 If you want to include
another set of criteria
in the filter, click the
And or Or option
buttons, and then
specify the criteria in
the boxes below.
2.
Specify the criteria Sales Value is greater than or
equal to 4000, as shown below.
You can use the asterisk (*) to represent any series of characters and the
question mark (?) to represent any single character in your settings.
3.
Click the OK button.
The table shows the records that meet the customized filter.
 2007 ComputerTrainingManual.com
23
Microsoft
Excel 2007
Level 3
WORKING WITH TABLES
Using The Advanced Filter
At times, you may want to apply more than 2 criteria (AutoFilter is limited to 2 criteria).
You can use the complex filter instead. Before you use the Advanced Filter command,
you have to set up and define the criteria range on the worksheet.
To Define The Criteria Range
 Use any cell on the worksheet to define the criteria.
 The criteria value is defined below the field name.
 Use a different row for OR criteria
 Use the same row but a different column for AND criteria
Important:
 The field names and the criteria in the criteria range are NOT case sensitive but the
spelling and the spacing must be an exact match with the records in the table.
 You can place the criteria range anywhere you want. You can define it on the same
worksheet, another worksheet or even a different workbook.
For example:
 2007 ComputerTrainingManual.com
24
Microsoft
Excel 2007
Level 3
WORKING WITH TABLES
How To Define
The Criteria
Range
1.
Type the following criteria range in the cells B12:B15
to find records that belong to John Smith OR Steve
Brown OR Mary Davis.
The field name is not case sensitive but the spelling and the spacing must be
exact match with the field name in the database.
Other examples:
Use the following criteria range if you want to find records
with the sales value more than 3000 AND less than or
equal to 4000.
Use the following criteria range if you want to find records
that belong to Mary Davis OR any other sales person
who has a sales value more than 4000.
 2007 ComputerTrainingManual.com
25
Microsoft
Excel 2007
Level 3
WORKING WITH TABLES
How To Use The
Advanced Filter
2.
Click the Data tab. In the Sort & Filter group, click the
Advanced button.
The Advanced Filter dialog box appears
SUMMARY
1. Define a criteria
range on the
worksheet.
2. Click the Data tab. In
the Sort & Filter
group, click the
Advanced button.
3. Specify the list range
and the criteria range.
4. Click the OK button.
3.
Click in the List range box, select range B2:F9. Click
in the Criteria range box, select range B12:B15.
B12:B15 is where you have defined your criteria. If you can’t see the list range
or the criteria range, click the
Select Range button. The Advanced Filter
dialog box collapses to let you spot the range more easily. Make sure the field
names in the range are selected as well.
TIPS
 If you want to remove
the filter and display
all the records again,
click the Clear button.
 In the Advanced Filter
dialog box, click the
Copy to another
location option
button if you want the
filtered list to be
copied to another
location.
4.
Click in the OK box.
The database is filtered. The invoice A007 by John Cage disappears.
 2007 ComputerTrainingManual.com
26
Microsoft
Excel 2007
Level 3
WORKING WITH TABLES
Using Simple Database Functions
Microsoft Excel provides powerful database functions that perform calculations
specifically for records that appear in a list or a database. Each database function needs
three arguments.
Dfunction(Database,Field,Criteria)
Arguments
Description
Database
The range of cells that make up the table or database
Field
The cell, which contains the field name for the field you want to
calculate in the function.
Criteria
The range of cells where the criteria / conditions for the function are
stated. (To define the criteria, refer to the task How To Define The
Criteria Range in The Advanced Filter lesson)
Note:
 The criteria range could be placed anywhere on the current worksheet or on a
different worksheet. However, try to avoid placing it below the database list, which
will prevent the database from expanding its records.
 The criteria range should not overlap the database list.
Database
Field
Criteria Range
 2007 ComputerTrainingManual.com
27
Microsoft
Excel 2007
Level 3
WORKING WITH TABLES
There are many functions in Excel that analyze data in a table or a database.
The following table shows you some of the common database functions that are
frequently used.
Database Functions
Description
DSUM
Sums up the total value for records that meet the criteria.
DAVERAGE
Calculates the average value for records that meet the criteria.
DMAX
Finds the maximum value for records that meet the criteria.
DMIN
Finds the minimum value for records that meet the criteria.
DCOUNT
Counts the occurrences of records that contain numbers in the
specific field that meet the criteria.
DCOUNTA
Counts the occurrences of records that contain non-blank cell, in the
specific fields that meet the criteria.
 2007 ComputerTrainingManual.com
28
Microsoft
Excel 2007
Level 3
WORKING WITH TABLES
How To Find The
Sum Of Specific
Records Using
The Insert
Function Button
Before you begin, create a new worksheet and enter the
table, as shown below or copy the table that you have
created in the previous lesson. You can also copy the
[Database Functions] worksheet from the `Level3’ workbook.
1.
Click the cell F11.
This is where you want to place the total of the sales values for John Smith.
SUMMARY
1. Click the cell where
you want to place the
formula.
2. Click
.
3. In the select a
category box, click
the drop-down arrow
and click Database.
4. In the Select a
function box, scroll
and click DSUM.
5. Click the OK button.
6. In the Database,
Field and Criteria
boxes, specify the
appropriate cell
ranges.
7. Click the OK button.
2.
Click
Insert function button on the Formula Bar.
The Insert Function dialog appears.
3.
In the select a category box, click the drop-down
arrow and click Database from the list. In the Select a
function box, scroll down and click the DSUM
function.
You will use the DSUM function to calculate the total sales values for John
Smith.
 2007 ComputerTrainingManual.com
29
Microsoft
Excel 2007
Level 3
WORKING WITH TABLES
4.
Click the OK button.
In the Database box, select the range B2:F9.
In the Field box, select the cell F2.
In the Criteria box, select the range I4:I5.
The arguments for the function are shown below.
5.
Click the OK button.
The result is shown on the worksheet.
Note that the following formula appears in the formula bar.
 2007 ComputerTrainingManual.com
30
Microsoft
Excel 2007
Level 3
WORKING WITH TABLES
How To Find The
Average Of
Specific
Records
1.
Click the cell F12.
This is where you will place the average sales values for John Smith.
SUMMARY
1. Click the cell where
you want to place the
formula.
2. Type in the
=DAVERAGE()
function and specify
its arguments.
3. Press <Enter>.
2.
Enter the formula =DAVERAGE(B2:F9,F2,I4:I5).
The formula appears as shown below.
TIPS
 You can use the
mouse to select the
cells for the
arguments instead of
typing the cell
references while
creating the formula.
3.
Press <Enter>.
The average sales value appears as shown below.
 2007 ComputerTrainingManual.com
31
Microsoft
Excel 2007
Level 3
WORKING WITH TABLES
How To Find The
Maximum /
Minimum Value
Of Specific
Records
1.
Click the cell F13.
This is where you will place the maximum sales value for John Smith in Feb.
SUMMARY
1. Click the cell where
you want to place the
formula.
2. Type in the =DMAX()
function and specify
its arguments.
3. Press <Enter>.
2.
Enter the formula =DMAX(B2:F9,F2,I4:J5).
The formula appears as shown below. Note that the criteria range includes the
cells J4 and J5, which adds the criteria for Feb.
TIPS
 If you want to find the
minimum sales value,
use the DMIN()
function.
3.
Press <Enter>.
The maximum sales value appears as shown below.
 2007 ComputerTrainingManual.com
32
Microsoft
Excel 2007
Level 3
WORKING WITH TABLES
How To Find The
Number Of
Records
1.
Click the cell F14.
This is where you want to count the occurrences of records for John Smith in
Feb.
SUMMARY
1. Click the cell where
you want to place the
formula.
2. Type in the
=DCOUNTA()
function and specify
its arguments.
3. Press <Enter>.
2.
Enter the formula =DCOUNTA(B2:F9,B2,I4:J5).
The formula appears as shown below. Note that the field range is changed to
B2. You can use any field in the database because the function is counting the
occurrences, not the values in the fields.
TIPS
 If you are using the
function DCOUNT(),
you have to use fields
that contain values.
3.
Press <Enter>.
The result appears as shown below.
 2007 ComputerTrainingManual.com
33
Microsoft
Excel 2007
Level 3
WORKING WITH TABLES
Using The VLOOKUP Function
You use Lookup functions to search for a value in a database or list. The VLOOKUP
function helps you to search the leftmost vertical column for a comparative value.
Important:
You must first sort your database list before you use the VLOOKUP function.
Function Syntax:
=VLOOKUP(Lookup Value,Database Range,Column Index Number,Range Lookup)
Argument
Description
Lookup Value
The value the function looks for in the left most column of the
Database range. It can be a value, a reference or a text string.
Database Range
The range of cells where the details of the records are located. You
can use a cell reference or a range name for this argument.
Column Index
Number
The column number in the database range, which contains the details
you want to retrieve. For example, use 2 if you want to retrieve the
details from the second column of a database range.
Range Lookup
A logical value to indicate whether the exact or the closest match is
retrieved. To find the closest match in the leftmost column (sorted in
ascending order) of the database range, use TRUE or omitted. To
find the exact match, use FALSE instead.
 2007 ComputerTrainingManual.com
34
Microsoft
Excel 2007
Level 3
WORKING WITH TABLES
The following example shows how the product description, stock available and unit price
details in the product catalog are retrieved and shown in the table below if you enter the
Product ID in cell C8
If you type A2 in the cell C8, the Product Description: Wooden Chair automatically
appears in cell C9, which contains the VLOOKUP() function.
Column Index
Number = 1
Column Index
Number = 2
Column Index Column Index Column Index
Number = 3
Number = 4
Number = 5
Database Range
Lookup Value
VLOOKUP() function
will retrieve product
description from the
database range using
the Lookup value
ProductID A2.
When you type the Product ID A2 in the cell C8, the Product Description, the Stock
Available and the Unit Price appear automatically, as shown below.
If there is no value in the Lookup value cell (C8), #N/A appears.
 2007 ComputerTrainingManual.com
35
Microsoft
Excel 2007
Level 3
WORKING WITH TABLES
How To Use
VLOOKUP To
Find Data
Before you begin, create a new worksheet with the data as
shown below or copy the [VLookup] worksheet from the
`Level3’ workbook.
1.
Click the cell C9.
This is where you want to show the product description if the product ID is
provided in cell C8.
SUMMARY
1. Click the cell where
you want to place the
formula.
2. Enter the function
=VLOOKUP() and
specify its arguments.
3. Press <Enter>.
2.
Enter the formula =VLOOKUP(C8,A3:E6,2).
Cell C8 stores the lookup value. Number 2 indicates the product description is
located in the second column of the database. Note: When selecting the
database range, exclude the field name cells.
3.
Press <Enter>.
The result appears as #N/A because the lookup value Product ID in cell C8 does
not contain any value.
 2007 ComputerTrainingManual.com
36
Microsoft
Excel 2007
Level 3
WORKING WITH TABLES
4.
In the cell C8, type the lookup value A2.
This is to find the details for the record with the Product ID A2. The lookup value
is not case sensitive, which means A2 or a2 will return the same result.
5.
Press <Enter>.
The product description for Product ID A2 is found and is displayed in the cell
C9.
6.
In the cell C10, enter the formula
=VLOOKUP(C8,A3:E6,5) to find the stock available.
Number 5 indicates the Stock Available information is located in the fifth column
of the database.
7.
In the cell C11, enter the formula
=VLOOKUP(C8,A3:E6,4) to find the unit price.
Number 4 indicates the Unit Price is located in the forth column of the database.
If you apply the currency format to cell C11, the result appears as shown below.
 2007 ComputerTrainingManual.com
37
Microsoft
Excel 2007
Level 3
WORKING WITH TABLES
How To Limit
The Lookup
Value For An
Exact Match
1.
In the cell C8, type A5. Press <Enter>.
You want to find details for Product ID A5. Since the Product ID A5 does not
exist, you will see that the last record’s details are being displayed. By default,
Excel will take the closest match if the record is not found in the database.
SUMMARY
1. Click the cell where
you want to place the
formula.
2. Enter the
VLOOKUP() function
and specify its
arguments. Make
sure you type in
FALSE for the Range
Lookup argument.
3. Press <Enter>.
2.
Edit the old formula in the cell C8 from
=VLOOKUP(C8,A3:E6,2) to
=VLOOKUP(C8,A3:E6,2,FALSE).
The Range Lookup argument is set to FALSE to find an exact match of the
lookup value. The Range Lookup argument is set to TRUE by default if it is
omitted.
3.
Press <Enter>.
The result appears as #N/A because the lookup value A5 does not match any
Product ID in the database. You should edit the formulas in the cell C10 and
C11 as well.
 2007 ComputerTrainingManual.com
38
Microsoft
Excel 2007
Level 3
WORKING WITH TABLES
How To Use The
Closest Match
For The Lookup
Value
Before you begin, create a new worksheet with the data as
shown below or copy the [VLookup2] worksheet from the
`Level3’ workbook.
1.
Click the cell G3.
You will use this cell to display the grade for John. Here, you want to find the
closest match of the records instead of an exact match.
SUMMARY
1. Click the cell where
you want to insert the
formula.
2. Enter the
=VLOOKUP()
function and specify
its arguments.
3. Press <Enter>.
2.
Type =VLOOKUP(F3,B3:C7,2).
The Range Lookup argument is set to TRUE by default if it is omitted.
TIPS
 If you want to copy
the formula down
using AutoFill for
Mary and Steve, you
have to make the
database range an
absolute reference.
The formula in the
cell G3 should be
edited to
=VLOOKUP(F3,$B$3
:$C$7,2) before you
copy the formula.
3.
Press <Enter>.
The grade appears as shown below. Use AutoFill to copy the formula to the
cells G4 and G5.
 An alternative is to
define a range name
for the database and
use the range name
in the formula.
 2007 ComputerTrainingManual.com
39
Creating A
PivotTable
And
Analyzing
Data
Objectives:
When you have completed these
lessons, you will be able to:
Create A PivotTable
Update The Information In A PivotTable
Change The Layout Of A PivotTable
Add An Information Field To A
PivotTable
Arrange Information In A PivotTable
Filter The Report In A PivotTable
Filter Specific Records
Change The Calculated Field Value
Settings
Insert A Calculated Field
Delete Calculated Fields
Change A PivotTable Options
Create A Chart From A PivotTable
Create A One Variable What-If Table
Create A Two Variables What-If Table
Create Scenarios
Apply A Scenario
Use The Goal Seek Tool
Load Add-Ins
Use The Solver Tools
 2007 ComputerTrainingManual.com
40
Microsoft
Excel 2007
Level 3
CREATING A PIVOTTABLE AND ANALYZING DATA
Creating A PivotTable
Databases or data lists consist of many fields and records. These records are
considered raw data. To convert the data into useful information, you need to organize
the list and summarize specific details while excluding the irrelevant ones. At times, you
may have several similar Microsoft Excel lists, which need to be consolidated to produce
a single report. In this, PivotTable report can be used to accomplish the task.
This is a raw data in a
database that need to be
summarized in order to
produce an informative
report.
PivotTable helps to convert
the raw data into a useful
report.
Filter Area
You can select the criteria to filter
the records you want.
Row Area
Show field details in row
headings.
Column Area
Show field details in column
headings.
Data Area
Show calculated field details.
 2007 ComputerTrainingManual.com
41
Microsoft
Excel 2007
Level 3
CREATING A PIVOTTABLE AND ANALYZING DATA
Before you begin, create a new worksheet with the data as
shown below or copy the [PivotTable] worksheet from the
`Level3’ workbook.
How To Create A
PivotTable
1.
Click any cell in the range of cells from which you
want to create a PivotTable.
2.
Click the Insert tab. In the Tables group, click the
PivotTable button.
SUMMARY
1. Click any cell in a
range of data.
2. Click the Insert tab.
In the Tables group,
click the PivotTable
button.
3. Specify the options in
the Create PivotTable
dialog box.
4. Click the OK button.
5. In the PivotTable
Field List pane,
select the fields you
want to show in the
PivotTable.
Make sure you click the upper part of the PivotTable button. The Create
PivotTable dialog box appears.
TIPS
 You can also create a
Pivot Table by
clicking the
PivotTable drop-down
arrow, and then, click
the PivotTable.
3.
In the Location box, type B11.
The table/range is automatically selected. Here, you will create a PivotTable at
the cell B11 on the same sheet.
 2007 ComputerTrainingManual.com
42
Microsoft
Excel 2007
Level 3
CREATING A PIVOTTABLE AND ANALYZING DATA
4.
Click the OK button.
A PivotTable is created with no data in it. PivotTable Field List pane appears on
the right, as shown below.
5.
In the PivotTable Field List pane, click to select the
Month, Sales Person and Sales Value fields you want
to show in the PivotTable.
The selected information appears in the PivotTable, as shown below. Note that
the fields are automatically added to the Row Labels area and Values area in the
PivotTable Field List pane.
 2007 ComputerTrainingManual.com
43
Microsoft
Excel 2007
Level 3
CREATING A PIVOTTABLE AND ANALYZING DATA
Updating A PivotTable
A PivotTable will not be updated automatically when you edit the source database. You
have to manually update the PivotTable.
In Office Excel 2007, PivotTables are much easier to use than in earlier versions of
Excel. By using the new PivotTable user interface, the information that you want to view
about your data is just a few clicks away. You no longer have to drag data to drop
zones. Now, you can simply select the fields that you want to see in a new PivotTable
field list.
And after you create a PivotTable, you can take advantage of many other new or
improved features to summarize, analyze, and format your PivotTable data.
Using Undo in PivotTables You can now undo most actions that you take to create or
rearrange a PivotTable.
Plus and minus drill-down indicators are used to indicate whether you can expand or
collapse parts of the PivotTable to see more or less information.
Sorting is now a lot simpler than the previous version. You can also filter data by using
PivotTable filters, such as Greater than, Equals, or Contains.
You can also apply conditional formatting to an Office Excel 2007 Pivot Table.
You can quickly apply a predefined or custom style to a PivotTable just like you can for
Excel tables and charts.
 2007 ComputerTrainingManual.com
44
Microsoft
Excel 2007
Level 3
CREATING A PIVOTTABLE AND ANALYZING DATA
How To Update
The Information
In A PivotTable
1.
Click the cell E8, update the sales value to 5400.
This will update the record from 5200 to 5400. Note that the information is not
updated automatically in the PivotTable.
SUMMARY
1. Edit the source
database.
2. Click the PivotTable.
3. Click the Options
tab. In the Data
group, click the
Refresh button.
2.
Click the PivotTable.
The PivotTable Tools ribbons appear, as shown below.
TIPS
 You can also rightclick the PivotTable,
then click Refresh
from the shortcut
menu.
3.
Click the Options tab. In the Data group, click the
Refresh button.
Make sure you click the upper part of the Refresh button. The total for John
Cage in Mar is now updated from 5200 to 5400.
 2007 ComputerTrainingManual.com
45
Microsoft
Excel 2007
Level 3
CREATING A PIVOTTABLE AND ANALYZING DATA
How To Change
The Layout Of A
PivotTable
1.
Click any cell in the PivotTable.
The PivotTable Field List pane appears on the right.
SUMMARY
1. Click any cell in the
PivotTable.
2. Drag the field you
want to appear as the
column label and
drop it to the Column
Labels area.
3. Drag the field you
want to appear as the
row label and drop it
to the Row Labels
area.
2.
Drag the Month field you want to appear as the
column label and drop it to the Column Labels area.
The product details appear as the column heading in the PivotTable, as shown
below. You can also drag the Month field from the Row Labels area to the
Column Labels area. Note that the Month field is automatically removed from
the Row Labels area, as shown below.
 2007 ComputerTrainingManual.com
46
Microsoft
Excel 2007
Level 3
CREATING A PIVOTTABLE AND ANALYZING DATA
How To Add An
Information
Field To A
PivotTable
1.
Click the PivotTable.
The PivotTable Field List pane appears on the right.
SUMMARY
1. Click the PivotTable.
2. Drag and drop the
field from the
PivotTable Field List
to the Column
Labels area, Row
Labels area or
Values area you
want.
2.
Drag and drop the Product field from the PivotTable
Field List to the Column Labels area.
Here, you will place the Product field below the Month field in the Column Labels
area.
3.
Release the mouse.
The information is added into the PivotTable as shown below.
 2007 ComputerTrainingManual.com
47
Microsoft
Excel 2007
Level 3
CREATING A PIVOTTABLE AND ANALYZING DATA
How To Arrange
Information In A
PivotTable
1.
Click the PivotTable.
The PivotTable Field List pane appears on the right.
2.
Drag and drop the Month field from the Column Labels
area to the Row Labels area.
Here, you will drop the field below the Sales Person.
SUMMARY
1. Click the PivotTable.
2. Drag and drop the
field between the
Column Labels area,
Row Labels area and
the Values area.
TIPS
 You can also remove
the field by dragging
the field away from
the area.
3.
Release the mouse.
The information is arranged into the PivotTable as shown below.
4.
Click the Month field and then click Remove Field.
The month details are removed from the PivotTable
 2007 ComputerTrainingManual.com
48
Microsoft
Excel 2007
Level 3
CREATING A PIVOTTABLE AND ANALYZING DATA
How To Filter
The Report In A
PivotTable
1.
Drag and drop the Month field to the Report Filter area
in the PivotTable.
Note: Before you begin, move the PivotTable to cell B13 so that when you create
a filter, it will not overlap the source table above the PivotTable.
SUMMARY
1. Click the PivotTable.
2. Drag and drop the
field from the
PivotTable Field List
to the Report Filter
area.
The filter is added above the PivotTable. It shows all the records by default.
2.
Click the Month drop-down arrow.
A drop-down list showing all the criteria in the month field appears.
3.
Click Feb from the list. Click the OK button.
The records are filtered to show only Feb records, as shown below.
 2007 ComputerTrainingManual.com
49
Microsoft
Excel 2007
Level 3
CREATING A PIVOTTABLE AND ANALYZING DATA
How To Filter
Specific
Records
1.
In the PivotTable, click the Row Labels drop-down
button.
A drop-down list appears, as shown below.
SUMMARY
1. In the PivotTable,
click the Row Labels
drop-down button.
2. Select the data you
want to show.
3. Click the OK button.
TIPS
 You can also use this
Row Labels dropdown button to sort
your data.
 To remove the filter,
click the Clear Filter
From <Field_Name>
command.
2.
Select only Mary Davis and Steve Brown.
Here, you want to hide the records for John Cage and John Smith.
3.
Click the OK button.
The PivotTable does not show the records for John Cage and John Smith. Note:
Make sure you show all the records for the next exercise.
 2007 ComputerTrainingManual.com
50
Microsoft
Excel 2007
Level 3
CREATING A PIVOTTABLE AND ANALYZING DATA
Working With Calculated Fields In A PivotTable
Besides using the Sum function to find the total for the number fields, you are able to
use other functions such as Average, Maximum, and Minimum etc.
PivotTable with that calculates the total sales
PivotTable with that calculates the average sales
Besides the existing summary functions, Excel lets you create your own formulas in
calculated fields and calculated items . For instance, you can add a new calculated field
that calculates the sales commission, as shown below.
 2007 ComputerTrainingManual.com
51
Microsoft
Excel 2007
Level 3
CREATING A PIVOTTABLE AND ANALYZING DATA
How To Change
The Calculated
Field Value
Settings
1.
In the Values area, click the Sum of Sales field.
The pull down menu appears, as show below.
SUMMARY
1. In the Values area,
click the field you
want to change.
2. Click the Value Field
Settings.
3. Click the type of
function you want.
4. Click the OK button.
2.
Click the Value Field Settings from the menu.
The Value Field Settings dialog box appears, as shown below.
3.
In the Summarize value field by box, click Average.
And then, click the OK button.
Here, you want to find the average sales instead of the total sales. Note that the
text `Grand Total’ remains unchanged. You will have to change it to `Average’
manually.
 2007 ComputerTrainingManual.com
52
Microsoft
Excel 2007
Level 3
CREATING A PIVOTTABLE AND ANALYZING DATA
How To Insert A
Calculated Field
1.
Click the Options tab. In the Tools group, click
Formula >> Calculated Field.
The Insert Calculated Field dialog box appears.
SUMMARY
1. Click the PivotTable.
2. Click the Options
tab. In the Tools
group, click the
Formula >>
Calculated Field.
3. In the Name box,
type the calculated
field name you want.
4. In the Formula box,
type the formula for
the calculated field.
5. Click the Add button.
6. Click the OK button.
2.
In the Name box, type Commission. In the Formula box,
type =Sales Value*20%.
The Insert Calculated Field dialog box appears as shown below.
 2007 ComputerTrainingManual.com
53
Microsoft
Excel 2007
Level 3
CREATING A PIVOTTABLE AND ANALYZING DATA
3.
Click the Add button.
The new calculated field (Commission) is added into the Fields box, as shown
below.
4.
Click the OK button.
The new calculated field is shown in the PivotTable.
 2007 ComputerTrainingManual.com
54
Microsoft
Excel 2007
Level 3
CREATING A PIVOTTABLE AND ANALYZING DATA
How To Delete
Calculated
Fields
1.
Click the Options tab. In the Tools group, click
Formulas >> Calculated Field.
A drop-down menu appears.
SUMMARY
1. Click the PivotTable.
2. Click the Options
tab. In the Tools
group, click the
Formula >>
Calculated Field.
3. Click the Name dropdown arrow.
4. Select the field you
want to delete.
5. Click the Delete
button.
6. Click the OK button.
2.
Click the Name drop-down arrow and click
Commission.
The Add button changes to a Modify button when you select the Commission
field from the list.
3.
Click the Delete button, and then click the OK button.
The Commission field is now deleted.
 2007 ComputerTrainingManual.com
55
Microsoft
Excel 2007
Level 3
CREATING A PIVOTTABLE AND ANALYZING DATA
How To Change
A PivotTable
Options
1.
Click any cell in the PivotTable.
The PivotTable Tools tabs appear.
2.
Click the Options tab. In the PivotTable group, click
the Options button.
SUMMARY
1. Click any cell in the
PivotTable.
2. Click the Option tab.
In the PivotTable
group, click the
Options button.
3. Make the changes.
4. Click the OK button.
The PivotTable Options dialog box appears, as shown below.
3.
Click the OK button.
The PivotTable option is set.
 2007 ComputerTrainingManual.com
56
Microsoft
Excel 2007
Level 3
CREATING A PIVOTTABLE AND ANALYZING DATA
Creating A Chart From A PivotTable
You can create a Pivot Chart from the table or from an existing PivotTable.
When you create a PivotChart, specific PivotChart Tools ribbons are available to help
you work with the chart. You can change the layout, style, and format of the chart or its
elements just like a regular chart easily.
All of the filtering improvements are also available in the PivotChart Filter Pane.
In Office Excel 2007, the chart formatting that you apply is preserved when you make
changes to the PivotChart, which is an improvement from the earlier versions of Excel.
 2007 ComputerTrainingManual.com
57
Microsoft
Excel 2007
Level 3
CREATING A PIVOTTABLE AND ANALYZING DATA
How To Create A
Chart From A
PivotTable
1.
Click any cell in the PivotTable.
The PivotTable Tools tabs appear.
SUMMARY
1. Click any cell in the
PivotTable.
2. Click the Options
tab. In the Tools
group, click the
PivotChart button.
3. Select the chart type
you want.
4. Click the Axis Field
drop-down arrow.
5. Click to check or
uncheck the items to
show or hide the
information you want.
6. Click the OK button.
2.
Click the Options tab. In the Tools group, click the
PivotChart button.
The Insert Chart dialog box appears.
TIPS
 If you want to create
the chart from the
source table instead
of the PivotTable,
click the table and
then click the Insert
tab. In the Tables
group, click the
PivotTable drop-drop
down arrow. Then,
click the PivotChart.
 2007 ComputerTrainingManual.com
58
Microsoft
Excel 2007
Level 3
CREATING A PIVOTTABLE AND ANALYZING DATA
3.
Select the chart you want and then click the OK
button.
The chart is created and placed on the existing worksheet.
4.
In the PivotChart Filter Pane, click the Sales Person
drop-down arrow. Then click to specify which sales
persons you want to show in the chart.
Uncheck the boxes to hide the sales persons. You can also hide the information
for the Legend and the Page.
5.
Click the OK button.
The chart shows only the records for John Smith and Steve Brown.
 2007 ComputerTrainingManual.com
59
Microsoft
Excel 2007
Level 3
CREATING A PIVOTTABLE AND ANALYZING DATA
Exploring What-If Tables
You can analyze data with a series of What-If questions and produce a table to show
the results.
Example: You
want to find the
Revenue and
the Grand Total
if the variables
change in the
table.
One Variable What-If Table
Your management wants you to
produce a What-If analysis report
from the source above. Here,
you will find the Revenue and the
Grand Total if a single variable
like unit price increases to $630,
$640, $650 and $660. The one
variable What-If table is used
here.
Two Variables What-If Table
Here you will find the total sales if the unit price
changes to $630, $640, $650 and $660 while
the projected number of units sold changes to
170000, 180000, 190000 and 200000. The two
variables What-If table is used here.
 2007 ComputerTrainingManual.com
60
Microsoft
Excel 2007
Level 3
CREATING A PIVOTTABLE AND ANALYZING DATA
Before you begin, create a new worksheet with the data as
shown below or copy the [What-If (1var)] worksheet from
the `Level3’ workbook.
How To Create A
One Variable
What-If Table
1.
In the cell B12, enter the formula =D5 in the What-If
table column heading.
Enter both the tables to do this exercise. B12 is the column heading for the
Projected Revenue in the What-If table.
SUMMARY
1. Create a What-If
table.
2. Enter the formulas in
the What-If table
column headings.
3. Select the entire
What-If table.
4. Click the Data tab. In
the Data Tools
group, click the WhatIf Analysis >> Data
Table.
5. In the Row input cell
or Column input cell
box, enter the cell
reference.
6. Click the OK button.
2.
In the cell C12, enter the formula =D7 in the table
column heading. Press <Enter>.
C12 is the column heading for the Grand Total in the What-If table.
3.
Select the entire What-If table range A12:C16.
When you select the table range, do not select the label above the column
headings.
 2007 ComputerTrainingManual.com
61
Microsoft
Excel 2007
Level 3
CREATING A PIVOTTABLE AND ANALYZING DATA
4.
Click the Data tab. In the Data Tools group, click the
What-If Analysis >> Data Table.
The Data Table dialog box appears.
5.
In the Column input cell box, enter the cell reference
$B$5.
Use the mouse to click the column input cell and click the cell B5. If you type the
cell reference manually, use absolute reference with a $ sign.
6.
Click the OK button.
The What-If table is created as shown below. Use cell formatting to format the
Revenue and Grand Total value to currency in the What-If table.
 2007 ComputerTrainingManual.com
62
Microsoft
Excel 2007
Level 3
CREATING A PIVOTTABLE AND ANALYZING DATA
Before you begin, create a new worksheet with the data as
shown below or copy the [What-If (2var)] worksheet from
the `Level3’ workbook.
How To Create A
Two Variables
What-If Table
1.
In the first cell of the What-If table, at the cell B11,
enter the formula =D7. Press <Enter>.
A11 is the formula to calculate the Grand Total for the What-If table.
SUMMARY
1. Create a What-If
table.
2. Enter the formulas in
the What-If table
column headings.
3. Select the entire
What-If table.
4. Click the Data tab. In
the Data Tools
group, click the WhatIf Analysis >> Data
Table.
5. In both the Row
input cell and
Column input cell
boxes, enter the cell
references.
6. Click the OK button.
2.
Select the entire What-If table range B11:E15.
When you select the table range, do not select the cells above the column
headings.
3.
Click the Data tab. In the Data Tools group, click the
What-If Analysis >> Data Table.
The Data Table dialog box appears.
 2007 ComputerTrainingManual.com
63
Microsoft
Excel 2007
Level 3
CREATING A PIVOTTABLE AND ANALYZING DATA
4.
In the Row input cell box, enter the cell reference
$B$5. In the Column input cell box, enter the cell
reference $C$5.
Use the mouse to click the row input cell and click the cell B5, then click the
column input cell and click the cell C5. If you type the cell reference manually,
use absolute reference with a $ sign.
5.
Click the OK button.
The What-If table is created as shown below. Use cell formatting to format the
Grand Total value to currency in the What-If table.
 2007 ComputerTrainingManual.com
64
Microsoft
Excel 2007
Level 3
CREATING A PIVOTTABLE AND ANALYZING DATA
Using Scenarios
Data tables analyze data with 1 or 2 variables while the Scenario Manager enables you
to create more than 2 input variables and save the values with a scenario name.
Multiple scenarios allow you to perform a series of comparisons within a worksheet
without having to update individual cell value.
Example: You
want to find the
Revenues for
each Product and
their Grand Total.
There are 2 different possible scenarios/projections for all the 4 variables (unit price for
each product). If you apply a specific scenario to the table, it is updated instantly to
display the new values.
Scenario A
For Scenario A, the table is updated as below:
Scenario B
For Scenario B, the table is updated as below:
 2007 ComputerTrainingManual.com
65
Microsoft
Excel 2007
Level 3
CREATING A PIVOTTABLE AND ANALYZING DATA
Before you begin, create a new worksheet with the data as
shown below or copy the [Scenario] worksheet from the
`Level3’ workbook
How To Create
Scenarios
1.
SUMMARY
1. Click the Data tab. In
the Data Tools
group, click What-If
Analysis >>
Scenario Manager.
2. Click the Add button.
3. In the Scenario
name box, enter the
scenario name.
4. In the Changing
cells box, enter the
range of cells that will
change and click the
OK button.
5. Type in the value for
each changing cell.
6. Click the Add button
and then enter the
second scenario.
7. Click the OK button.
8. Click the Close
button.
Click the Data tab. In the Data Tools group, click
What-If Analysis >> Scenario Manager.
The Scenario Manager dialog box appears.
TIPS
 Use the Merge button
to copy a scenario
from another
workbook. The
workbook contains
the scenario must be
opened in order for
you to merge.
2.
Click the Add button.
This is to add the first scenario to the workbook. The Edit Scenario dialog box
appears.
 2007 ComputerTrainingManual.com
66
Microsoft
Excel 2007
Level 3
CREATING A PIVOTTABLE AND ANALYZING DATA
3.
In the Scenario name box, type Scenario A. In the
Changing cells box, type $B$3:$B$6.
Comments are optional. You can click the Changing cells box and select the
range B3:B6 instead of typing the cell reference.
4.
Click the OK button.
The Scenario Values dialog box appears.
5.
In the $B$3 box, type 520. In the $B$4 box, type 340.
In the $B$5 box, type 630. In the $B$6 box, type 270.
This is to enter value for all the changing cells in Scenario A.
6.
Click the Add button.
This is to add the second scenario. The Edit Scenario dialog box appears.
 2007 ComputerTrainingManual.com
67
Microsoft
Excel 2007
Level 3
CREATING A PIVOTTABLE AND ANALYZING DATA
7.
In the Scenario name box, type Scenario B.
By default, the changing cells range uses the range specified in the previous
scenario. Since the range remains unchanged in this new scenario, just leave it
as it is.
8.
In the $B$3 box, type 510. In the $B$4 box, type 350.
In the $B$5 box, type 620. In the $B$6 box, type 280.
This is to enter the values for all the changing cells in Scenario B.
9.
Click the OK button.
The Scenario Manager dialog box appears. Two scenarios now appear in the
list. Click the close button if you do not want to apply any further scenarios.
 2007 ComputerTrainingManual.com
68
Microsoft
Excel 2007
Level 3
CREATING A PIVOTTABLE AND ANALYZING DATA
How To Apply A
Scenario
1.
Click the Data tab. In the Data Tools group, click
What-If Analysis >> Senario Manager.
The Scenario Manager dialog box appears.
2.
In the Scenarios box, click Scenario B.
You may double-click Scenario B to apply the values immediately.
SUMMARY
1. Click the Data tab. In
the Data Tools
group, click What-If
Analysis >>
Scenario Manager.
2. In the Scenarios box,
select the scenario
you want to apply.
3. Click the Show
button.
TIPS
 To Edit the existing
scenario, click the
scenario and then
click the Edit button.
 To Delete the
scenario, click the
scenario and then
click the Delete
button.
3.
Click the Show button.
The Scenario B’s values are applied to the worksheet.
 2007 ComputerTrainingManual.com
69
Microsoft
Excel 2007
Level 3
CREATING A PIVOTTABLE AND ANALYZING DATA
Implementing Problem Solving
Goal Seek is a tool for you to find solutions to a problem. It helps you to find the best
solution by analyzing single variable.
Problem: You need to get a Total Income of $6,000.00. So you should increase the
Sales. How much sales do you need to achieve?
Solution: To calculate the new sales value, use goal seek to set cell B5 to value 6000
by changing cell B1. You will get the solution that your sales need to be increased to
$40,000.00 in order to reach your goal of getting a total income of $6,000.00.
Create the following data on a new worksheet.
=B1*B2
=B3+B4
 2007 ComputerTrainingManual.com
70
Microsoft
Excel 2007
Level 3
CREATING A PIVOTTABLE AND ANALYZING DATA
Solver is a tool for you to find solutions to a problem. It helps you to find the best
solution by analyzing multiple variables.
Problem: You need to find the maximum net income you can put into your savings for
the month. You need to increase the sales and decrease your monthly expenses.
However, there are certain limitations and constraints. For example, the constraints
here might be
1) There is always a limit or maximum sales you can achieve within the
month.
2) There is a minimum monthly expense you must spend within the month.
Solution: To calculate the maximum Balance for Saving, use the Solver tool to set cell
B7 to maximum. Define the following constraints:
1) Cell B1 (Sales) <= 50,000.
2) Cell B6 (Expenses) >= 3,500
You will get the solution that your maximum Balance for Saving is $3,000.
Before you begin, create the following table on a new worksheet.
=B1*B2
=B3+B4
=B3+B4
 2007 ComputerTrainingManual.com
71
Microsoft
Excel 2007
Level 3
CREATING A PIVOTTABLE AND ANALYZING DATA
Before you begin, create a new worksheet with the data as
shown below or copy the [Goal Seek] worksheet from the
`Level3’ workbook.
How To Use The
Goal Seek Tool
1.
This is where you will set the new goal value you want to achieve. B5 is used for
the Set cell box automatically in the Goal Seek dialog box if you click the cell
reference (see step 2 below). If not, you can still select the cell reference
manually after the Goal Seek dialog box appears.
SUMMARY
1. Click the cell for
which you want to set
the goal.
2. Click the Data tab. In
the Data Tools
group, click What-If
Analysis >> Goal
Seek.
3. In the To value box,
enter the value.
4. In the By changing
cell box, enter the
cell.
5. Click the OK button.
6. Click the OK button.
Click the cell B5.
2.
Click the Data tab. In the Data Tools group, click
What-If Analysis >> Goal Seek.
The Goal Seek dialog box appears.
 2007 ComputerTrainingManual.com
72
Microsoft
Excel 2007
Level 3
CREATING A PIVOTTABLE AND ANALYZING DATA
3.
In the To value box, type 6000. In the By changing cell
box, type $B$1.
You can click the By changing cell box and select B1 instead of typing in the cell
reference $B$1.
4.
Click the OK button.
The Goal Seek Status dialog box displays the solution. Click the OK button to
accept the solution or Cancel to reject it.
5.
Click the OK button.
Total Sales and Total Income are updated.
 2007 ComputerTrainingManual.com
73
Microsoft
Excel 2007
Level 3
CREATING A PIVOTTABLE AND ANALYZING DATA
How To Load
Add-Ins
1.
Click the Office button. Click the Excel Options
button.
The Excel Options dialog box appears
2.
SUMMARY
1. Click the Office
Button. Click the
Excel Options
button.
2. On the left pane, click
Add-Ins. On the right
pane, in the Manage
box, click the Excel
Add-Ins.
3. Click the Go button.
4. Select the add-ins
you want.
5. Click the OK button.
On the left pane, click Add-Ins. On the right pane, in
the Manage box, click the Excel Add-ins. Click the Go
button.
The Excel Add-ins is selected by default. The Add-Ins dialog box appears.
 2007 ComputerTrainingManual.com
74
Microsoft
Excel 2007
Level 3
CREATING A PIVOTTABLE AND ANALYZING DATA
3.
TIPS
Click the Go button. Check the Solver Add-in check
box.
By default, not all the add-ins is loaded when you install Microsoft Excel.
 If Solver Add-in is not
listed, click the
Browse button to
locate the add-in.
 If you are prompted
that the Solver Add-in
is not currently
installed on your
computer, click Yes
to install it.
4.
Click the OK button.
The Solver command is now available in the Analysis group on the Data tab.
 2007 ComputerTrainingManual.com
75
Microsoft
Excel 2007
Level 3
CREATING A PIVOTTABLE AND ANALYZING DATA
Before you begin, create a new worksheet with the data as
shown below or copy the [Solver] worksheet from the
`Level3’ workbook.
How To Use The
Solver Tools
1.
Click the cell B7.
You will find the maximum balance you can achieve for your savings.
SUMMARY
1. Click the cell you
want to solve.
2. Click the Data tab. In
the Analysis group,
click the Solver
button.
3. For Equal To, select
the option you want.
4. In the By Changing
Cells box, select the
cells that you want to
change.
5. Under Subject to
The constraints,
click the Add button.
6. Specify the
constraints.
7. Click the OK button.
8. Click the Solve
button.
2.
Click the Data tab. In the Analysis group, click the
Solver button.
The Solver Parameters dialog box appears.
3.
For Equal To, click Max. In the By Changing Cells
box, select cell B1 and cell B6.
You will find the maximum balance you can achieve. To select the changing
cells, click in the By Changing Cells box, and then select the cells you want. To
select multiple non-adjacent cells, hold down <Ctrl> while selecting the cells.
The selected cells appear as absolute references (with a $ sign), as shown
below.
4.
Under Subject to the Constraints, click the Add
button. Specify the constraint cell B1 <= 50000.
This will set the maximum sales to 50000 as the first constraint..
 2007 ComputerTrainingManual.com
76
Microsoft
Excel 2007
Level 3
CREATING A PIVOTTABLE AND ANALYZING DATA
5.
Click the Add button. Specify the constraint cell B6 >=
3500.
This set the minimum expenses to 3500 as the second constraint.
6.
Click the OK button.
The constraints are listed in the Subject to the Constraints box, as shown below.
7.
Click the Solve button.
The maximum Balance for Savings is 3,000. To replace the existing value with
the new values, click the OK button. You can also save these values as a new
scenario.
 2007 ComputerTrainingManual.com
77
Using
Workgroup
Features
Objectives:
When you have completed these
lessons, you will be able to:
Add A Comment Into A Cell
Show/Hide Comments Permanently
Show/Hide Comment Indicators
Inspect A Workbook
Apply Password Protection To The
Editable Cells
Enable Workbook Sharing
Merge Copies Of Shared Workbooks
Accept Or Reject Changes In A Merged
Workbook
Protect A Shared Workbook
Track Changes In The Same Workbook
Accept Or Reject Changes From
Different Users
 2007 ComputerTrainingManual.com
78
Microsoft
Excel 2007
Level 3
USING WORKGROUP FEATURES
Using Comments
In order to explain the content/data in a cell, you can attach a note to the cell by adding a
comment. Comments can be inserted in each cell and are displayed when you move
the mouse pointer over the cell or view all comments.
You can work with the comments using the Ribbon or the shortcut menu.
If you sort data/items on a worksheet, the comments move to new positions with the
items in the sorted rows or columns.
Note: Comments in a PivotTable remain anchored to the cells where they are entered,
not to the cell contents. When you pivot the table or make other changes to the layout
format, the comments do not move.
 2007 ComputerTrainingManual.com
79
Microsoft
Excel 2007
Level 3
USING WORKGROUP FEATURES
Before you begin, create a new worksheet, save it as
Proposal and enter the table shown below or copy the
[Workgroup] worksheet from the `Level3’ workbook.
How To Add A
Comment Into A
Cell
1.
Right-click the cell B2, to which you want to add a
comment.
The shortcut menu appears as illustrated.
SUMMARY
1. Right click the cell, to
which you want to
add a comment.
2. Click Insert
Comment.
3. Type the comment.
4. Click any other cell.
TIPS
 You can also add a
new comment using
the Ribbon. Click the
Review tab. In the
Comments group,
click the New
Comment button.
 You can also press
<SHIFT>+<F2> to
add a comment.
 If you want to change
the user name that
appears in the
comment, you can
change the user
name before you add
the comment.
Click the Office
button. And then
click the Excel
Options button. On
the left pane, click
Popular. On the right
pane, in the User
Name box, change
the User name
information.
2.
Click Insert Comment. Type in the comment: I think
John is the best person to lead this project.
The user name appears automatically in the comment box.
3.
Click any other cell on the worksheet.
The comment box is hidden and a comment indicator appears in the upper right
corner of the cell B2.
 2007 ComputerTrainingManual.com
80
Microsoft
Excel 2007
Level 3
USING WORKGROUP FEATURES
How To
Show/Hide
Comments
Permanently
1.
Move the mouse pointer over the cell that has the
comment indicator.
The comment appears automatically as shown below. It will be hidden when the
pointer is moved away from the cell.
SUMMARY
1. Move the mouse
pointer to the cell that
has a comment
indicator.
2. Right-click the cell
where you what to
show the comment
permanently. Click
Show / Hide
Comments.
2.
Right-click the cell B2. Click Show / Hide Comments.
The comment appears permanently on the screen.
TIPS
 If you want to hide the
permanent comment
on screen, right-click
the cell and from the
shortcut menu, click
Hide Comment.
You can also edit, delete and show/hide a comment using the shortcut menu, as
shown above. Instead of the shortcut menu, you can also use the Ribbon. Click
the Review tab. In the Comments group, click the button you want.
 2007 ComputerTrainingManual.com
81
Microsoft
Excel 2007
Level 3
USING WORKGROUP FEATURES
How To
Show/Hide
Comment
Indicators
1.
Click the Office Button. And then, click the Excel
Options button.
The Excel Options dialog box appears.
2.
On the left pane, click Advanced. On the right pane,
click the No comments or indicators.
This will hide the comment indicators that appear on the worksheet.
SUMMARY
1. Click the Office
Button. And then,
click the Excel
Options button.
2. On the left pane, click
Advanced. On the
right pane, click the
No comments or
indicators.
3. Click the OK button.
3.
Click the OK button.
The comment indicator is hidden.
Options
Description
No comments or
indicators
Hides all comments and comment
indicators.
Indicators only, and
comments on hover
Displays the comment when the
pointer is moved to the cell that has
the comment indicator.
Comments & indicators
Displays comments and indicators
permanently.
 2007 ComputerTrainingManual.com
82
Microsoft
Excel 2007
Level 3
USING WORKGROUP FEATURES
Using The Security Features
Inspecting Your Workbook
If you are going to share your Office Excel workbook with other people but do not wish to
reveal any hidden data or personal information (such as details about your organization)
that might be stored in the workbook itself, you should inspect and review the workbook
to remove the hidden information before you share the workbook with other people.
Using Password Protection For The Editable Cells
When you share a workbook with other users, you may want to protect data in specific
worksheet or workbook elements to prevent it from being changed. You can also specify
a password that users need to enter to modify specific workbook and worksheet
elements that are protected.
Note: Workbook and worksheet element protection should not be confused with
workbook-level password security. Element protection cannot protect a workbook from
users who have malicious intent.
When you protect a worksheet, all cells on the worksheet are locked by default, and
users cannot make any changes to a locked cell.
 2007 ComputerTrainingManual.com
83
Microsoft
Excel 2007
Level 3
USING WORKGROUP FEATURES
How To Inspect
A Workbook
1.
Click the Office Button >> Prepare >> Inspect
Document.
Excel will prompt you to save the workbook if you have not saved it before you
inspect the workbook. The Document Inspector dialog box appears, as shown
below.
SUMMARY
1. Click the Office
Button >> Prepare
>> Inspect
Document.
2. Select the elements
you want to inspect.
3. Click the Inspect
button.
4. Click the Remove All
button for the
elements you want to
remove.
5. Click the Close
button.
TIPS
 You might not be able
to undo or restore the
information you have
removed. Make sure
you keep a copy of
the original workbook
before you remove
the information from
the inspection.
 2007 ComputerTrainingManual.com
84
Microsoft
Excel 2007
Level 3
USING WORKGROUP FEATURES
2.
Select the elements you want to inspect.
The descriptions of the elements are listed in the table below.
3.
Options
Description
Comments and ink
annotations
The information such as comments or ink
annotations, which reveal the names of
people who worked on the workbook, their
comments, and changes that were made to
the workbook.
Document properties
and personal
information
Include details such as author, subject,
title, the name of the person who most
recently saved the workbook and the date
when the workbook was created etc.
Headers and footers
Information in headers and footers.
Hidden rows,
columns, and
worksheets
If a workbook contains hidden rows,
columns, or worksheets, other people
might unhide them.
Document server
properties
The information related to the server
location or a library where the workbook
was saved to.
Custom XML data
Find and remove the custom XML data that
is not visible in the workbook itself.
Excel Add-In (.xlam)
The Excel 2007 XML-based and macroenabled Add-In that run additional code.
Click the Inspect button.
The Document Inspector dialog box appears to show you the elements found in
your workbook, as shown below.
 2007 ComputerTrainingManual.com
85
Microsoft
Excel 2007
Level 3
USING WORKGROUP FEATURES
4.
Click the Remove All button for the Document
Properties and Personal Information.
Note that the Remove All button for the Document Properties and Personal
Information disappears, as shown below.
5.
Click the Close button.
The Document Inspector dialog box closes.
 2007 ComputerTrainingManual.com
86
Microsoft
Excel 2007
Level 3
USING WORKGROUP FEATURES
How To Apply
Password
Protection To
The Editable
Cells
SUMMARY
1.
You will make this range editable with password protection. You can also select
non-adjacent cell ranges if you want.
2.
1. Select the cells which
you want to make
editable with
password protection.
2. Click the Review tab.
In the Changes
group, click the Allow
the Allow Users to
Edit Ranges button.
3. Click the New button.
4. In the Range
password box, type
in your password.
5. Click the OK button.
6. Type in the password
again. Then, click the
OK button.
7. Click the OK button
again.
 The worksheet need
to be protected in
order for this
password protection
to take effect.
To protect the
worksheet, click the
Review tab. Then, in
the Changes group,
click the Protect
Sheet command.
Click the Review tab. In the Changes group, click the
Allow Users to Edit Ranges button.
The Allow Users to Edit Ranges dialog box appears, as shown below.
3.
TIPS
Select the cells B2:B5.
Click the New button. In the Range password box,
type in your password. Click the OK button. Type in
the password again and click the OK button again.
Here, you type in the password twice to verify the password you use.
The newly created range appears in The Allow Users to Edit Ranges dialog box.
Click the OK button to close the dialog box.
 2007 ComputerTrainingManual.com
87
Microsoft
Excel 2007
Level 3
USING WORKGROUP FEATURES
Sharing Workbooks
Excel provides workgroup useful facilities to let you share your workbook with multiple
users.
If you want multiple users to access and share the same workbook
simultaneously, you need to enable the sharing feature.
Excel displays the word [Shared] on the workbook’s title bar if the workbook is shared.
After the workbook is shared, you can
1. Work with the single original workbook, which could be stored on the network
drive for multiple users to access simultaneously. If you want to review the
changes, you can review the history and accept or reject individual changes in
the workbook.
2. Work with multiple copies of the workbook. You can use the Save As command
to create copies of the workbook and distribute copies to the users for them to
update. Then you could merge their copies into your original file. During the
process of merging, you can review the changes and accept or reject individual
changes found in the workbook.
 2007 ComputerTrainingManual.com
88
Microsoft
Excel 2007
Level 3
USING WORKGROUP FEATURES
How To Enable
Workbook
Sharing
1.
Open the Proposal workbook, which you want to
share with other users.
Proposal workbook was created in the previous lesson.
2.
Click the Review tab. In the Changes group, click the
Share Workbook button.
The Share Workbook dialog box appears.
SUMMARY
1. Open the workbook
that you want to
share.
2. Click the Review tab.
In the Changes
group, click the Share
Workbook button.
3. Click the Editing tab.
4. Click Allow changes
by more than one
user at the same
time. This also
allows workbook
merging.
5. Click the Advanced
tab.
6. Select the options
you want.
7. Click the OK button.
8. Click the next OK
button.
3.
Click the Allow Changes by more than one user at the
same time. This also allows workbook merging check
box.
If this is not selected, the options in the Advanced tab are disabled.
TIPS
 To disable the
workbook sharing,
just uncheck the
Allow Changes by
more than one user
at the same time.
This also allows
workbook merging
check box. In the
Share Workbook
dialog box.
 2007 ComputerTrainingManual.com
89
Microsoft
Excel 2007
Level 3
USING WORKGROUP FEATURES
4.
Click the Advanced tab. Select the options you want.
Increase the number of days in the Keep change history for option if you want to
allow ample time to complete changes. You can’t keep track of changes or
merge copies of workbook if you exceed the number of days specified.
5.
Click the OK button.
In order to enable the workbook for sharing, Excel will prompt you to save the
workbook.
6.
Click the OK button.
This is to save the workbook and enable sharing. From the Title bar, you can
see that this workbook is now shared.
 2007 ComputerTrainingManual.com
90
Microsoft
Excel 2007
Level 3
USING WORKGROUP FEATURES
Comparing And Merging Shared Workbooks
When a shared workbook is updated by other users, and you want to compare the
changes that they have made before you update the workbook with those changes, you
can use the Compare and Merge Workbooks command.
(This command is not available in the Review tab, you can, however, add it to the Quick Access Toolbar.)
Important:
1. You can only merge a shared workbook with copies of that workbook that were made
from the same shared workbook.
2. You cannot use the Compare and Merge Workbooks command to merge workbooks
that are not shared.
3. To use the Compare and Merge Workbooks command, all the shared workbook
users must save a copy of the shared workbook that contains their changes and use
a unique file name that differs from the original workbook.
4. All copies of a shared workbook should be located in the same folder as the shared
workbook.
Before you begin, create the following workbook, Proposal.xlsx. (You can use the workbook from
the previous lesson or copy the [Workgroup] worksheet from the `Level3’ workbook. Make sure
you have enabled the workbook sharing, and then, create the new copy of the workbook,
Proposal Review.xlsx. Use the Save As command to create the Proposal Review.xlsx workbook
and edit it, as shown below. Close Proposal Review.xlsx (the new copy of the workbook), before
you merge it to the original copy.
Proposal.xlsx
- the original shared workbook
Proposal Review.xlsx
- make a copy of the Proposal workbook
and save it with the name Proposal
Review. Send it to another user to
update its details as shown on the right.
 2007 ComputerTrainingManual.com
91
Microsoft
Excel 2007
Level 3
USING WORKGROUP FEATURES
Before you begins, add the Compare and Merge
Workbooks button on the Quick Access Toolbar. Click
the Office Button, and then click the Excel Options button.
On the left pane, click Customize, click the Choose
commands from drop-down arrow, then click All
Commands. Click Compare and Merge Workbooks, click
the Add button, and then click the OK button.
How To Merge
Copies Of
Shared
Workbooks
SUMMARY
1. Open the original
workbook.
2. On the Quick
Access Toolbar,
click the Compare
and Merge
Workbooks button.
3. Select the workbook
you want to merge.
4. Click the OK button.
1.
Open the original workbook Proposal.
Make sure the Proposal Review workbook is not open.
2.
On the Quick Access Toolbar, click the Compare and
Merge Workbooks button.
The Select Files to Merge Into Current Workbook dialog box appears.
TIPS
 Use the Save As
command to create
new copies of the
shared workbook.
 Make sure all the
copies of the shared
workbook you want to
merge (copies of the
proposal workbook)
are closed when you
merge them.
 You can also select
multiple workbooks to
merge. Hold down
<Ctrl>, and then click
the workbooks.
3.
Locate and click the file Proposal Review from the list.
Click the OK button.
The workbook is merged into the current original workbook. Updates indicators
appear on the upper left of the cells, which have been updated. When you move
the mouse pointer over a cell containing one of these indicators, a comment
appears to show the details.
 2007 ComputerTrainingManual.com
92
Microsoft
Excel 2007
Level 3
USING WORKGROUP FEATURES
How To Accept
Or Reject
Changes In A
Merged
Workbook
1.
Click the Review tab. In the Changes group, click
Track Changes >> Accept or Reject Changes.
The Select Changes to Accept or Reject dialog appears.
2.
Click the When drop-down arrow, and select the
options you want.
By default, the `Not yet reviewed’ option is selected.
SUMMARY
1. Click the Review tab.
In the Changes
group, click Track
Changes >> Accept
or Reject Changes.
2. Click the When list
arrow, select the
options you want.
3. Click the OK button.
4. Click the suitable
button to accept or
reject the changes.
3.
Click the OK button.
The cursor moves to the first cell which has changes. A dialog box displays the
details of the changes and prompts you to accept or reject them.
4.
Click the appropriate button to accept or reject the
changes.
The options available are:
Button
Description
Accept
Accepts the change in the cell.
Reject
Rejects the change in the cell.
Accept All
Accepts all remaining changes.
Reject All
Rejects all remaining changes.
Close
Close the dialog box without viewing the
rest of the changes
 2007 ComputerTrainingManual.com
93
Microsoft
Excel 2007
Level 3
USING WORKGROUP FEATURES
How To Protect
A Shared
Workbook
1.
You can use the existing Proposal workbook or create a new workbook. By
protecting the shared workbook, you can prevents the change history from being
removed.
2.
Click the Review tab. In the Changes group, click the
Protect Shared Workbook button.
If you open a workbook that is not shared, it has Protect and Share Workbook
button instead.
SUMMARY
1. Open the shared
workbook that you
want to protect.
2. Click the Review tab.
In the Changes
group, click the
Protect Shared
Workbook button.
3. Under Protect
workbook for, select
the Sharing with
track changes
option.
4. Click the OK button.
Open the shared workbook that you want to protect.
3.
Under Protect workbook for, select the Sharing with
track changes option.
You are not able to protect a shared workbook if this option is not selected. You
can also assign a password to protect the workbook, so that unauthorized users
are not able to unprotect the workbook.
4.
Click the OK button.
The workbook is now protected.
 2007 ComputerTrainingManual.com
94
Microsoft
Excel 2007
Level 3
USING WORKGROUP FEATURES
How To Track
Changes In The
Same Workbook
SUMMARY
1. Open the workbook
which has been
merged with the
updated workbook
copy.
2. Click the Review tab.
In the Changes
group, click Track
Changes >>
Highlight Changes.
3. Under the Highlight
which changes area,
click the When dropdown arrow and click
the options you want.
4. Click the OK button.
You can store the workbook on you server and let users
access and edit the same workbook. Then, you can open the
workbook to review the changes from different users.
Work on the same workbook. Before each time you edit the
workbook, change the user name, so that it looks like
different users have edited the workbook. To change the
user name, click The Office button, then click the Excel
Options button. In the User Name box, type a new name.
1.
Click the Review tab. In the Changes group, click
Track Changes >> Highlight Changes.
The Highlight Changes dialog appears.
2.
Under the Highlight Which Changes area, click the
When drop-down arrow and click the options you
want.
The descriptions for the other options are shown on the following page. Note:
Click the Highlight changes on screen check box if it is not selected.
3.
Click the OK button.
Update indicators appear on the upper left of the cells, which have been
updated. When you move the mouse pointer over a cell containing one of these
indicators, a comment appears to show the details.
 2007 ComputerTrainingManual.com
95
Microsoft
Excel 2007
Level 3
USING WORKGROUP FEATURES
The options available in the Highlight Changes dialog
box are.
Options
Description
Track changes
while editing
Workbook sharing is disabled if this is
not selected. It also enables the
change history feature.
When
Displays the changes for a
designated time period.
Who
Displays the changes made by the
selected users.
Where
Displays the changes in the specified
cell ranges.
Highlight changes
on screen
Displays the changes on the
worksheet.
List changes on a
new sheet
Lists all the details of changes on the
History worksheet
 2007 ComputerTrainingManual.com
96
Microsoft
Excel 2007
Level 3
USING WORKGROUP FEATURES
How To Accept
Or Reject
Changes From
Different Users
1.
Click the Review tab. In the Changes group, click
Track Changes >> Accept or Reject Changes.
The Select Changes to Accept or Reject dialog box appears.
2.
Click the When drop-down arrow and select Not yet
reviewed from the list. Click the Who drop-down
arrow and select Everyone from the list.
You will review the changes from all the users.
SUMMARY
1. Click the Review tab.
In the Changes
group, click Track
Changes >> Accept
or Reject Changes.
2. Click the When dropdown arrow and
select the options you
want.
3. Click the Who dropdown arrow and
select the option you
want.
4. Click the OK button.
5. Click the new value
you want from the list
and click the Accept
button to accept or
click the Reject to
reject the change.
3.
Click the OK button.
The Accept or Reject Changes dialog box appears, showing the details of the
changes made by different users. If there is only a single user has changed the
cell, the following dialog box appears.
If there are changes made by more than two different users to the same cell, the
following dialog box appears in order for you to pick the value from the list before
accepting or rejecting it.
4.
Click the value you want from the list and click the
Accept button to accept the new value.
Excel moves on to show the next change that has been made.
 2007 ComputerTrainingManual.com
97
Automating
Routine
Tasks With
Macros
Objectives:
When you have completed these
lessons, you will be able to:
Record A New Macro
Run A Macro
Create A Run Macro Button On The
Quick Access Toolbar
Show The Developer Tab
Create A Macro Command Button On A
Worksheet
Edit The Command Button
Edit Macro Coding
Rename A Macro
Delete A Macro
Record A Relative Reference Macro
Run A Relative Reference Macro
 2007 ComputerTrainingManual.com
98
Microsoft
Excel 2007
Level 3
AUTOMATING ROUTINE TASKS WITH MACROS
Understanding Macros
If you repeat some routine tasks in Excel, you should use macros to automate the tasks
for you. A macro consists of a series of Excel commands that are replayed with a single
keystroke or a mouse click.
Although some macros are simply a recording of your keystrokes or mouse clicks, more
powerful VBA (Visual Basic for Applications) macros are written by developers to run
many commands on your computer. Hence, they pose a potential security risk, where a
hacker can potentially spread a virus on your computer.
For this reason, Microsoft Office Excel 2007 will detect if there is a problem with the
macros and disable them by default. The Message Bar as shown below appears to
notify you of a potentially unsafe macro when you open a workbook.
To enable the macro, click the Options button on the Message Bar. A security dialog
box opens, giving you the option to enable the macro.
There are two ways to create a macro.
Using the macro recorder. This tool helps you get started easily without having to
know visual basic programming. When you record a macro, you can use the keyboard
to type and use the mouse to click commands and all the instructions will be recorded
and automatically transformed to visual basic programming.
Using the Visual Basic Editor. Use the Visual Basic Editor to create a macro
manually. It is more flexible and powerful as it can include Visual Basic instructions that
cannot be recorded. However, you need to have sufficient knowledge in Visual Basic
programming.
 2007 ComputerTrainingManual.com
99
Microsoft
Excel 2007
Level 3
AUTOMATING ROUTINE TASKS WITH MACROS
Storing Macros
You have an option to store the macro in the current workbook, a new workbook, or in
the personal macro workbook (Personal.xlsb). In Office Excel 2007, you can only save
the macro in a macro-enabled workbook (.xlsm) or the personal macro workbook
(Personal.xlsb). You cannot save macros in an ordinary workbook (.xlsx).
Macros stored in other workbooks can only be used if the workbooks are open. If you
want a macro to be always available whenever you use Excel, save the macro in the
Personal Macro Workbook. Excel will then create a hidden personal macro workbook if
it doesn't already exist, and saves the macro in it.
The personal macro workbook is saved in
For Windows XP
C:\Documents and Settings\user name\Application Data\Microsoft\Excel\XLStart folder
For Windows Vista
C:\Users\user name\Application Data\Microsoft\Excel\XLStart folder
Using Absolute and Relative References
Sometimes you may want to record a macro using absolute references, which means
the exact cell references/locations are recorded the macro. On the other hand, a relative
reference refers to the cell position relative to the active cell instead of the exact cell
reference.
The following example uses absolute references. This means the macro may be run
anytime without having to position the active cell on the worksheet.
 2007 ComputerTrainingManual.com
100
Microsoft
Excel 2007
Level 3
AUTOMATING ROUTINE TASKS WITH MACROS
When you click the Calculate Jan Profit button, the macro will copy the Jan data from
the table above (cell B1 to cell B3) and paste it into the Profit Analysis table (cell B7 to
cell B9)
When you click the Calculate Feb Profit button, the macro will copy the Feb data from
the table above (cell C1 to cell C3) and paste it into the Profit Analysis table (cell B7 to
cell B9).
Before you begin, create the following table in a new workbook or copy the [Macro]
worksheet from the `Level3’ workbook. Make sure you have enter the formula =B8-B9
in the cell B10.
=B8-B9
 2007 ComputerTrainingManual.com
101
Microsoft
Excel 2007
Level 3
AUTOMATING ROUTINE TASKS WITH MACROS
How To Record
A New Macro
1.
Click the View tab. In the Macros group, click Macros
>> Record Macro. In the Macro name box, type
CalculateJanProfit. Click in the Shortcut key box and
press <Shift>+<J> as the shortcut key.
<Ctrl>+<Shift>+<J> will be used as the shortcut to run the macro. This new
shortcut key you specify will override any existing Microsoft Excel shortcut keys
while this workbook is open. If you want to include a description of the macro,
type it in the Description box.
SUMMARY
1. Click the View tab. In
the Macro group,
click Macro >>
Record Macro.
2. In the Macro name
box, type the macro
name.
3. In the Shortcut key
box, press the keys
on the keyboard to
create the shortcut.
4. Click the OK button.
5. Perform the tasks you
want to record.
6. Click the Stop
Recording button on
the Status Bar when
you finish.
TIPS
 Spaces are not
allowed in the Macro
name.
 The shortcut key
letter you use to run
the macro cannot be
a number or special
character such as @
or #.
2.
Click the OK button.
The recording procedure has started. All the actions from now onwards are
being recorded into the Macro. The Stop Recording toolbar appears to let you
select a relative/absolute reference and to stop the recording. Make sure the
relative reference is NOT selected for this macro (button not pressed in).
Relative reference button is NOT
pressed in. This means the
exact cell references will be
recorded.
Relative reference button is
pressed in. We will see when to
use the relative reference button
later.
When the recording is in progress, the status bar shows the
following Stop Recording button.
 2007 ComputerTrainingManual.com
102
Microsoft
Excel 2007
Level 3
AUTOMATING ROUTINE TASKS WITH MACROS
3.
Click the range B1:B3. Click the
Copy button.
This is to copy the content of cell B1 to the clipboard.
4.
Click cell B7. Click the Home tab, In the Clipboard
group, click Paste >> Paste Values.
This is to paste the data as values into the cell B7.
5.
Click the OK button.
The Jan data is pasted into cells B7, B8 and B9 as shown below. You will see
that the format of the destination cells remains unchanged because you have
pasted only the values from the source cells, not the format.
6.
Click the Stop Recording button on the Status Bar.
This macro recording process stops.
You can then try to create another new macro with the name
CalculateFebProfit to copy and paste Feb data into the Profit Analysis table.
 2007 ComputerTrainingManual.com
103
Microsoft
Excel 2007
Level 3
AUTOMATING ROUTINE TASKS WITH MACROS
Before you run this macro, delete the contents of cells B7,
B8 and B9.
How To Run A
Macro
1.
Click the View tab. In the Macros group, click Macros
>> View Macros.
The Macro dialog box appears. The macros (all the macros from the workbooks,
which are currently open and the macros you stored in the Personal Macro
Workbook) are listed in the Macro name: box. If you want to use any macro that
is stored in another workbook, you have to open that workbook in order to run
the macro in this workbook.
SUMMARY
1. Click the View tab. In
the Macros group,
click Macros >> View
Macros.
2. In the Macro name
box, click the macro
you want to run.
3. Click the Run button.
TIPS
 You can also run the
macro using the
shortcut keys that you
specified for this
macro in the previous
lesson. Press
<Ctrl>+<Shift>+<J>
to run the macro.
 When you use the
shortcut keys to run
the macro, you do not
need to open the
Macro dialog box.
 If you want to stop a
macro before it
completes its actions,
press <ESC>.
2.
In the Macro name box, click CalculateJanProfit. Click
the Run button.
You can also double-click the macro name to run the macro. When you run the
macro, the Jan data is copied into the Profit Analysis table as shown below.
Note: The CalculateFebProfit macro is only available if you have recorded the
new macro for the Feb data as mentioned in the tips box on the previous page.
 2007 ComputerTrainingManual.com
104
Microsoft
Excel 2007
Level 3
AUTOMATING ROUTINE TASKS WITH MACROS
How To Create A
Run Macro
Button On The
Quick Access
Toolbar
1.
Click the Customize Quick Access Toolbar button.
And then, click More Commands.
The Excel Options dialog box appears.
SUMMARY
1. Click the Customize
Quick Access
Toolbar button. And
then, click More
Commands.
2. In the Choose
commands from
box, click Macros.
Click the macro you
want from the list.
3. Click the Add button
4. Click the OK button.
2.
In the Choose commands from box, click Macros.
Click CalculateJanProfit from the list. And then, click
the Add button.
The new macro is added to the list on the right, as shown below.
3.
Click the OK button.
The macro button is added to the Quick Access Toolbar. You can now click the
button to run the CalculateJanProfit macro.
 2007 ComputerTrainingManual.com
105
Microsoft
Excel 2007
Level 3
AUTOMATING ROUTINE TASKS WITH MACROS
How To Show
The Developer
Tab
1.
Click the Office Button , and then click the Excel
Options button.
The Excel Options dialog box appears.
2.
SUMMARY
On the left pane, click Popular. On the right pane,
under the Top options for working with Excel area,
select the Show Developer tab in the Ribbon check
box.
By default, the Developer tab is hidden.
1. Click the Office
Button, and then
click the Excel
Options button.
2. On the left pane, click
Popular. On the right
pane, under the Top
options for working
with Excel area,
select the Show
Developer tab in the
Ribbon check box
3. Click the OK button.
3.
Click the OK button.
The Developer tab appears in the Ribbon.
 2007 ComputerTrainingManual.com
106
Microsoft
Excel 2007
Level 3
AUTOMATING ROUTINE TASKS WITH MACROS
How To Create A
Macro
Command
Button On A
Worksheet
1.
Click the Developer tab. In the Controls group, click
the Insert >> Button.
The mouse pointer changes to a crosshair pointer, which enables you to draw a
button on the worksheet.
SUMMARY
1. Click the Developer
tab. In the Controls
group, click the Insert
>> Button.
2. Click and drag to
draw the button on
the worksheet.
3. In the Macro name
box, click the macro
you want to assign to
the button.
4. Click the OK button.
5. Right-click the button.
6. Click Edit Text.
7. Type the new label
for the button.
2.
Click and drag to draw a button on the worksheet.
The Assign Macro dialog box appears, as shown below.
TIPS
 Instead of using the
command button, you
can also assign a
macro to a shape.
To assign a macro
to a shape, draw a
shape, then, rightclick the shape and
click assign macro
command.
3.
Click the macro CalculateJanuaryProfit. And then,
click the OK button.
The Macro is assigned to the command button.
 2007 ComputerTrainingManual.com
107
Microsoft
Excel 2007
Level 3
AUTOMATING ROUTINE TASKS WITH MACROS
How To Edit The
Command
Button
1.
Right-click at the command button.
A shortcut menu appears, as shown below
SUMMARY
1. Right-click at the
command button.
2. Click Edit Text.
3. Type in the new label.
4. Click outside of the
button.
2.
Click Edit Text and edit the label to Calculate Jan
Profit.
To reassign a new macro, click the Assign Macro command from the menu.
 2007 ComputerTrainingManual.com
108
Microsoft
Excel 2007
Level 3
AUTOMATING ROUTINE TASKS WITH MACROS
Editing A Macro
After you have recorded the macro, you are able to edit and make changes to the
macro. However, in order to edit a macro effectively, you must have sufficient knowledge
of Visual Basic Programming. The Visual Basic Editor can be used to write and edit
macros attached to Microsoft Excel workbooks.
How To Edit
Macro Coding
1.
Click the Developer tab. In the Code group, click the
Macros button.
The Macro dialog appears.
SUMMARY
1. Click the Developer
tab. In the Code
group, click Macros.
2. In the Macro name
box, click the macro
you want to edit.
3. Click the Edit button.
4. Edit the programming
code.
5. Close the Microsoft
Visual Basic window
when finished.
2.
In the Macro name box, click CalculateJanProfit and
click the Edit button.
The Microsoft Visual Basic window appears to display the coding for the macro.
3.
Edit the programming code and close the Microsoft
Visual Basic windows when finished.
Make any necessary changes. You need to understand the Visual Basic
programming code if you want to edit your macro..
 2007 ComputerTrainingManual.com
109
Microsoft
Excel 2007
Level 3
AUTOMATING ROUTINE TASKS WITH MACROS
How To Rename
A Macro
1.
Click the Developer tab. In the Code group, click
Macros.
The Macro dialog appears.
SUMMARY
1. Click the Developer
tab. In the Code
group, click Macros.
2. In the Macro name
box, click the macro
for which you want to
change the name.
3. Click the Edit button.
4. Edit the macro name
in the Microsoft Visual
Basic window.
5. Close the Microsoft
Visual Basic window
when finished.
2.
In the Macro name box, click CalculateJanProfit and
click the Edit button.
The Microsoft Visual Basic windows appear to display the programming code for
the macro.
3.
Highlight the word Jan in the command line: Sub
CalculateJanProfit(). Type January.
The Macro name is renamed to CalculateJanuaryProfit.
4.
Close the Microsoft Visual Basic windows when
finished.
You return to Excel. You have to reassign the macro to your button as the name
has changed.
 2007 ComputerTrainingManual.com
110
Microsoft
Excel 2007
Level 3
AUTOMATING ROUTINE TASKS WITH MACROS
How To Delete A
Macro
1.
Click the Developer tab. In the Code group, click
Macros.
The Macro dialog box appears.
SUMMARY
1. Click the Developer
tab. In the Code
group, click Macros.
2. In the Macro name
box, click the macro
you want to delete.
3. Click the Delete
button.
4. Click the Yes button.
2.
In the Macro name box, click CalculateJanuaryProfit
and click the Delete button.
The Microsoft Office Excel dialog box appears to get your confirmation before
deleting the macro.
3.
Click the No button.
You do not want to delete this macro now.
 2007 ComputerTrainingManual.com
111
Microsoft
Excel 2007
Level 3
AUTOMATING ROUTINE TASKS WITH MACROS
Using A Relative Reference Macro
If you want a macro to perform an action on cells relative to the active cell, you must
select the Use Relative References while you are recording the macro. This means
that the exact cell reference will not be recorded into your macro.
To record a macro with relative references,
make sure the Use Relative References button
is pressed highlighted.
To record a macro with absolute references,
make sure the Use Relative References button
is NOT highlighted.
However, you can mix the use of relative and absolute references when you record the
macro. This may be helpful if you want a macro to select a specific cell, perform an
action, and then select another cell relative to the active cell.
 2007 ComputerTrainingManual.com
112
Microsoft
Excel 2007
Level 3
AUTOMATING ROUTINE TASKS WITH MACROS
How To Record
A Relative
Reference Macro
1.
You can place your cursor at any cell. The exact cell reference of the active cell
is not important because the cell reference is not recorded when using relative
referencing. Once the recording starts, all the relative movements or actions are
recorded.
2.
SUMMARY
1. Click any cell.
2. Click the Developer
tab. In the Code
group, click the
Record Macro
button.
3. In the Macro name
box, type the macro
name.
4. Click the OK button.
5. Click the Relative
Reference button if it
is not highlighted.
6. Perform the actions
you want to be
recorded into the
macro.
7. On the status bar,
click the Stop
Recording button.
On a new worksheet, click cell B2.
Click the Developer tab. In the Code group, click
Record Macro.
The Record Macro dialog box appears.
3.
In the Macro name box, type ListAllProducts. Click in
the Shortcut key box and press <Shift>+<P> as the
shortcut key.
The shortcut key is to assign a new shortcut to run the macro. If the shortcut key
has already been used. This new shortcut key will overwrite it.
4.
Click the OK button.
The recording process is started. All actions are going to be captured into the
Macro. The Stop Recording toolbar appears when you click the OK button.
 2007 ComputerTrainingManual.com
113
Microsoft
Excel 2007
Level 3
AUTOMATING ROUTINE TASKS WITH MACROS
5.
Click the Developer tab. In the Code group, click Use
Relative Reference if it is not highlighted.
The relative reference button should be highlighted, as shown below.
6.
Type Product Name and press <Enter>
Type Wooden Chair and press <Enter>
Type Wooden Desk and press <Enter>
Type Metal Chair and press<Enter>
Type Metal Desk and press <Enter>
Type Plastic Chair and press<Enter>
Type Plastic Desk and press <Enter>
Click cell B2 and format the text in the cell to Bold and
Red.
Your screen should now look like the following.
7.
On the status bar, click the Stop Recording button.
This is to end the recording of the macro.
 2007 ComputerTrainingManual.com
114
Microsoft
Excel 2007
Level 3
AUTOMATING ROUTINE TASKS WITH MACROS
How To Run A
Relative
Reference Macro
1.
Click cell D4.
You need to place the cursor at the position where you want to run the macro,
which will then enter the list of product names.
SUMMARY
1. Click the cell where
you want to run the
relative reference.
2. Click the Developer
tab. In the Code
group, click the
Macros button.
3. In the Macro name
box, click the macro
you want to run.
4. Click the Run button.
2.
TIPS
Click the Developer tab. In the Code group, click the
Macros button.
The Macro dialog box appears.
 You can use the
shortcut when you
want to run this
macro. Press the
shortcut
<Ctrl>+<Shift>+<P>.
 If you want to stop a
macro before it
completes its actions,
press <ESC>.
3.
In the Macro name box, click ListAllProducts. Click
the Run button.
The product list is entered starting at the cell D4 as shown below. This list is
displayed relatively to the active cell (cell D4 in this case).
 2007 ComputerTrainingManual.com
115
Integrating
Data With
Other
Applications
Objectives:
When you have completed these
lessons, you will be able to:
Use The Text Import Wizard
Export Data To Another File Type
Copy Data From Other Applications
Insert An Object
Get Specific Information From Microsoft
Query
 2007 ComputerTrainingManual.com
116
Microsoft
Excel 2007
Level 3
INTEGRATING DATA WITH OTHER APPLICATIONS
Importing / Exporting Data
There are times that you may want to get information from or send information to other
applications. For example, you may want to import / export the data from the text file
Employee.txt into an Excel worksheet or vice versa.
Delimited Text File (delimiter: comma)
Fixed Width Text File
 2007 ComputerTrainingManual.com
117
Microsoft
Excel 2007
Level 3
INTEGRATING DATA WITH OTHER APPLICATIONS
When you want to import only part of the data from the source file, you may just copy and paste
the data into the Excel Worksheets.
Source file
Destination file
You can also create a new object or insert an existing object into the worksheet as shown
below.
 2007 ComputerTrainingManual.com
118
Microsoft
Excel 2007
Level 3
INTEGRATING DATA WITH OTHER APPLICATIONS
How To Use The
Text Import
Wizard
SUMMARY
1. Click the Office
Button >> Open.
2. In the Files of type
box, click Text Files.
3. Select the file name
from the list.
4. Click the Open
button.
5. Click the Next button.
6. Under Delimiters,
select the appropriate
delimiters.
7. Click the Next button.
8. Click the Finish
button.
9. Save the file.
Before you begin, use Notepad to create the following text file
and save it as Employee.txt.
1.
Click the Office Button >> Open.
The Open dialog box appears. To follow these steps, you need to create the
text file as seen on the previous page using notepad and name it Employee.
2.
In the Files of type box, click Text Files. Locate the
Employee text file that you have just created.
By default, only the Excel files are displayed in the list.
3.
Click the Open button.
The Text Import Wizard – Step 1 of 3 dialog box appears. By default, Delimited
text is selected. Select the Fixed width option button if you are importing a fixed
width text.
Increase the `Start import at row’ number if the text is not located at the
beginning of the text file.
 2007 ComputerTrainingManual.com
119
Microsoft
Excel 2007
Level 3
INTEGRATING DATA WITH OTHER APPLICATIONS
4.
Click the Next button.
5.
Under Delimiters, click the Comma check box.
Text Import Wizard – Step 2 of 3 dialog box appears. By default, the Tab
delimiter is selected.
The Data preview area shows how Excel arranges the data into columns.
If you wish to treat two or more delimiters as only one delimiter rather than as
separate delimiters, which will leave empty cells between them, select the Treat
consecutive delimiters as one check box.
6.
Click the Next button.
The Text Import Wizard – Step 3 of 3 dialog box appears. By default, General
Column data format is selected. This will convert all the data to the right format.
However, if you want to custom define the data format for individual columns,
select the column and change the column data format options.
You can also skip a column that you do not want to import.
 2007 ComputerTrainingManual.com
120
Microsoft
Excel 2007
Level 3
INTEGRATING DATA WITH OTHER APPLICATIONS
7.
Click the Finish button.
The data from the text file is converted and displayed in Excel.
8.
Click the Office Button >> Save As >> Excel
Workbook.
Change the File name if necessary. If you do not change the file type, by
default, the data is saved into the original text file
9.
Click the OK button.
The employee workbook is created.
 2007 ComputerTrainingManual.com
121
Microsoft
Excel 2007
Level 3
INTEGRATING DATA WITH OTHER APPLICATIONS
How To Export
Data To Another
File Type
1.
Open the workbook you want to export.
The workbook needs to be active before you convert it to another file format.
2.
Click the Office Button >> Save As >> Other Formats.
The Save As dialog box appears.
3.
SUMMARY
In the Save as type box, click the format you want.
Change the file name if necessary.
You can use the scroll bar to look for the appropriate file format.
1. Open the workbook.
2. Click the Office
Button >> Save As
>> Other Formats.
3. In the Save as type
box, select the format
you want.
4. Click the Save button.
4.
Click the Save button.
The data is converted and saved into the selected format file.
 2007 ComputerTrainingManual.com
122
Microsoft
Excel 2007
Level 3
INTEGRATING DATA WITH OTHER APPLICATIONS
How To Copy
Data From Other
Applications
Before you begin, create a Word document, as shown
below.
1.
Open the file which contains the source data using the
application in which the file was created.
You open and view the file in its application.
SUMMARY
1. Open the source file.
2. Select the data to be
copied.
3. Click the Copy
button.
4. Switch to Excel
worksheet.
5. Click the Home tab,
In the Clipboard
group, click Paste >>
Paste Link.
6. Click the Paste Link
option button.
7. Click the OK button.
2.
Select the data to be copied into the Excel worksheet.
Click the Copy button.
Only the selected data is copied onto the clipboard.
 2007 ComputerTrainingManual.com
123
Microsoft
Excel 2007
Level 3
INTEGRATING DATA WITH OTHER APPLICATIONS
3.
You can use <Alt>+<Tab> to switch application or click the Excel button on the
task bar.
TIPS
 If you use normal
paste command to
paste the selected
text, the copied text is
automatically
converted and
inserted as the
contents of the cells.
Switch to the Excel worksheet and click the cell B2
where you will place the copied data.
4.
Click the Home tab. In the Clipboard group, click
Paste >>Paste Link.
Make sure you click the Paste drop-down arrow to display the list of command
for you to select the Paste Link. Here, you use the paste link to paste the
selected text from the document to the worksheet. Whenever you update the
details in the document, the worksheet will be updated automatically.
The linked object appears as shown below. into the worksheet as a Word
document object, which you can edit by double-clicking the object.
 2007 ComputerTrainingManual.com
124
Microsoft
Excel 2007
Level 3
INTEGRATING DATA WITH OTHER APPLICATIONS
How To Insert
An Object
1.
Click the cell B2.
You will insert a logo here.
2.
Click the Insert tab. In the Text group, click the Object
button.
The Object dialog box appears.
SUMMARY
1. Click the cell where
you want to insert an
object.
2. Click the Insert tab.
In the Text group,
click the Object
button.
3. Click the Create New
tab.
4. In the Object type
box, select the object
type you want.
5. Click the OK button.
6. Draw the object.
7. Click outside of the
object window when
finished.
TIPS
 If you want to insert
an existing object,
click Create from
File tab and select
the object file name.
3.
Click the Create New tab. In the Object type box, click
Bitmap Image. Click the OK button.
The object is created on the worksheet in an outline.
 2007 ComputerTrainingManual.com
125
Microsoft
Excel 2007
Level 3
INTEGRATING DATA WITH OTHER APPLICATIONS
4.
Draw the object in the object area.
Use the drawing tools on the left to draw and format the image.
5.
Click outside the object when finished.
If you want to edit the object, double-click the object.
 2007 ComputerTrainingManual.com
126
Microsoft
Excel 2007
Level 3
INTEGRATING DATA WITH OTHER APPLICATIONS
Retrieving Data From A Database
Most companies keep their records in databases. For example, the Human Resource
department keeps and updates information on their employees using a particular database.
With Microsoft Excel, you can retrieve records from any existing database. You can also
specify and filter the records you want to appear as an external data range on your worksheet.
The records found in a Microsoft Access table.
Excel retrieves the customer information and
presents it on a worksheet.
 2007 ComputerTrainingManual.com
127
Microsoft
Excel 2007
Level 3
INTEGRATING DATA WITH OTHER APPLICATIONS
How To Get
Specific
Information
From Microsoft
Query
1.
Click the cell A1. Click the Data tab. In the Get
External Data group, click From Other Sources >>
From Microsoft Query.
The Choose Data Source dialog box appears.
SUMMARY
1. Click the where you
want to place the
data.
2. Click the Data tab. In
the Get External
Data group, click
From Other Sources
>> From Microsoft
Query.
3. Click the Database
tab. Click MS
Access Database
from the list. Click
the OK button.
4. Select the database
you want and then
click the OK button.
5. Select the fields in the
table, which you want
to show.
6. Click the Next
buttons until you
come to the Finish
button to end the
wizard.
7. Click the OK button.
2.
Click the Database tab. Click MS Access Database
from the list. Click the OK button.
You will get information from an Access database.
3.
Select the Northwind.accdb database. Click the OK
button.
You need to navigate to the folder where the database is stored. If you do not
have the Northwind database, create it from the Access template.
 2007 ComputerTrainingManual.com
128
Microsoft
Excel 2007
Level 3
INTEGRATING DATA WITH OTHER APPLICATIONS
4.
Under Available tables and columns, double-click
Employees from the list.
The Employees table expands to show the fields in the table.
5.
Click EmployeeID, and then click the right arrow
button.
Send both the LastName and FirstName fields into
your query box as well.
The three fields now appear in the Columns in your query box.
6.
Click the Next button.
This dialog box allows you to filter your data.
 2007 ComputerTrainingManual.com
129
Microsoft
Excel 2007
Level 3
INTEGRATING DATA WITH OTHER APPLICATIONS
7.
Click the Next button.
This dialog box allows you to sort your data.
8.
Click the Finish button.
The final step asks if you want to return the data to Microsoft Excel.
 2007 ComputerTrainingManual.com
130
Microsoft
Excel 2007
Level 3
INTEGRATING DATA WITH OTHER APPLICATIONS
9.
Click the OK button.
By default, the Database Query places the external data range in cell A1 on the
existing worksheet. You can, however, change the destination if you want.
Only the selected Employee information appears
on your worksheet.
 2007 ComputerTrainingManual.com
131