Office 2010 Training
Excel 2010 Courseware
Student Manual Advanced
Microsoft Office Excel 2010 Advanced Courseware
Written by Kelvin MacDonald
Published by Velsoft Training Materials Inc.
Courseware Release Version 3.0
© 2011 by Velsoft Training Materials, Inc.
Notice of Rights
No part of this publication may be reproduced, transmitted, transcribed, stored in a retrieval system, or translated into any language or
computer language, in any form or by any means, electronic, mechanical, magnetic, optical, chemical, manual, or otherwise, without the prior
written permission of Velsoft Training Materials, Inc. except under the terms of a courseware site license agreement.
Trademark Notice
PowerPoint, Windows, Word, Microsoft are trademarks of Microsoft, Inc. Throughout this courseware title, trademark names are used. Rather
than just put a trademark symbol in each occurrence of a trademarked name, we state we are using the names only in an editorial fashion and
to the benefit of the trademark owner with no intention of infringement of the trademark.
Notice of Liability
The information in this courseware title is distributed on an ‘as is’ basis, without warranty. While every precaution has been taken in the
preparation of this course, neither the authors nor Velsoft Training Materials, Inc. shall have any liability to any person or entity with respect to
any loss or damage caused or alleged to be caused directly or indirectly by the instructions contained in this book or by the computer software
and hardware products described in it.
Disclaimer
We make a sincere effort to ensure the accuracy of the material described herein; however, Velsoft Training Materials makes no warranty,
expressed or implied, with respect to the quality, correctness, reliability, accuracy, or freedom from error of this document or the products it
describes. Data used in examples and sample data files are intended to be fictional. Any resemblance to real persons or companies is entirely
coincidental.
All information in this manual was correct at the time of writing. Velsoft is not affiliated with nor has any control over changes made to the
product described in this manual. These include, but are not limited to, changes in the application’s color scheme, icon appearance and
locations, addition or removal of program features, online templates, and help content. Velsoft reserves the right to make corrections to the
courseware at any time and without notification.
Terms and conditions
Sample versions: If the version of courseware that you are viewing is marked as NOT FOR TRAINING, SAMPLE, or similar, then it is made
available for content and style review only and cannot be used in any part of a training course. Sample versions may be shared but cannot be
re-sold to a third party. For licensed users: This document may only be used under the terms of the license agreement from Velsoft Training
Materials, Inc. Velsoft reserves the right to alter the licensing conditions at any time, without prior notice.
Velsoft Training Materials, Inc.
185 Provost Street
New Glasgow, Nova Scotia
B2H 2P8
Canada
© 2005-2011 Velsoft Training Materials, Inc.
Table of Contents
Introduction.................................................................................................................................... 1
Prerequisites ................................................................................................................................... 2
Section 1: Getting the Most from Your Data ................................................................................ 3
Lesson 1.1: Outlining and Grouping Data ........................................................................................... 4
Using Automatic Outlining ..................................................................................................................................5
Displaying and Collapsing Levels........................................................................................................................7
Grouping Data Manually.....................................................................................................................................9
Creating Subtotals..............................................................................................................................................13
Lesson 1.2: Exploring Scenarios.......................................................................................................... 17
What is a Scenario? ...........................................................................................................................................17
Creating a Scenario ...........................................................................................................................................18
Saving Multiple Scenarios..................................................................................................................................22
Merging Scenarios .............................................................................................................................................24
Creating a Scenario Summary Report ...............................................................................................................28
Lesson 1.3: Using Data Analysis Tools ............................................................................................... 30
Enabling Data Analysis Tools............................................................................................................................30
An Overview of Excel’s Analysis Tools..............................................................................................................35
An Overview of the Available Add-In Tools.......................................................................................................45
Using a One or Two Input Data Table...............................................................................................................50
Using Goal Seek.................................................................................................................................................61
Lesson 1.4: Using Solver ...................................................................................................................... 65
Understanding Solver ........................................................................................................................................65
Generating Reports and Scenarios with Solver .................................................................................................74
Changing Solver Values.....................................................................................................................................74
Managing Solver Constraints ............................................................................................................................76
Choosing a Solving Method ...............................................................................................................................76
Using Solver as a Goal Seek Tool ......................................................................................................................77
Lesson 1.5: Excel and Hyperlinks ....................................................................................................... 79
What is a Hyperlink?..........................................................................................................................................79
Inserting Hyperlinks...........................................................................................................................................80
Editing Hyperlinks .............................................................................................................................................87
Formatting Hyperlinks .......................................................................................................................................88
Using Hyperlinks in Excel..................................................................................................................................94
Section 1: Review Questions .............................................................................................................. 100
Section 2: Pivoting Data ............................................................................................................ 102
Lesson 2.1: Getting Started with PivotTables .................................................................................. 103
What is a PivotTable? ......................................................................................................................................103
Creating a PivotTable ......................................................................................................................................104
Using the PivotTable Tools Tabs .....................................................................................................................108
Adding and Removing Data with the Field List ...............................................................................................117
Changing the Field List Layout........................................................................................................................121
Pivoting Data ...................................................................................................................................................123
Lesson 2.2: Working with PivotTable Data ..................................................................................... 134
Expanding and Collapsing Data ......................................................................................................................134
Filtering Data ..................................................................................................................................................136
© 2005-2011 Velsoft Training Materials, Inc.
Sorting Data.....................................................................................................................................................143
Grouping Data .................................................................................................................................................148
Refreshing Data ...............................................................................................................................................150
Editing the Data Source ...................................................................................................................................154
Lesson 2.3: Formatting a PivotTable ................................................................................................ 157
Modifying Fields and Labels............................................................................................................................158
Modifying Values .............................................................................................................................................166
Using the Layout Group on the Design Tab.....................................................................................................171
Applying a Style to a PivotTable ......................................................................................................................176
Changing PivotTable Style Options .................................................................................................................179
Manually Formatting a PivotTable..................................................................................................................180
Using the PivotTable Options Dialog ..............................................................................................................182
Lesson 2.4: Using the Classic PivotTable Layout ............................................................................ 185
Creating an Empty (Classic) PivotTable Frame ..............................................................................................185
Switching an Existing PivotTable to a Classic Layout.....................................................................................188
Adding Data .....................................................................................................................................................190
Pivoting Data ...................................................................................................................................................192
Lesson 2.5: Advanced PivotTable Tasks .......................................................................................... 196
Creating a PivotTable Based on External Data...............................................................................................196
Refreshing External Data.................................................................................................................................205
Creating a Slicer ..............................................................................................................................................206
Using the Slicer Tools Tab ...............................................................................................................................213
Lesson 2.6: Using PowerPivot............................................................................................................ 218
System Requirements........................................................................................................................................218
Downloading and Installing PowerPivot .........................................................................................................218
Importing Access Data.....................................................................................................................................221
Importing Excel Data.......................................................................................................................................226
Integrating Data with Relationships ................................................................................................................230
Creating a PivotTable with PowerPivot Data .................................................................................................231
Section 2: Review Questions .............................................................................................................. 236
Section 3: Charting Pivoted Data.............................................................................................. 238
Lesson 3.1: Getting Started with PivotCharts ................................................................................. 239
Creating a PivotChart from Scratch ................................................................................................................240
Creating a PivotChart from Existing Data ......................................................................................................241
Adding Data to your Chart ..............................................................................................................................243
Pivoting Data ...................................................................................................................................................245
Lesson 3.2: Using the PivotChart Tools Tabs .................................................................................. 253
Using the Design Tab.......................................................................................................................................253
Using the Layout Tab.......................................................................................................................................258
Using the Format Tab ......................................................................................................................................263
Using the Analyze Tab .....................................................................................................................................268
Lesson 3.3: Formatting a PivotChart................................................................................................ 272
Renaming Fields ..............................................................................................................................................272
Changing the Chart Type .................................................................................................................................275
Applying a Chart Style .....................................................................................................................................281
Manually Formatting Chart Elements .............................................................................................................283
Changing the Layout of Chart Elements ..........................................................................................................295
Lesson 3.4: Advanced PivotChart Tasks .......................................................................................... 302
Creating a PivotChart Based on External Data ..............................................................................................302
Creating a Slicer ..............................................................................................................................................309
Creating a PivotTable and PivotChart from a Scenario..................................................................................312
Creating PivotCharts with PowerPivot Data...................................................................................................319
Section 3: Review Questions .............................................................................................................. 327
© 2005-2011 Velsoft Training Materials, Inc.
Section 4: Advanced Excel Tasks.............................................................................................. 329
Lesson 4.1: Using Advanced Functions ............................................................................................ 330
Using the PMT Function..................................................................................................................................330
Using the FV Function .....................................................................................................................................333
Understanding Logical Functions....................................................................................................................334
Using Logical Functions ..................................................................................................................................339
Using IFERROR with Array Formulas ............................................................................................................341
Lesson 4.2: Using the VLOOKUP Function..................................................................................... 346
Understanding VLOOKUP and HLOOKUP....................................................................................................346
Using VLOOKUP to Find Data .......................................................................................................................346
How to Find an Exact Match with VLOOKUP ................................................................................................349
Finding an Approximate Match with VLOOKUP ............................................................................................350
Using VLOOKUP as an Array Formula ..........................................................................................................352
Lesson 4.3: Using Custom AutoFill Lists.......................................................................................... 355
What is an AutoFill List? .................................................................................................................................355
Creating a Custom AutoFill List ......................................................................................................................356
Using a Custom AutoFill List...........................................................................................................................360
Modifying a Custom AutoFill List ....................................................................................................................361
Deleting a Custom AutoFill List ......................................................................................................................362
Lesson 4.4: Linking, Consolidating, and Combining Data ............................................................ 363
Linking Workbooks ..........................................................................................................................................363
Consolidating Workbooks ................................................................................................................................365
Combining Worksheets.....................................................................................................................................369
Pivoting Consolidated Data .............................................................................................................................372
Section 4: Review Questions .............................................................................................................. 379
Section 5: Macros, Visual Basic, and Excel Programming ..................................................... 381
Lesson 5.1: Creating a Basic Macro.................................................................................................. 382
Recording a Macro ..........................................................................................................................................382
Editing a Macro ...............................................................................................................................................383
Running a Macro .............................................................................................................................................385
Understanding Macro Security ........................................................................................................................386
Lesson 5.2: Visual Basic and Macros................................................................................................ 390
Opening the Visual Basic Editor......................................................................................................................390
Understanding the Visual Basic Editor............................................................................................................391
Adding Code to your Macro.............................................................................................................................393
Adding Comments to Visual Basic Code..........................................................................................................393
Lesson 5.3: More Macro Tasks.......................................................................................................... 395
What are Relative References? ........................................................................................................................395
Recording a Relative Reference Macro............................................................................................................395
Running a Relative Reference Macro...............................................................................................................396
Assigning a Keyboard Shortcut to a Macro .....................................................................................................397
Copying a Macro from a Workbook or Template ............................................................................................399
Lesson 5.4: Advanced Visual Basic Tasks ........................................................................................ 404
Declaring Variables .........................................................................................................................................404
Iteration over a Range .....................................................................................................................................404
Prompting for User Input.................................................................................................................................405
Using If, Then, and Else Statements.................................................................................................................407
Section 5: Review Questions .............................................................................................................. 409
Index ........................................................................................................................................... 411
© 2005-2011 Velsoft Training Materials, Inc.
Introduction
Welcome to Velsoft’s courseware for Microsoft Office Excel 2010, a popular spreadsheet
application designed for organizing and analyzing data, performing calculations, and charting
information. This new version of Excel incorporates powerful Slicer filtering tools for
PivotTables and PivotCharts, and works seamlessly with the new PowerPivot add-on.
This advanced level is intended to help regular users of Excel become even more proficient by
expanding their knowledge of Excel’s data analysis tools, consolidation tools, advanced
functions, and PivotTables. This manual will also help experienced users who may be unfamiliar
with the ribbon interface introduced in Excel 2007.
This manual will cover a variety of organizing tools and What-If analysis tools that will help Excel
users get the most out of their data. In addition, two key advanced spreadsheet tools
(PivotTables and PivotCharts) will be discussed at length. Following that, advanced concepts
dealing with Excel functions, AutoFill lists, and consolidating and combining data will also be
covered. The new Slicer features and PowerPivot add-on, two important tools for working with
PivotTables and PivotCharts, are covered as well.
This manual was created using Microsoft Office 2010 Professional Plus. Our test machine was a
32-bit computer using Windows 7 Ultimate. If you are an instructor, you can use any version of
Windows that is accessible to your students. Any feature specific to Windows 7 in this manual
will be marked as such.
Occasionally, this manual may reference where certain keys are on the keyboard (such as
Insert, Home, or Page Up). The directions are given based on a standard desktop keyboard that
contains a separate number pad. Laptop keyboards may be different or have combined keys.
Microsoft Office Excel 2010 Advanced 2
Prerequisites
This manual presumes that the user has a basic knowledge of Windows, including concepts
such as using the mouse and keyboard. With respect to Excel, we also presume that the user
has completed the Intermediate level of this course (or has equivalent knowledge) and is
familiar with concepts such as:
Using right-click menus
Working with dialog boxes
Worksheet organization (rows, columns, labels)
Cutting, copying, pasting, selecting, and moving Excel data
Basic cell data formatting tasks
Working with cell references and cell ranges (named ranges)
Manipulating multiple open worksheets and/or workbooks
Creating and manipulating standard Excel data tables
Using Excel functions
Building formulas in Excel
Working with external data sources
Creating and manipulating standard Excel charts
© 2005-2011 Velsoft Training Materials, Inc.
Microsoft Office Excel 2010 Advanced 3
Section 1: Getting the Most from Your Data
In this section you will learn how to:
Use automatic outlining
Display and collapse levels
Manually group data
Create subtotals
Describe scenarios
Create a scenario
Save multiple scenarios
Merge scenarios together
Create a scenario summary report
Enable data analysis tools
Identify available analysis and add-in tools
Use a one or two input data table
Use Goal Seek
Generate reports and scenarios with Solver
Change Solver values and manage constraints
Choose a solving method
Use Solver as a goal seek tool
Insert, edit, format, and use hyperlinks
© 2005-2011 Velsoft Training Materials, Inc.
Microsoft Office Excel 2010 Advanced 4
Lesson 1.1: Outlining and Grouping Data
Sometimes, a worksheet can become very large and contain so much data that it becomes
difficult to understand. Totals and subtotals that summarize the data can be lost in screen after
screen of numbers. Thankfully, Excel 2010 has an excellent feature to help with this kind of
problem.
Excel’s grouping and outlining features will allow you to collapse a large worksheet to show or
print summary data. The grouping and outlining features can also expand the same worksheet
to show data, or allow modification of the details. Outlining lets you manage the level of detail
at which your worksheet will be presented.
© 2005-2011 Velsoft Training Materials, Inc.
Microsoft Office Excel 2010 Advanced 5
Using Automatic Outlining
Excel’s automatic outlining feature makes outlining a worksheet fairly straightforward.
Automatic outlining works best with numerical data organized into groups and sub groups by
formulas or functions. The following worksheet, for example, contains monthly financial data
for a business, organized into quarterly and yearly totals using formulas and the SUM function:
It can be difficult to discern quarterly and yearly totals at a glance because these figures are lost
in with all of the other data.
To automatically outline this worksheet, click the arrow next to the Group button in the Outline
group of the Data tab:
© 2005-2011 Velsoft Training Materials, Inc.
Microsoft Office Excel 2010 Advanced 6
This action will display a menu with two options: Group and Auto Outline. If you click the Auto
Outline button, the spreadsheet will be outlined automatically:
Here are the results of Excel’s automatic outline:
All of the original data is shown, as well as outline group indicators (the thick black lines that
look like large brackets) and collapse buttons (marked with a minus sign). You can see that the
quarters (sets of three months) are grouped together and summarized by Quarterly totals, and
that each year has been grouped to be summarized by Yearly Totals. Notice also that the
columns Supplies, Wages, and Utilities have been grouped under Total Expenses, and that there
is an overarching group of all columns under Profit.
© 2005-2011 Velsoft Training Materials, Inc.
Microsoft Office Excel 2010 Advanced 7
In the image that follows, you can see the summary results of Excel’s automatic outline. The
original information is still available in all of its detail, but it is now presented in a summary
view, showing only the yearly profit totals. Of course, automatic outlines will differ from
worksheet to worksheet depending on your headings and data and the way they are organized.
We’ll look at how to expand and collapse levels in the next lesson.
To remove the outlining from your worksheet, click Data → Ungroup → Clear Outline:
Displaying and Collapsing Levels
Here is an outlined spreadsheet:
Notice that there are numbered buttons arranged in a row beside the column letters and also in
a column above the row numbers. Clicking on one of the numbered buttons arranged in a row
will expand the rows in the worksheet to provide a given level of detail. Clicking on one of the
numbered buttons arranged in a column will expand the columns in a similar way.
© 2005-2011 Velsoft Training Materials, Inc.
Microsoft Office Excel 2010 Advanced 8
The view of the data in the preceding image is provided by the buttons numbered 1. Clicking on
the number 2 buttons will expand the worksheet to the second level of detail for the rows,
columns, or both as required:
This is the same worksheet after both number 2 buttons have been clicked. You can see that
the worksheet rows and columns have been expanded to show another, secondary level of
detail. You can now see rows with quarterly totals as well as yearly totals. You can also see
columns with figures for Income and Total Expenses.
If you click on an expand button, marked with a plus sign (+), a specific section of the outlined
worksheet corresponding to the button will be shown. Clicking the collapse (-) button will
collapse the corresponding expanded section.
If you click the number “3” button for the rows and columns, all levels of detail will be
expanded to expose all of the data, as shown in the original picture at the beginning of this
lesson.
© 2005-2011 Velsoft Training Materials, Inc.
Microsoft Office Excel 2010 Advanced 9
Remember that with outlines, only the data that is visible on your screen will be printed. This is
a great way to print only the pertinent information from a large or complicated worksheet. You
can expand and collapse the outlined worksheet with the numbered outline buttons, or with
the expansion (+) and collapse (-) buttons, to reveal the level of detail that you want in your
printed copy.
Grouping Data Manually
Automatic outlining may not be adequate for worksheets with non-numerical values or with no
distinctive totals (from formulas or functions).
If automatic outlining does not, or cannot, organize your data in the way you want, you can
manually group your data. Take the following worksheet as an example:
© 2005-2011 Velsoft Training Materials, Inc.
Microsoft Office Excel 2010 Advanced 10
We would like to group the data according to teams and divisions, but if you use the Auto
Outline option under the Group button, Excel displays the following alert:
Because the data contains no formulas or functions providing numeric totals, Excel cannot
implement automatic outlining for the worksheet. You can, however, create your own
groupings by selecting the rows or columns that you want to group, and then clicking the Group
button.
For example, if you select the members of Team 1, the Sharks (cells B4:B6), and click Data →
Group, Excel 2010 will display the following box asking if you want to group by rows or
columns:
If you select the Rows radio button and click OK, Excel will provide an outline indicator and a
collapse/expand button for the new grouping.
© 2005-2011 Velsoft Training Materials, Inc.
Microsoft Office Excel 2010 Advanced 11
You should also notice numbered buttons in the top left corner. These outline level buttons
work the same as before. Clicking on the number 1 button will show the first level of detail, and
clicking on the 2 button will show the second (increased) level of detail.
If you follow the same procedure for cells B8:B10 (select the cells and then click the Group
button on the Data tab) and then for cells B2:B10, you will end up with a worksheet like this:
This image shows the fully detailed view. If you click the 2 button, you will see the following
view of the data:
You can see that the individual player information for the first two teams has been collapsed
from view.
© 2005-2011 Velsoft Training Materials, Inc.
Microsoft Office Excel 2010 Advanced 12
Clicking the number 1 button will display the highest level view (lowest detail) of the manual
groupings:
In the preceding image you can see that the entire first division grouping has been collapsed
from view.
To remove manual groupings, select the rows or columns corresponding to the grouping you
wish to remove and click the Ungroup button.
© 2005-2011 Velsoft Training Materials, Inc.
Microsoft Office Excel 2010 Advanced 13
When you see the Ungroup dialog box, select the appropriate radio button (rows or columns)
for what you are ungrouping, and click OK.
.
The selected rows or columns will be ungrouped.
Creating Subtotals
Another kind of outlining technique in Excel 2010 is the Subtotals feature. If you have numeric
data organized with clear column and row headings, you can use Excel to create automatic
subtotals and grand totals for the data.
The following worksheet contains sales information for different products across geographical
regions.
To use Excel’s subtotal feature, use your mouse to select the range of data you want to apply
subtotals to, and click Data → Subtotal:
© 2005-2011 Velsoft Training Materials, Inc.
Microsoft Office Excel 2010 Advanced 14
Before you click Subtotal, be sure to include the column labels when you make your selection,
so Excel will be able to discern what numbers to total. For this example you could select cells
A1:E10 and click the Subtotal button:
After clicking the Subtotal button, the Subtotals dialog box will appear:
© 2005-2011 Velsoft Training Materials, Inc.
Microsoft Office Excel 2010 Advanced 15
The drop list under the “At each change in:” heading gives you options as to the number of
rows that will be totaled. (For columns, totals will be applied every time the labels change.)
In this example, the region column is selected, so with every change in the Region labels (from
East to West, West to South, and so on) a subtotal will be applied.
The “Use function” drop list lets you choose from a list of functions including SUM, AVERAGE,
COUNT, PRODUCT, and STDEV to apply to your data. The function you choose (normally SUM)
will be used to calculate the subtotals:
In the “Add subtotal to” section, you can select check boxes for the columns you want totals
for. You can apply totals to a single column or to multiple columns as long as they are covered
by your selected range.
Finally, there are three check boxes at the bottom of the Subtotal dialog box that will allow you
to:
Replace any pre-existing subtotals
Put page breaks between totaled groups so they can be printed on separate pages
Place the subtotals and grand totals above or below the corresponding data
© 2005-2011 Velsoft Training Materials, Inc.
Microsoft Office Excel 2010 Advanced 16
If you choose to apply totals to each change in the Region column while applying the Sum
function to the Total Sales column, and choose no page breaks, the resulting worksheet will
look like this:
Notice that there is a subtotal for the Total Sales figures at every change in the Region value.
There is also a grand total for the Total Sales column at the bottom of the data. You can also
see that Excel has provided outlined levels, collapse/expand buttons, and numbered outline
level buttons associated with the subtotals. These buttons and outlines work exactly as
previously explained: the lower the number on the button you choose, the less detail will be
shown.
If you want to remove these subtotals, you can select the range of data in question (A1:E14)
and click Data → Subtotal to invoke the Subtotal dialog box. When you see the box, click the
Remove All button:
© 2005-2011 Velsoft Training Materials, Inc.
Microsoft Office Excel 2010 Advanced 17
Lesson 1.2: Exploring Scenarios
In business it can often be beneficial to explore multiple scenarios for a given situation. This
allows you to see what combination of factors gives the best results; in other words, test
various scenarios. With Excel 2010, you can easily explore multiple scenarios based on the same
data.
In this lesson you will learn what a scenario is and how to create one. You will also learn about
scenario summary reports and how to save multiple scenarios based on a given situation.
What is a Scenario?
In Excel, a scenario can be described as a set of cell values that is saved and substituted into
your worksheet at your convenience. If you have multiple scenarios saved, you can load
different scenarios into your worksheet and compare and contrast them to see which particular
set of values gives the best results. Since the worksheet will be fully calculated according to the
given set of scenario data being used, you can compare and contrast the results of one set of
data (scenario) with another by simply switching between different scenarios. Used in this way,
Excel scenarios provide a powerful tool for performing what-if analysis.
You might use scenarios to represent different budget options, or perhaps evaluate different
financial forecasts. You can use Scenarios to compare different data projections based on any
number of factors.
© 2005-2011 Velsoft Training Materials, Inc.
Microsoft Office Excel 2010 Advanced 18
This is how it works. The data that makes up your scenario is saved with your workbook, but it
remains hidden until you use the Scenario Manager to load the scenario data. All of the
scenarios you create are just versions of the same worksheet layout, with each different
scenario having different values for certain key cells.
Creating a Scenario
To create a scenario in Excel, begin with the worksheet that you want to add scenarios to. Then,
click Data → What-If Analysis → Scenario Manager:
© 2005-2011 Velsoft Training Materials, Inc.
Microsoft Office Excel 2010 Advanced 19
When you click on this option, the Scenario Manager dialog will appear:
To create a scenario, click the Add button in the upper right. This will display the Add Scenario
dialog box:
© 2005-2011 Velsoft Training Materials, Inc.
Microsoft Office Excel 2010 Advanced 20
To enter a scenario name, make sure that your cursor is in the “Scenario name” text box and
type a name that describes the scenario you are creating.
Next, decide which cells you want to change with this scenario, and then put your cursor in the
“Changing cells” textbox. Select the cells that will be changing with your mouse. (Remember
that you can use the Ctrl key for selecting non adjacent cells.)
If the Add Scenario dialog box gets in the way when you are selecting cells, you can drag it to
one side, or collapse it by clicking the small Collapse Dialog button:
In the following image, you can see the name for the scenario is Change Wages, and the
Changing Cells are G2 to G9 (the Wages column in the worksheet):
You can also describe the scenario in the “Comment” area of the dialog box if you wish. You will
also see two check boxes at the bottom of the dialog box: “Prevent changes,” and “Hide.” If you
check the “Prevent changes” box, changes to this scenario will not be permitted if the
corresponding worksheet is protected.
If you check the “Hide” box, the scenario will be hidden if the corresponding worksheet is
protected.
© 2005-2011 Velsoft Training Materials, Inc.
Microsoft Office Excel 2010 Advanced 21
Once you click OK, you will see the Scenario Values box.
Here you will see the references for the cells that you selected for your scenario. When you use
this scenario in the future, the values you enter here will be loaded into the corresponding
worksheet. (Remember, you can move between textboxes in a dialog box by pressing the Tab
key.)
Notice that they are populated with the current worksheet data by default. If you want to save
the current (actual) data as a scenario, you could just click OK at this point. Otherwise, you
should enter the appropriate new value that you want for this scenario in each box.
© 2005-2011 Velsoft Training Materials, Inc.
Microsoft Office Excel 2010 Advanced 22
Click OK to create the scenario. You will then see the Scenario Manager Box with your newly
created scenario available in the “Scenarios” area.
In this dialog box, you can see the changing cells in the “Changing cells” area, and any
comments in the “Comment” area. If there is an assortment of scenarios in the scenario
manager, just click the one that you want and click Show to see the results of the given scenario
in the worksheet.
Saving Multiple Scenarios
To save multiple scenarios for a worksheet, click Data tab → What–if Analysis → Scenario
Manager to display the Scenario Manager dialog. Then, use the Add button in the Scenario
Manager to create as many scenarios as you require (following the process as described
previously). All of the scenarios you create for a given worksheet will be available in the
scenarios list in the Scenario Manager dialog.
© 2005-2011 Velsoft Training Materials, Inc.
Microsoft Office Excel 2010 Advanced 23
In the following image, you can see four scenarios in the scenario list. These scenarios will be
saved with this workbook when the workbook itself is saved. When you open the workbook,
you can see the available scenarios by displaying the Scenario Manager.
To load a scenario into the worksheet, click to select it from the Scenarios list and click the
Show button at the bottom of the dialog. To remove a scenario, click to select it in the list and
then click Delete. Finally, to make changes to a scenario, select it, and then click Edit.
© 2005-2011 Velsoft Training Materials, Inc.
Microsoft Office Excel 2010 Advanced 24
The Edit command will invoke the Edit Scenario dialog:
This dialog allows you to change the name, changing cells, cell values, and comments
associated with the selected scenario. (This is essentially that same dialog that is used in the
process of creating a scenario.)
If you wish, you can have a different set of scenarios for each worksheet in your workbook. It is
important to note that when you display the Scenario Manager, only scenarios for the currently
active worksheet will be shown in the Scenarios list.
Merging Scenarios
There are times when it could be useful to bring together scenarios from different worksheets.
For example, you could create a worksheet and then distribute copies to several co-workers.
Each person could create their own scenario (their own opinion of how the values will change)
and then send the worksheets back to you. If you merged all of the scenarios from the different
worksheets into one worksheet, you could compare all of the scenarios with a simple click of
your mouse.
To merge scenarios from different worksheets, first open up each Excel workbook that contains
a different scenario. It is important to note that merging scenarios works best if each worksheet
has the same design and data layout, and if the changing cells in each scenario are in the same
range.
© 2005-2011 Velsoft Training Materials, Inc.
Microsoft Office Excel 2010 Advanced 25
Here is an example.
The preceding worksheet contains two scenarios: “Lower Wages” and “Actual Values.” For both
of these scenarios, the changing cells are the cells with data in the “Wages” column.
The following image shows a similar worksheet from a different workbook. This worksheet has
only one scenario, called “Increase wages.” The important thing to note is that the changing
cells for the “Increase wages” scenario are the same as the changing cells for the two scenarios
in the first worksheet.
To merge the scenarios from the two different worksheets, you should first open both of the
respective workbooks at the same time. Next, you should decide which worksheet will be the
destination for the merged scenarios and which worksheet will be the source. For this example,
we will use the worksheet with the “Increase wages” scenario (preceding image) as the
destination for the merge.
© 2005-2011 Velsoft Training Materials, Inc.
Microsoft Office Excel 2010 Advanced 26
Now, make the destination worksheet the active worksheet and then display the Scenario
Manager dialog by clicking Data → What-If Analysis → Scenario Manager. When the dialog
appears, click the Merge button:
A Merge Scenarios dialog will appear:
© 2005-2011 Velsoft Training Materials, Inc.
Microsoft Office Excel 2010 Advanced 27
If you expand the drop list in the Merge Scenarios dialog you will see a list of the currently open
workbooks. Select the workbook that contains the other scenarios and then select the
worksheet in that workbook that contains the specific scenario that you want to merge:
Once you choose the appropriate worksheet, click OK.
At this point, the Scenario Manager dialog for the active worksheet will appear. It will now
contain the scenario(s) from the source worksheet that you chose in the Merge Scenarios
dialog.
Now that the scenarios are merged into one worksheet, you can compare them easily. (You can
repeat this process to merge additional scenarios from other open workbooks if you wish.)
© 2005-2011 Velsoft Training Materials, Inc.
Microsoft Office Excel 2010 Advanced 28
Creating a Scenario Summary Report
A Scenario Summary report can be used to display and compare the scenarios stored with your
worksheet. To create a summary report, open the worksheet containing the scenarios and click
the Data tab. Next, click What–If Analysis → Scenario Manager:
When the Scenario Manager dialog appears, click the Summary button:
This will display the Scenario Summary box. Here you can choose to create a PivotTable (based
on the scenario data) or a scenario summary by selecting the appropriate radio button. (You
will learn more about PivotTables later in this manual.)
© 2005-2011 Velsoft Training Materials, Inc.
Microsoft Office Excel 2010 Advanced 29
In this example, the Scenario Summary radio button is selected. The next step is to select the
result cells that you want to be shown in the summary report. You can do this by selecting cells
with your mouse on the worksheet, just as before. Finally, click OK to create the summary:
The scenario summary will appear on its own sheet. As you can see, it shows the changing cells
and the results cells for the scenarios that are stored with your worksheet. The changing cells
that have values different from the current values will be highlighted in grey. Notice the row of
scenario names across the top of the columns to identify which scenario a given column of
values belongs to. (The scenarios in the report shown above are: Current values, Lower Wages,
and Actual Values.)
© 2005-2011 Velsoft Training Materials, Inc.
Microsoft Office Excel 2010 Advanced 30
Lesson 1.3: Using Data Analysis Tools
Excel 2010 provides a rich assortment of analysis tools that you can use to explore and interpret
your data. While there are plenty of built-in tools in Excel, there are also additional software
files than can be added to Excel to extend its functionality even more. These additional
software tools are known as add-ins.
Add-ins can come in the form of a single task-oriented tool like Solver (which we will look at
later in this lesson), or they can consist of several tools combined in a pack, like Excel’s Analysis
ToolPak, which provides an assortment of tools for analyzing scientific, statistical, or
engineering related data. Some add-ins come packaged with the Microsoft Office system, while
others may be provided by third party vendors.
In this lesson, we’ll have a look at a few of the what-if analysis tools that are built into Excel
2010, like goal seek and one and two input data tables. We’ll also look at add-ins and how to
enable them. We’ll also take a close look at the Solver data analysis add-in.
Enabling Data Analysis Tools
As mentioned above, there are some interesting data analysis tools provided as add-ins for
Excel, such as the Analysis ToolPak and the Solver. In a general sense, add-ins can be described
as small software modules or files that extend the functionality of the larger Office applications.
The important thing to know is that these are not enabled in the Excel program when it is
installed, as they often provide more obscure or mathematically advanced functionality than is
required in a typical business environment. You must enable them manually from within Excel.
© 2005-2011 Velsoft Training Materials, Inc.
Microsoft Office Excel 2010 Advanced 31
The first step in enabling add-Ins is to navigate to the add-in management section of the Excel
Options window. To start, click File → Options:
When the Excel Options window opens, you will see a panel on the left side with a series of
categories. Click Add-Ins:
© 2005-2011 Velsoft Training Materials, Inc.
Microsoft Office Excel 2010 Advanced 32
When you choose this option, the Excel Options window should look something like this:
In the main viewing area, you will see a large scrollable list called Add-ins. This list is broken
down into the following sections: Active Application Add-ins, Inactive Application Add-ins,
Document Related Add-ins, and Disabled Application Add-ins. At the top of this list are the
headings Name, Location, and Type. The corresponding name, location path, and add-in type,
for each add-in are grouped in the list according to these headings.
© 2005-2011 Velsoft Training Materials, Inc.
Microsoft Office Excel 2010 Advanced 33
If you click on any add-in in this list you will see the name of the add-in, the publisher, the
location (file directory), and a brief description of the add-in in the area beneath the list. Here’s
an example:
If you click the Manage menu near the bottom of the window, you will see the following
options:
Here you can see two types of add-ins at the top of the list: COM Add-ins and Excel Add-ins.
COM stands for component object model, a Microsoft technology that helps software
components (like Microsoft Office programs) to communicate. For example, a form of COM
technology is used to allow Word documents to link to data in Excel spreadsheets. Often a
single COM add-in will be available for a number of Office applications.
For the purposes of this lesson, we are interested in the add-ins specifically for Excel. To
manage the Excel add-ins, select it in the list, and click Go.
© 2005-2011 Velsoft Training Materials, Inc.
Microsoft Office Excel 2010 Advanced 34
When you click Go, an Add-Ins dialog will appear and show a list of the available Excel add-ins:
If an add-in is enabled, it will have a checkmark next to its name in the list. In the image above,
no Excel add-ins are enabled yet. If you want to see a brief description of an add-in, click it in
the list. In the example above, the Solver add-in is selected and a description of the Solver
appears near the bottom of the dialog.
To enable a particular add-in, click to place a checkmark in the appropriate checkbox and click
OK. To enable the Solver add-in, for example, simply place a checkmark next to it the Add-Ins
dialog and then click OK.
If you see a dialog stating that the add-in you are enabling is not currently installed on your
computer, simply click the Yes button in the dialog to install it.
© 2005-2011 Velsoft Training Materials, Inc.
Microsoft Office Excel 2010 Advanced 35
To make sure the Solver add-in is enabled, click the Data tab, and then look for Solver.
Similarly, if you check the box corresponding to the Analysis ToolPak, and then click OK, it will
be enabled in Excel as well.
In the following image, you can see that the Analysis option is now available on the Data tab.
An Overview of Excel’s Analysis Tools
As mentioned near the beginning of this lesson, the Analysis ToolPak add-in provides an
assortment of tools for analyzing scientific, statistical, or engineering related data. Many of
these features are for scientific or statistical data analysis, so a comprehensive exploration of
the use of these tools is beyond the scope of this manual. That being said, here is a quick and
gentle overview of some of the Analysis ToolPak features.
© 2005-2011 Velsoft Training Materials, Inc.
Microsoft Office Excel 2010 Advanced 36
To enable the Analysis ToolPak, make sure there is a check mark in the appropriate checkbox in
the Add-Ins dialog:
If the Analysis ToolPak is enabled, there will now be a corresponding option (Data Analysis
button) for it on the Data tab:
If you click the Data Analysis button on the Data tab, a dialog with a scrollable list of tools will
appear.
© 2005-2011 Velsoft Training Materials, Inc.
Microsoft Office Excel 2010 Advanced 37
The tools available in the list are intended for quite specific and advanced data analysis
techniques. To start one of the tools, simply click it in the list to select it and then click OK.
The first tool listed is called “Anova: Single factor.” (Anova is short for analysis of variance.)
This tool can be used to examine if the means (averages) of samples (groups of experimental
data from a population) are different in a significant way. Tests like these are often used to
examine the significance of the results in scientific studies.
Generally in a study, an independent variable will be changed by the experimenters to see if it
has a result on the dependent variable. This is often done by comparing the results for different
groups of data (samples), resulting from tests at different levels of the independent variable.
For basic experiments with only two samples, you could use a basic test like a T test (also
included in the Analysis ToolPak) to compare the averages of the samples. For more complex
experiment (with more than two samples), an Anova test could be used.
A single factor Anova can be used to compare multiple samples, based on a single
independent variable.
A two factor Anova test can be used to compare multiple samples, based on two
independent variables
The next item in the list of analysis tools is a Correlation test.
© 2005-2011 Velsoft Training Materials, Inc.
Microsoft Office Excel 2010 Advanced 38
It is often useful to know if two variables are related in some way, and a correlation test can
help to determine this. Think of the word correlation as “co-relation.” If there is a strong
correlation between two sets of data, it generally means that they trend or change in concert
with each other. If there is a significant correlation in your data, you may be able to make
predictions based on this relationship.
For example, if you sell sunglasses, you may be curious as to the relationship between the
weather (amount of sun or temperature) and the sales of your product. Here is an example
worksheet.
To invoke the Data Analysis dialog, click Data → Data Analysis. When the dialog appears, select
the Correlation option and click OK.
When you click OK, a Correlation dialog will appear on your Excel screen. In this dialog, you can
select the range of data to be analyzed, whether it is grouped in rows or columns, whether to
include the first row as labels, and where to place the results (in a range or in a new
worksheet).
© 2005-2011 Velsoft Training Materials, Inc.
Microsoft Office Excel 2010 Advanced 39
In the following example, the range of data to be analyzed is B1 to C14, with the data grouped
in columns and column labels included. Furthermore, the results will be displayed on a new
worksheet.
Once you are ready, just click OK to generate the analysis results. The following image shows
the results as displayed in a new worksheet.
The important value to take note of is in cell B3. This is the correlation value. This value will be
between -1 and +1. If the value is +1 it means that there is a perfect correlation. In other words,
the two sets of data rise in perfect concert. If the correlation value is a -1, it means that just as
one set of data rises, the other set of data shrinks. A value of 0 would indicate no relationship
whatsoever. As you can see in this example, a value of .915834314 (almost 1) indicates a very
strong positive relationship between the hours of sunlight per day and the sales of pairs of
sunglasses per day.
© 2005-2011 Velsoft Training Materials, Inc.
Microsoft Office Excel 2010 Advanced 40
Another interesting tool in the Analysis ToolPak is the Random Number Generator.
You can use random number generation to simulate data or random behavior. For example, if
you wanted to simulate a series of coin tosses for a statistical experiment, you would select
Random Number Generation from the list in the Analysis Tools dialog and click OK. This will
display the Random Number Generation dialog.
To simulate a coin toss, enter the number of variables (1 for one coin) and then enter the
number of random numbers (the amount of flips of the coin) in the appropriate fields. You
must also choose the correct distribution (which is the Bernoulli distribution for the case of
flipping a coin) from the drop list provided. You must also enter a p value (a value between 0
and 1), which represents the probability of getting a heads or a tails. Since we want to simulate
a fair coin we will choose .5 (50/50 chance) for the p value. For the purposes of this example, it
is not necessary to enter anything in the Random Seed box. Finally, you can choose to put the
results in an output range, a new worksheet in the current workbook, or in a new workbook.
For this example, the range of A1 to A10 is specified as the cells to contain the results. When
everything is ready, click OK in the top right to generate the coin tosses.
© 2005-2011 Velsoft Training Materials, Inc.
Microsoft Office Excel 2010 Advanced 41
The following image shows the results of the coin toss in cells A1 through to A10. Think of a 1 as
a head and a 0 as a tail:
Probably the most basic tool in the Analysis ToolPak is the Rank and Percentile feature.
© 2005-2011 Velsoft Training Materials, Inc.
Microsoft Office Excel 2010 Advanced 42
You can use this feature to create a percentile rank of your chosen data values. For example,
here is a batch of random data that could represent scores on a hypothetical test.
To rank these scores we would select “Rank and Percentile” from the list in the Data Analysis
dialog and click OK. This action will display the Rank and Percentile dialog:
In the dialog, simply specify the input range of the data and then specify if it is organized in
groups or columns. As before, you can also specify the destination for the results. In this
© 2005-2011 Velsoft Training Materials, Inc.
Microsoft Office Excel 2010 Advanced 43
example, the New Worksheet radio button is selected for the destination. When you are ready,
just click OK to proceed.
In the results, you can see separate columns labeled Point, Column1, Rank, and Percent. The
Point column provides values for the position of the given test score in the original data
column. Column1 lists the ranked test scores, the Rank column shows the rank of the
corresponding test score, and Percent column shows the percentage of scores that are below
that score.
As a final note on the tools in the Analysis ToolPak, let’s discuss how to get a bit of help with a
given tool if you need it.
© 2005-2011 Velsoft Training Materials, Inc.
Microsoft Office Excel 2010 Advanced 44
If you see a tool in the Data Analysis dialog that you would like to know more about, click the
Help button on the right side of the dialog:
Then an Excel help window will open with a list of items corresponding to the tools in the Data
Analysis dialog. To get help or information on an item in this list, click on the name of the item
and it will expand to show a brief description of the given item and what it is used for:
© 2005-2011 Velsoft Training Materials, Inc.
Microsoft Office Excel 2010 Advanced 45
By default, Excel will try to connect to the Internet to gather available information from
Office.com. If you do not have an Internet connection, help will retrieve information that is
stored locally on your computer.
An Overview of the Available Add-In Tools
As mentioned earlier, the available Excel 2010 add-ins are:
Analysis ToolPak
Analysis ToolPak – VBA
Euro Currency
Solver Add-in
Now that we have looked at some of the tools in the Analysis ToolPak, it is time to turn our
attention to the remaining Excel add-ins.
The Analysis ToolPak – VBA add-in can be enabled just like any other Excel add-in, but you will
not see an option for it in any of the tabs.
The Analysis ToolPak-VBA add-in should not be confused with the Analysis ToolPak that we just
looked at. VBA stands for Visual Basic for Applications. It is a programming tool for building
functions and automating tasks in Microsoft Office applications. The ToolPak-VBA add-in
provides the user with the ability to call (use) the functions in the Analysis ToolPak from within
VBA programs (like macros). This is not the same as using the ToolPak functions manually from
within your worksheet, which is why the ToolPak-VBA add-in doesn’t appear as on the Data tab.
It is primarily for behind-the-scenes work by providing VBA programmers with more
functionality. If you only intend on using the ToolPak features manually as shown in the
previous pages, there is no need to install the ToolPak VBA add-in.
Next is the Euro Currency Tools add-in.
© 2005-2011 Velsoft Training Materials, Inc.