excel 2007 module ii - sfu.ca - simon fraser universitywainwrig/mpp/pivot_table/pivot-tables... ·...

292
Excel 2007 Module II Chris Clark & Robert Santarossa British Columbia Institute of Technology September 2008

Upload: phungnhu

Post on 26-Mar-2018

227 views

Category:

Documents


6 download

TRANSCRIPT

Page 1: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

Excel 2007

Module

II

Chris Clark & Robert Santarossa British Columbia Institute of Technology Se

pte

mb

er

20

08

Page 2: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

Module II - What-If? Models and Data Analysis: Acknowledgements Page 2

1 Table of Contents

2 Acknowledgements ......................................................................................................................................................... 6

3 Introduction .................................................................................................................................................................... 7

4 What-If? Models ............................................................................................................................................................. 9

4.1 Understand the Problem ........................................................................................................................................ 9

4.2 The “What-If?” Mindset ........................................................................................................................................ 10

4.2.1 Illustrating Different Mindsets: Calculating vs. Modeling ............................................................................. 10

4.2.2 Extending the Different Mindsets to: Names and Goal Seek ....................................................................... 11

4.3 Single Worksheet Models ..................................................................................................................................... 13

4.4 Linking Inputs to Outputs ...................................................................................................................................... 14

4.5 Break-Even Analysis Model ................................................................................................................................... 14

4.5.1 Relationship of Cost to Volume .................................................................................................................... 14

4.5.2 Input the Model into Excel ............................................................................................................................ 21

4.5.3 Examine & Test the Model ............................................................................................................................ 22

4.5.4 Test using simple numerical input (fine for simple models): ........................................................................ 22

4.5.5 Goal Seek to Test the Model ......................................................................................................................... 23

4.5.6 Cell Comments as Basic Documentation ...................................................................................................... 24

4.5.7 Modifying the Model .................................................................................................................................... 25

4.5.8 Making models presentable .......................................................................................................................... 27

4.5.9 Names in Models .......................................................................................................................................... 28

4.5.10 Format & Display ........................................................................................................................................... 35

4.5.11 Fine Tuning the Precision of Calculation and adding “Dynamic Labels” ....................................................... 37

4.5.12 Scenarios for Comparison ............................................................................................................................. 42

4.5.13 Documentation and Input Validation ........................................................................................................... 54

4.5.14 Worksheet Protection ................................................................................................................................... 63

4.5.15 Beyond the Basics ......................................................................................................................................... 65

4.5.16 More on Names in models ............................................................................................................................ 69

4.5.17 (Optional) Comments on Excel Error Messages ............................................................................................ 78

5 Exploring various models .............................................................................................................................................. 80

5.1 Multi-Worksheet Model: Grouping & 3-D Cell References .................................................................................. 80

5.1.1 Group or Copy to Create Multiple Sheets ..................................................................................................... 82

5.1.2 Group sheets and input formulas simultaneously ........................................................................................ 82

Page 3: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

Module II - What-If? Models and Data Analysis: Acknowledgements Page 3

5.1.3 Create the Totals worksheet formulas using 3-D cell references. ................................................................ 85

5.2 Financial Function Models .................................................................................................................................... 87

5.2.1 Canadian Mortgage Calculator ..................................................................................................................... 87

5.2.2 Capital Budgeting, WACC, ATNCF & CCA ...................................................................................................... 91

5.2.3 The Rule of 72 ............................................................................................................................................. 101

5.3 Logical, Lookup & Reference Function Models ................................................................................................... 102

5.3.1 Comments on Logical Functions and Comparison operators ..................................................................... 102

5.3.2 Comments on Lookup and Reference Functions ........................................................................................ 106

5.3.3 Practice Problems IF, VLOOKUP and Logical Functions .............................................................................. 108

5.3.4 More Practice Problems IF, VLOOKUP and Logical Functions..................................................................... 111

5.4 Date & Time Models ........................................................................................................................................... 112

5.4.1 Dates and Times as Serial Values ................................................................................................................ 112

5.4.2 Doing math on text string dates “1-Jan-08” ............................................................................................... 115

5.4.3 Canadian and American Date input. ........................................................................................................... 115

5.4.4 Date and Time Functions ............................................................................................................................ 118

5.4.5 Beyond the Basics ....................................................................................................................................... 119

6 Data Lists (Tables) ....................................................................................................................................................... 124

6.1 Concepts .............................................................................................................................................................. 126

6.2 Table Layout ........................................................................................................................................................ 127

6.3 Table Basics ......................................................................................................................................................... 128

6.3.1 Inserting and naming a table ...................................................................................................................... 128

6.3.2 Simple Filtering ........................................................................................................................................... 131

6.3.3 Simple Sorting ............................................................................................................................................. 132

6.3.4 Add a Column .............................................................................................................................................. 132

6.3.5 Add a Calculated Column ............................................................................................................................ 133

6.3.6 Add a Total Row .......................................................................................................................................... 135

6.3.7 Adding a new records (new rows) .............................................................................................................. 136

6.3.8 Worksheet Column Headings on Scroll ....................................................................................................... 137

6.3.9 Convert Table to a Normal Data Range ...................................................................................................... 138

6.4 Introduction to Conditional Formatting .............................................................................................................. 139

6.4.1 Find Blank Cells ........................................................................................................................................... 139

6.4.2 Top/Bottom Rules ....................................................................................................................................... 140

6.4.3 Icon and Color Sets...................................................................................................................................... 140

Page 4: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

Module II - What-If? Models and Data Analysis: Acknowledgements Page 4

6.5 Sorting & Filtering and Outline: Subtotal ............................................................................................................ 142

6.5.1 Multiple Sort ............................................................................................................................................... 143

6.5.2 Number Filters ............................................................................................................................................ 145

6.5.3 Text Filters ................................................................................................................................................... 148

6.5.4 Date Filters .................................................................................................................................................. 152

6.5.5 Outline: Subtotal ......................................................................................................................................... 155

7 Functions and Descriptive Statistics as alternatives to Tables ................................................................................... 159

7.1.1 SUBTOTAL to create a richer analysis. ........................................................................................................ 159

7.1.2 SUMIF and SUMIFS ...................................................................................................................................... 164

7.1.3 AVERAGE and AVERAGEIFS ......................................................................................................................... 166

7.1.4 COUNTIF and COUNTIFS ............................................................................................................................. 168

7.1.5 MIN, MAX and MODE .................................................................................................................................. 169

7.1.6 Beyond the Basics on IF and IFS .................................................................................................................. 171

7.1.7 Descriptive Statistics using Data Analysis ................................................................................................... 174

7.1.8 Preparing the Data ...................................................................................................................................... 175

7.1.9 Convert the Data ......................................................................................................................................... 179

7.1.10 Generate Descriptive Statistics ................................................................................................................... 180

7.2 Beyond the Basics: Pareto Charts. ...................................................................................................................... 182

7.2.1 COUNTIF (and other formulas) to create Pareto output ............................................................................ 183

7.2.2 Data Analysis | Histogram to create the Pareto output ............................................................................. 188

8 PivotTables & PivotCharts ........................................................................................................................................... 191

8.1 Creating tables .................................................................................................................................................... 194

8.1.2 Review and extensions of the basics. ......................................................................................................... 201

8.1.3 Summary Functions, Calculated fields, and Subtotals ................................................................................ 212

8.2 PivotCharts .......................................................................................................................................................... 226

8.2.1 Creating PivotCharts ................................................................................................................................... 226

8.3 Beyond the Basics Various other Tools and Features ......................................................................................... 239

8.3.2 More Beyond the Basics: Practice Exercises ............................................................................................... 250

9 Term Project: Receipts & Disbursements Cash Flow Statement ................................................................................ 255

9.1 Overview – the importance of cash .................................................................................................................... 255

9.1.1 Alpha Products Model ................................................................................................................................. 260

9.1.2 Beta Products Model ................................................................................................................................... 265

10 Term Project: Income, Balance Sheet and Cash Flow Statements ......................................................................... 269

Page 5: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

Module II - What-If? Models and Data Analysis: Acknowledgements Page 5

10.1 Overview – Statement of Changes In Financial Position .................................................................................... 269

10.1.1 Omega and Pi Catering Models Background .............................................................................................. 270

10.1.2 Relating the Statements and Subsidiary Calculations ................................................................................. 276

10.1.3 Performance Measurement Formulae ....................................................................................................... 277

10.1.4 Outputs (Results) Conditional Formatting, Comments and Notes ............................................................. 277

10.1.5 Scenarios ..................................................................................................................................................... 279

10.1.6 Data Validation and Worksheet Protection ................................................................................................ 279

10.1.7 Watch Window & Scenario Drop-Down List ............................................................................................... 279

11 Advanced ................................................................................................................................................................. 280

11.1 Arrays & Project Scheduling ................................................................................................................................ 280

11.2 Solver & Master Production Scheduling ............................................................................................................. 282

11.3 Monte Carlo Simulation & the Three Time Estimate Method ............................................................................ 283

11.4 Business Analytics (OLAP) ................................................................................................................................... 286

11.5 Data Tables vs. Mixed References ...................................................................................................................... 291

Page 6: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

Module II – What-If? Models and Data Analysis: Acknowledgements Page 6

2 Acknowledgements

The objective of Modules I & II is to give business students a method for using Excel in their studies and in their careers.

The material is generic, examples and questions are drawn from various business courses, other Excel books, Excel Help,

from problems students encounter while working on Industry Projects, and from our own ongoing advice and trouble

shooting other people’s workbooks. As such the material is always a work in progress, a draft as it were, rather than a

finished textbook.

The Modules also benefited from faculty review by Jim Hughes (FMGT), Masoud Jalili (ITMG), Ed Bosman (ITMG), Fred

Mandl (HRMG), Kim Milnes (MKTG), Steve Reid (OPMT), Darren Turnbull (OPMT), Eddie Fung (BUSA), Matt Baxter

(BUSA) and Cyri Jones (OPMT).

In addition the Excel 2003 version received a cover to cover review by three graduating BCIT ITMG students (Oscar Lee,

Denise Potten, and Thomas Szafran).

Each and everyone gave us good advice on what worked, what didn’t and what’s missing. Unfortunately nobody can

catch all our mistakes. So as you work through the material please feel free to give us your thoughts – what worked,

what didn’t and what’s missing.

Both of us started using worksheet programs in the late 70’s (VisiCalc in Chris’s case – being an Economist he is always

interested in tinkering with numbers and models) and the early 80’s (Lotus 1-2-3 in Bob’s case – being an Engineer

turned business person he was interested in automating business calculations), so we will try to pass on to you much of

our collective 50 years worth of “spreadsheet” experience. Hopefully you will never know how much “learning by doing”

we went through to end up with this method for worksheets.

The idea is to teach you how to work smart in Excel so that on Friday afternoon, while everyone else is in the office in

panic mode to get their work done, you will be on the golf course or relaxing with a drink since you learned how to use

Excel quickly and efficiently.

Chris Clark (Original Author Excel 2003 and previous versions, BCIT Retired)

and

Bob Santarossa (Author, Excel 2003 Excel 2007 update, BCIT)

Page 7: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

Module II – What-If? Models and Data Analysis: Introduction Page 7

3 Introduction

Excel has a wide range of uses but most of the time you will use it for one of the following 3 tasks:

1. Modeling (Module I and II) and What-If? Analyses (Module II).

2. Data List (Table) Organization, Analysis and Manipulation (Module II).

3. Charting (Module I).

Module II concentrates on “What-If?” models and data lists. Module II assumes you have successfully completed

Module I. Required Module I skills will be referenced in this module so that the student may review them when

required.

Figure 3-1 and Figure 3-2 provide an overview of the skills that will be demonstrated in Module II:

Figure 3-1: What-If? Model skills.

Note that the skills are organized around What-If? modeling tasks, not the other way around, as is the case in some

textbooks that teach the use of Excel.

All useful and commonly used skills to make a What-If? model work first will be demonstrated so that a student is not

left wondering: which skill applies to which task?

And yes, after we make the What-If? model tasks work, we will make it pretty.

Paper & Pencil Design

Layout: Single/Multi-Sheet

Input/Process/Output

Comments

Names

Scenarios

Data Validation

Conditional Formatting

Concatenate

Worksheet Protection

Templates

Errors: #NAME etc.

Goal Seek

Functions:

Nested IF

VLOOKUP

NPV, IRR, MIRR

Page 8: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

Module II – What-If? Models and Data Analysis: Introduction Page 8

Figure 3-2: Data List (Table) skills.

Again, note that in Figure 3-2 the skills are organized around Data List (Table) Organization, Analysis and Manipulation

tasks. As stated above, for What-If? models, we will make Data List tasks work first, not leave you wondering: which skill

applies to which task? and when done, we will make our work look pretty.

Ensuing sections discuss What-If? Models, Data Lists (Tables) and PivotTables/PivotCharts.

An Advanced section follows demonstrating some of the many other powerful features of Excel.

Records, Fields

Flat File dB = Data List

Custom Formats

Date Serial #'s

US vs. Canada formats

Sorting

Filters

Subtotal

Data Types

Text Values

Descriptive Statistics

PivotTables

PivotCharts

Functions:

SUMIF, COUNTIF etc.

TODAY, NOW, YEAR, MONTH, DAY, HOUR etc.

NETWORKDAYS, WEEKDAY

Page 9: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

9

4 What-If? Models

Model building skills can become very sophisticated but for most worksheet users there are three key ingredients that

constitute the recipe for constructing serviceable “What-If?” models. The ingredients are:

Understanding the (business) problem from as many angles as possible.

Adopting a “What-If?” mindset when using Excel.

A standard method for building models.

This Module presents a brief overview of these ingredients illustrating the recipe by developing a break-even model

similar to those seen in a variety of courses ranging from Math through Economics to Marketing and Management.

4.1 Understand the Problem Excel allows users with a wide variety of backgrounds to develop useful models to assist with decision making – Figure

4-1 provides an illustration. By providing a wide range of “Financial”, “Statistical” and “Engineering” functions Excel can

be used by a variety of professionals to generate worksheets.

Figure 4-1: Insert Function categories.

The figure above shows that it’s likely that Excel has the tools to deal with a business problem.

Page 10: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

10 However, Excel does not give “canned solutions” to all problems so those working on a model would be wise to adopt

the following strategy when thinking about translating a problem onto Excel:

Assume the problem is common. The importance of this cannot be overstated – begin your thinking by looking

for past solutions or guides to similar problems. For example these notes assume students can find guidance on

problems from material learned in other first year business courses (i.e., text books).

Map out the problem with pencil and paper. Many students jump to the computer immediately and end up

staring at a blank screen. They have no sense of direction. Playing around on paper helps develop a feel for what

needs to be accomplished. Constructive doodling can be combined with some basic techniques (outlined below)

that allow you to begin to envision the model before sitting down to the computer. The rows and columns

become a skeleton upon which you flesh out your model.

Finally, since the problem is assumed to be “common” Excel probably has built in features (beyond Insert

Function) to deal with the problem at hand (otherwise why would people buy the package?). Typically features

for one model can be used as well in other models. Furthermore assume that there are published Excel models

(“templates”) for most problems. At this point one might ask: “why don’t I just look up the template for my

common problem and be done with it?”. Good question but unless you have a sense of how a model is put

together it will be difficult to understand how to use the template or, more likely, how to modify a template to

fit your particular needs. Building a few models will increase your understanding and confidence to help you

assess other models. Fear of the computer leads many to accept inadequate work by others as Gospel.

4.2 The “What-If?” Mindset A “What-If?” mindset asks you to focus on the “structure” of the model in the belief that users want to ask the following

types of questions:

“What-If?” this value changes?

“What-If?” we get some new information to add to the model?”

“What-If?” we try a different strategy?”

Since many people come to Excel already owning a calculator they try to use Excel the same way as the calculator. In

fact, many do calculations on the calculator, then input the results onto a worksheet – a dangerous practice.

4.2.1 Calculating vs. Modeling – different mindsets

Suppose that you are told the price of an item is $11.43 and that 123 units might be sold. It’s natural to think, “What’s

the revenue?”

The calculator approach in Figure 4-2 focuses on generating the current answer $1,405.89.

Figure 4-2: Calculating with Excel.

Page 11: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

11 A modeler begins with the general rule that “Revenue = Price * Quantity” and develops the following:

Figure 4-3: Modeling with Excel.

The difference is far from trivial:

The original microcomputer spreadsheet was named VisiCalc short for “visible calculator”. The above

“Calculating with Excel” figure is “not as visible” as the above “Modeling with Excel” figure. Right away one sees

the advantage of the modeling approach. A pocket calculator mindset (simulated by Excel) does not keep all the

inputs in view. Did you input the correct price?

The calculator mindset can lead to sloppy formulas as well. Consider the figure below. What happens if the price

changes to $12.15? At best it’s a clumsy fix requiring input into two cells. At worst it’s a disaster waiting to

happen. What happens if the user inputs $12.15 into cell B3 assuming the computer will recalculate the

revenue? Nothing – because the price of 11.43 has been “hard coded” into B6 (i.e. there is no reference to B3

which contains the 12.15).

Figure 4-4: A hybrid approach.

Never hard code a formula with a manual input – a deadly sin and a disaster waiting to happen! Always point to the cell

reference and input this into the formula.

4.2.2 Extending the difference - Names and Goal Seek

The calculator approach cripples Excel. With a calculator mentality it is difficult if not impossible to exploit Excel’s ability

to answer a variety of “What-If?” questions. The two figures below demonstrate how Names and Goal Seek make it easy

to interpret the model and play a very useful form of “What-If?”.

Question 4-1: What price is necessary to generate target revenue of $2,500?

Answer

A couple of keystrokes to assign names (the keystrokes will be demonstrated in a later section of this Module) to the

model so that the revenue formula now reads in Figure 4-5:

Page 12: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

12 Figure 4-5: Names in Excel.

Then Goal Seek to answer the question in Figure 4-6:

Figure 4-6: Goal Seek in Excel.

Had we used the calculator approach, Goal Seek would not have worked – we would not have been able to exploit this

useful feature. Also, the formula: =Price*Quantity is much easier to understand than: =B2*B3. Use cell names

whenever possible. Formulas with names are more “user friendly” and save “wear and tear” on your eyes: you are not

constantly flipping back and forth from cell references to the formula.

•“Think equation not calculation” with a worksheet even though Excel is a powerful calculator.

•Never hard code values into a formula - this is a disaster waiting to happen and a deadly sin.

•Use cell names whenever possible - this results in more user friendly formulas to read and saves wear and tear on your eyes.

Critical Idea

Page 13: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

13

4.3 Single Worksheet Models Review Module I, Section 3.1: Input Process Output about model layouts.

The diamond down layout generalizes easily. Larger models may require multiple input and output sections on a single

worksheet linked via a diamond down layout. Data flows from upper left to lower right as shown in Figure 4-7.

Figure 4-7: Single worksheet multi-section model.

The diamond down stresses that the model should be built so that:

Each section contains similar (related) material.

Material from earlier sections flows down to be used in later sections. Following the logic of

Input/Process/Output, the Sections in the upper left contain Input (and Documentation), then come Process

sections, which use information from earlier sections to perform various calculations. In some models, the

Output is displayed on the screen as indicated; but in other situations, sections are not used in Output reports or

display.

Section 1

• Break-even inputs

• Capital Budgeting inputs

Section 2

• Break-even outputs.

Section 3

• Capital Budgeting outputs.

Page 14: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

14

4.4 Linking Inputs to Outputs Figure 4-3 and Figure 4-5 represent a tight diamond down layout. The Input section has labels in column A and values in

column B NOT column C. This is good practice – keep the material tight (make it look pretty later). Following the same

logic, the formulas which relate to the Output section in column E are “tight” to the column D labels. The rule of thumb

is: no blank columns between labels and their associated values or formulas.

Linking inputs through process to output:

a. Input sections do not contain calculations – they contain values (i.e., numbers like 11.43 or 123).

b. Output sections evaluate formulas based on cell references (i.e., Revenue =B2*B3).

c. The logic of the diamond down is that a formula can be constructed using cell references above and to the left

of the active cell (much more on this later).

d. Formulas should be broken down into easy to interpret components and inputs.

There is, of course, some judgment involved in the application of the rules, particularly Rules (c) and (d) which rely on

the output sought by the user. These will come into play as we build our first model: the Break-Even Analysis Model.

4.5 Break-Even Analysis Model If a company increases the amount of goods or services it produces, or its volume of outputs, then the amount of

resources required to produce this higher volume, its costs, should also increase. A company selling its goods and

services earns revenue. If the revenues outweigh the costs, a profit is earned. If the costs outweigh the revenues, a loss

is made.

When revenue is equal to the costs, the company is said to “break-even”. The break-even point occurs at a specific

volume and is known as the break-even volume or break-even quantity.

To understand how the break-even quantity is calculated an explanation of the relationship between cost and volume is

required. The sections that follow simplify break-even calculations for the purposes of this textbook.

4.5.1 Relationship of Cost to Volume

In order to calculate a break-even quantity, the following values are required:

Unit variable cost.

Fixed cost.

Selling price.

Using the above values and a volume, the following measures may be calculated:

Total Variable Cost.

Revenue.

Net Income.

Contribution.

The above are very important measures for a company as they can assist in determining profitability.

Ensuing sections discuss the above values and measures and how they are used to calculate a break-even quantity.

Page 15: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

15 4.5.1.1 Variable Cost

Variable costs vary directly and proportionately with volume or the quantity produced (quantity). If the quantity (Qty)

increases by 20% then the total variable cost (TVC) will increase by 20%. Most goods (e.g., automobiles, computers,

books, stoves) and services (e.g., hotel rooms, law offices, and restaurants) have a variable cost component and this is

called the unit variable cost (UVC). The term unit refers to a single good produced (e.g., an automobile, a book) or

service delivered (e.g., a hotel room for a night, 1 hour of a lawyers time). The term variable refers to changes in the

level of activity (i.e., the quantity produced). The total variable cost is equal to the unit variable cost multiplied by the

quantity produced:

Equation 4-1: Total Variable Cost.

Examples of variable costs include:

Direct labor.

Direct material.

In this textbook we shall use the term “widget” to denote any good or service.

4.5.1.2 Fixed Cost

Fixed costs do not vary with quantity. Examples of fixed cost include:

Building and equipment depreciation.

Rent.

Total fixed costs (TFC) may increase over the passage of time, but not because the quantity of widgets produced has

increased. The idea here is whether you produce 0 widgets or a 1,000 widgets in a period of time (e.g., per day, per

week, per month), the fixed costs remain the same over that period of time.

4.5.1.3 Semi-variable Cost

Semi-variable costs vary with changes in quantity but less than proportionately with changes in quantity. If the quantity

increases by 20%, the total amount of semi-variable cost will increase, but by less than 20%. Examples of semi-variable

costs include:

Maintenance.

Clerical Costs.

For the purposes of this textbook, it has been assumed that semi-variable costs are apportioned as either fixed or

variable cost.

4.5.1.4 Total Cost

Total cost (TC) is the sum of TFC and TVC:

Equation 4-2: Total cost.

Question 4-2: Plot TC, TVC and TFC if the UVC is $5, TFC is $2,000 in rent and the quantity varies from 0 to 1,000 widgets.

Page 16: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

16 Answer

Figure 4-8: Relation of TC, TVC and TFC to Qty.

4.5.1.5 Revenue and Net Income

Business people are interested in the relationship between cost and revenue and its effect on Net Income. Revenue is

equal to the unit selling price (price) multiplied by the quantity:

Equation 4-3: Revenue.

Net income is equal to the Revenue less TC:

Equation 4-4: Profit.

4.5.1.6 Break-Even Quantity

At the break-even quantity (QtyBE), TC is equal to Revenue and the Net Income is equal to $0.

We can calculate the break-even quantity by rearranging the Net Income equation:

Equation 4-5: Break-Even Quantity (TC = Revenue, Net Income = $0).

0

1,000

2,000

3,000

4,000

5,000

6,000

7,000

8,000

0 100 200 300 400 500 600 700 800 900 1,000

Co

st, $

Quantity of Widgets Produced

Relation of Total Cost to Quantity Produced

TFC

TVC

TC

Page 17: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

17 Question 4-3: Assume, in the previous question, the price per widget is $8.50. Create a chart that plots TC, Revenue, Net Income, the revenue at the QtyBE and indicates the profit/loss regions for 0 to 1,000 widgets. Round up any fractional QtyBE since we do not sell a fraction of a widget (e.g., 571.43 widgets can not be sold, only 571 or 572 widgets can be sold).

Answer

Figure 4-9: Revenue vs. total cost, revenue at QtyBE and the profit/loss regions.

Figure 4-9 is also known as a “profit graph” in accounting. Note that at quantities greater than the break-even, a profit is

made and at quantities less than the break-even, a loss occurs. At the break-even quantity, neither a profit nor a loss is

made; rather, it is said: “we break-even”.

From Question 4-3 we can determine that at 600 widgets, revenue is $5,100, total cost is $5,000 (TFC of $2,000 and TVC

of $3,000) and net income is $100; or an average net income of $0.17 per widget.

But at 800 widgets, revenue is $6,800, total cost is $6,000 (TFC of $2,000 and TVC of $4,000) and net income is $100; or

an average net income of $1.00 per widget.

This phenomenon is referred to as: “spreading the costs over a higher volume” or operating leverage.

4.5.1.7 Contribution

There is another measure that business people use in cost-volume relationships and it is known as the unit contribution

(contribution).

The contribution is equal to the difference in Price and UVC:

(4,000)

(2,000)

0

2,000

4,000

6,000

8,000

10,000

0 100 200 300 400 500 600 700 800 900 1,000

Do

llar

s, $

Quantity of Widgets Produced

Revenue vs. Total Cost at Break-Even

TC

Revenue

Net Income572 widgets

$4,862

Profit

Loss

QtyBE

Page 18: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

18 Equation 4-6: Contribution.

Contribution is also called: unit contributed value (CV) or marginal income and can also be expressed as a margin, in %:

Equation 4-7: Contribution Margin, %.

For Question 4-2, the contribution is $3.50 (= $8.50 - $5.00) and the contribution margin is 41% (= $3.50/$8.50 x 100).

The break-even quantity equation can now be rewritten as:

Equation 4-8: Break-Even Quantity using contribution.

This simplifies the QtyBE calculation. The QtyBE calculates to 572 widgets (= $2,000/$3.50 and rounded up).

Page 19: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

19 4.5.1.8 Visualizing the Relationship

Up to this point, we have been using algebra and charts to help “visualize” the cost-volume relationship and the concept

of break-even. Another way to do this is to use flow diagrams (pictures).

Figure 4-10 emphasizes the flow of funds and activities.

Figure 4-10: Flow of funds and activities.

In real terms Figure 4-10 indicates that for every widget sold at $8.50, $5.00 is used to pay the variable costs (labor and

materials) and $3.50 remains to contribute towards paying the $2,000 fixed cost (rent).

Stated another way, 41% of every sales dollar earned (“41¢ on the dollar”) contributes towards paying the $2,000 fixed

cost (rent).

4.5.1.9 Bob’s Widgets Break-Even Model

Bob’s Widgets Break-Even model will be used in subsequent sub-sections of Section 4.5 “Break-Even Analysis Model” –

take extra care and attention to read and understand this section. It is assumed that you have worked through the

Model e-mailed to you. This question is a paper and pencil exercise – you will be handing in your work to your Instructor

for evaluation.

Read the question that follows and complete the instructions on the next page.

Question 4-4: Bob’s Widgets Break-Even model.

Bob’s Widgets sells widgets for $30 each (brilliantly called “price”). The widgets cost $19.80 to make (called “unit

variable cost”). Bob calculates that each widget has a contribution of $10.20 (that is to say price minus unit variable cost

which leaves him $10.20 available before considering fixed cost). Bob’s fixed cost (think “rent”) is $19,500 per quarter.

Bob’s target sales (quantity) are 1,800 widgets/quarter.

$5.00 Paid in Labor &

Materials

$8.50 into the Cash Register

Widgets are Sold

$2,000 Rent to Landlord

$3.50Contribution towards Rent

Flow of Funds & Activities

Page 20: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

20 STUDENT NAME & SET LETTER: ________________________________________________________

Figure 4-11: Bob’s Widgets Break-Even model.

Print this page, write your name and set letter at the top of this page in the line provided, create the formulae for the

various cells using proper cell references, transcribe your complete formulas in the lines provided below (as you would

enter them in Excel using the above worksheet) and hand this page into your Instructor:

Cell E14: ________________________________________

Cell E15: ________________________________________

Cell E18: ________________________________________

Cell E19: ________________________________________

Cell E22: ________________________________________

Cell E23: ________________________________________

Cell E24: ________________________________________

Cell E25: ________________________________________

Cell E27: ________________________________________

See your instructor for the Answer.

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

A B C D E

Price 30.00$ /widget

uvc 19.80$ /widget

tfc 19,500.00$ /qtr

TargQty 1,800 widgets/qtr

Contribution

Per Unit

Margin

Break-Even per Quarter

In Units

In $ Sales

Results per Quarter at Target Sales

Revenue

Total Variable Cost

Fixed Cost

Total Cost

Net Income

Inputs (Assumptions)

Outputs (Results)

Page 21: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

21 Notes about the Inputs (Assumptions) section:

1. The labels are input in conventional business order: price first, followed by the UVC (Bob immediately estimates

the contribution in his head) and TFC (Bob now does a quick estimate of Break-Even).

2. Like items are grouped: first the $ inputs then quantity.

3. Care is taken to display units of measurement (/widget, widgets/qtr).

4. Values go in column B – NO BLANK COLUMNS!

5. Modeler friendly labels are used (Price, uvc, tfc, TargQty) – short, descriptive and tied to the algebra (they make

for excellent names to assist with formula construction, i.e., user friendly names in a formula, but ignore this for

now).

Notes about the Outputs (Results) section:

1. Remember how Bob thinks: first contribution, then break-even.

2. Note that contribution may be expressed in two ways as our analysis suggested.

3. Break-even is calculated in units and can be expressed as revenue (recall the chart in Figure 4-9).

4. Target Sales are NOT break-even values so a separate section is developed.

General Notes about the Bob’s Widgets model:

1. When building a model it is not necessary to worry very much about fancy formats at the outset – first make

sure it works, then make it pretty.

2. Making the model pretty first is dangerous – people often fiddle with formats and distract themselves from the

task at hand. This is when errors are made.

3. About the only formatting necessary at this stage is to delineate the worksheet sections (inputs and outputs)

and some indents (Total Variable Cost and Total Fixed Cost) for visual clarity.

4.5.2 Input the model

Excel setup:

1. Open the file: WIV -1 Break Even (Module II Files | WIV Files folder).

2. Save as: WIV -1 Break Even Solution.

3. Optional: Set a comfortable Zoom level:

View ribbon for the Zoom group.

Select cells A3:E27.

Click on Zoom| Zoom to Selection.

If this is not comfortable reset the Zoom level.

4. Excel setup: The primary activity is to input and test formulas so the strategy is to:

Open the Formula ribbon.

Use the right mouse to do any basic formatting and access common commands (copy/paste, insert,

delete, etc).

5. Input the formulas using point/click. Save the file every two or three formulas.

Page 22: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

22 4.5.3 Examine & Test the Model

Since this is your first model it might be useful to compare answers to those of the authors.

1. Unhide the worksheet: Q. 4-4 Answer and compare answers.

For more ideas and comments on the formulas submitted by past students:

2. Unhide the worksheet: Common Errors and Ideas and examine Common Errors/Good Things that former

students did with this assignment. Review and the “Modeler” mindset Ideas 1 to 3 and Bad Formula comments.

4.5.4 Simple input values as tests (fine for simple models):

1. Activate worksheet: Q. 4-4 Answer.

2. Change uvc to $20 and tfc to $1,000. Since contribution = price – uvc, the model should calculate a contribution

of $10. Since the break-even quantity = tfc/contribution, the model should calculate a break-even of 100 units.

Verify these results.

3. If you are not comfortable doing math like this in your head use Evaluate Formula to confirm the results.

4. Undo the uvc and tfc changes.

5. Save: WIV -1 Break Even Solution.

Page 23: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

23 4.5.5 Goal Seek to test the model

Goal Seek is a handy What If tool that allows users to play games relating one Input cell to one Output cell. Remember

that break even occurs when the number of widgets sold (an input) results in a profit of $0 (an output calculation). This

idea can be combined with Goal Seek to perform tests of the model.

Figure 4-12 shows a Goal Seek dialog box:

Figure 4-12: Goal Seek dialog box.

First, a few rules for using Goal Seek (refer to Figure 4-12):

The “Set cell:” input must refer to a cell that contains a formula (e.g., the Net Income cell).

The “To value:” input is the required (or “target”) value the formula cell must evaluate to (e.g., 0 for $0 Net

Income).

The “By changing cell:” input must refer to a cell that contains an input used by the formula cell (e.g., the

TargQty cell).

Unfortunately the Goal Seek feature is not on the Formula ribbon (being an important tool it is a candidate to be added

to the Quick Access Toolbar).

Now, use Goal Seek to test the model formulas.

1. Open: WIV -1 Break Even Solution.

2. Activate the worksheet: Q. 4-4 Answer.

3. Activate E27.

4. Select Data | Data Tools | What-If Analysis: Goal Seek…

5. Input the values as shown in Figure 4-12, click OK and click OK in the Goal Seek Status dialog box. Note that the

Goal Seek Status dialog box is indicating that a solution was found. If this dialog box ever indicates that a

solution was not found retest the formulas.

Figure 4-13: Goal Seek Status dialog box.

Page 24: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

24 Figure 4-13 shows the results of Goal Seeking Net Income to $0 (break-even). This section of the model works. Now test

the output section:

6. Activate E18. Right Mouse then set the font to display four or five decimals.

7. Compare E18 to B9. Both give the same answer for break even. A nice set of formulae!

8. Input 1800 into cell B9.

9. Save: WIV -1 Break Even Solution.

4.5.6 Cell Comments as basic documentation

Before using the model it is probably wise to keep the original assumptions handy for reference. This can be done a

variety of ways. One simple method is to add a cell comment listing the inputs (if you are unfamiliar with Cell Comments,

review Module I: Section 3.15.1 Cell Comments).

1. Open: WIV -1 Break Even Solution.

2. Activate worksheet: Q. 4-4 Answer.

3. Hide all other worksheets.

4. Activate A3.

5. Right mouse Insert Comment, then create the inputs as shown in Figure 4-14, set to Hide Comment and

activate another cell to verify the comment remains hidden until you mouse over it (if necessary, enlarge the

font size and resize the cell comment box to make it easier to read).

Figure 4-14: Cell comment inputs.

6. Save: WIV -1 Break Even Solution.

Page 25: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

25 4.5.7 Modifying the model

No matter how carefully you plan be prepared changes: information has been missed or overlooked or new features

need to be added to the model. A proper t-layout and a basic understanding of Excel make this a straight forward

process…

Question 4-5: Add a new cost and determine a break-even selling price at 1,800 units.

Bob decides that he should try some advertising. He elects to rent a Billboard for advertising at $600 per quarter. Modify

the model to include the billboard rent. Then find the price required to break-even at 1,800 units.

1. Open: WIV -1 Break Even Solution.

2. Activate worksheet: Q. 4-4 Answer.

3. Make changes to the model to reflect the above requirements.

4. Unhide worksheet: Q. 4-5 Answer and compare to your results. If your model did not generate the correct

outputs, review and edit the formulas. You may have a slightly different, but workable, set of outputs. If you do

discuss with your lab instructor.

5. Hide worksheet: Q. 4-5 Answer.

6. Save: WIV -1 Break Even Solution.

Question 4-6: Add a new cost and determine the quantity to generate a quarterly profit of $3,000.

Suppose that, in addition to billboard advertising, Bob gets hit with a shipping cost of $0.20 per widget. Modify the

model. How many units will Bob need to sell to generate a quarterly profit of $3,000?

1. Open: WIV -1 Break Even Solution.

2. Activate worksheet: Q. 4-4 Answer.

3. Input 30 for the Price.

4. Make changes to the model to reflect the above requirements.

5. Unhide worksheet: Q. 4-6 Answer and compare to your results. If your model did not generate the correct

outputs, review and edit the formulas. You may have a slightly different, but workable, set of outputs. If you do

discuss with your lab instructor.

6. Hide worksheet: Q. 4-6 Answer.

7. Save: WIV -1 Break Even Solution.

A problem:

Some of you will discover that you forgot to modify one or more of the Output formulas to take into account the new

costs. How do we prevent this from happening in the future (e.g., in a hands-on exam question)?

To answer this, let’s revisit the shipping modifications:

1. Open: WIV -1 Break Even Solution.

2. Activate worksheet: Q. 4-4 Answer.

3. Formulas ribbon.

Page 26: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

26 The logic:

Shipping is a variable cost (its units of measure are: /widget). So determine which output formulas use the uvc as input

and modify them to account for a new variable cost.

4. Activate B6 and select Trace Dependents from Formulas | Formula Auditing (see Figure 4-15).

Figure 4-15, indicates that the formulas in cells E16 (Contribution: Per Unit) and E25 (Total Variable Cost) depend on

variable costs therefore, the new cost, shipping, will have to be added to these formulas.

An added benefit of this method is that after a formula is modified and entered, the Trace Dependents arrow is

extinguished – reminding users that the required modification has been made. Of course formulas need to be tested

after they are modified!

Figure 4-15: Use Trace Precedents to determine which formula cells to modify.

5. Modify the cell comment to show the new cost additions.

6. Save: WIV -1 Break Even Solution.

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

A B C D E

uvc 19.8 /widget

tfc 19500 /qtr

TargQty 1800 widgets/qtr

Outputs (Results)

Contribution

Per Unit 10.2

Margin 0.34

Break-Even per Quarter

In Units 1911.765

In $ Sales 57352.94118

Results per Quarter at Target Sales

Revenue 54000

Total Variable Cost 35640

•When adding a new input to the model (e.g., shipping cost), select an exisiting and similar input (e.g., uvc) and use Trace Dependents to determine which formula cells require to be updated with the new input (e.g., Contribution Per Unit, Total Variable Cost).

•After making the modification and pressing Enter, the Dependents arrow extinguishes reminding us that have modifications have been inputted.

Tips

Page 27: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

27 4.5.8 Making the model presentable

The model works. Now it’s time to consider enhancements that make it presentable (add “the sizzle” as presenters

say). Of course one person’s “presentable” is not necessarily another’s. So this section, while not the “last word”,

presents some important aspects of making models easier for users and in more attractive in presentations.

Consider:

Figure 4-16:

For users: formulas like E20: = (B8+B9)/E16 are hard to interpret (Solution: Names).

For anyone: the model is ugly (Solution: Formatting).

For those developing reports or other presentations: cell comments are useful but they do not allow

comparison of “What-If?” Sensitivity Analysis (using different sets of inputs, e.g., optimistic, pessimistic selling

prices) and comparing to base or most likely values. (Solution: Scenarios).

Figure 4-16: The current worksheet.

Page 28: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

28 4.5.9 Names in Models

Names have many uses in Excel. For modelers the most common and important use of names is to assist with formula

input. Figure 4-17 compares the original model formula for break even to a version built with names:

Figure 4-17 Original worksheet formulas (left) and a version built with names (right).

Panel 1: Original Inputs

Panel 2: Input using names

Which one is easier to interpret?

Most people prefer Panel 2. “Billboard” has more meaning than “B9”.

A basic strategy for using names:

Figure 4-18: A Strategy for using names.

The strategy requires judgment on the use of names in output sections (“many”). The basic argument (there are others)

is that too many names lead to clutter in the Name Manager (to be seen) and makes it less efficient when inputting

formulas. Users can always add more names later if they feel they enhance the model.

43

44

D E

Break-Even per Quarter

In Units =(B8+B9)/E6

43

44

D E

Break-Even per Quarter

In Units =(tfc+Billboard)/contrib

For each input row create a

name to be used to assist

with formula creation and

interpretation.

In general do not create many

if any names on output cells.

This will be relaxed in later

models (where appropriate).

Page 29: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

29 4.5.9.1 Create Names

“Creating names” means assigning one label name to one cell value. Recall the design rule “keep the t-layout tight with

no blank columns between labels and values”. Adhering to the rule now pays dividends…

1. Open the file: WIV -2 Enhancing Break Even. Save as: WIV -2 Solution.

2. Activate the Break-Even worksheet, rename it Model and hide all other worksheets.

3. Formulas ribbon for the Defined Names group.

4. Activate cell A5 and select the non-contiguous cell ranges A5:B9 and A11:B11 (remember the Ctrl key) as

shown in Figure 4-19.

Figure 4-19: Non-contiguous cell selection.

5. Apply Formulas | Defined Names | Create from Selection.

6. The Create Names from Selection dialog box appears. Check the Left column check box and click OK (see Figure

4-20). This tells Excel to use the labels to the left of the value as the cell names.

Figure 4-20: Create Names from Selection dialog box.

Page 30: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

30

7. Click the Name Manger button to view the list of names (see Figure 4-21). Click Close.

Figure 4-21: Name Manager list of cell names, values and cell references.

If your names DO NOT look like Figure 4-21:

Select all the names in the Name Manager.

Delete the names.

Retry the Name Create process.

4.5.9.2 The Name Box

Names also appear in the Name Box as illustrated in Figure 4-22.

Figure 4-22: Name Box list of named cells.

The Name Box is offers another way to define names. This method is appropriate when you want to create a name that

is different from an adjacent label or when there are no cell labels adjacent to a cell value (i.e., the Create from Selection

feature will not work in these situations).

1. Activate cell E16, click in the Name Box, type: contrib and press Enter. This names cell E16: contrib.

To navigate to a named cell or cell range, type its

name in the Name box and press Enter, or click the

arrow next to the Name box, and click on the

name. Names on hidden worksheets will not

appear in the list unless they are global in scope. A

worksheet must be unhidden to navigate to the

named cell if it is a duplicate name (local scope).

Note that these names are global or

Workbook in scope (e.g., any reference to

Price, from another worksheet, will point to

cell B5 in the Model worksheet provided that

worksheet has no local duplicate name of its

own).

Page 31: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

31

2. Activate cell A2 then use the Name Box to go to contrib. If you did not go to cell E16 use the Name Manager to

delete “contrib.” and repeat step 1 above.

4.5.9.3 Names to input formulas

Formulas can still be inputted using point and click (Excel will simply substitute names for cell references) but the use of

names allows the user to input formulas in new ways…

Method #1: Direct input- type in the names.

To simulate one author’s preference (a pre Excel 2007 World):

1. Office Button| Excel Options| Formulas| disable Formula AutoComplete.

2. Activate E16.

3. Input =Price-(uvc+ship)

4. Now to demonstrate a nice safety feature:

5. Activate E17.

6. Input = Cont/Price and .

#NAME? signals that, “There is no cell named Cont!”. This is nice. It’s hard to make an error when you directly input a

name (very useful in large multi-sheet models). To illustrate…

1. Insert a new worksheet. Use the Insert Worksheet tab to the right of the Model tab.

2. Select cell B6.

3. Input =Price-uvc and enter. Pretty slick?

4. Sheet1 is no longer required so Delete it.

Now another name tool to fix the problem in cell E17…

15

16

17

D E

Contribution

Per Unit 10

Margin #NAME?

Page 32: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

32 The {F3} a.k.a. the “Name Key”

1. Activate E17.

2. Use the Formula Bar to select Cont:

Figure 4-23: Name Box list of named cells.

3. Input the function key F3:

Figure 4-24: The Paste Name Dialog box.

4. Select OK to replace cont with contrib. and .

5. Delete E16 and input the correct formula using Formula| Defined Names| Names in formulas as an alternative

to the F3 key.

Illustrations 1 and 2 are really the older author’s preference. However the problem is that the F3 key is a bit “kludgy” in

that Paste Name does not stay on screen after you select the name. So you may prefer…

Page 33: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

33 Method #2 Formula AutoComplete

AutoComplete is new to Excel 2007. To see if it’s your “cup of tea” enable it as follows:

Office Button| Excel Options| Formulas| to enable Formula AutoComplete.

AutoComplete is based on Excel’s use of names to identify built in functions and user defined names (identified by red

name tags).

1. Activate E20.

2. Input =(tfc+bi Stop notice that Excel has identified the name billboard (see the tag?)

Figure 4-25: Formula AutoComplete.

3. Double click billboard to insert it to the formula:

4. Input )/co and find the name in the list and double click:

5. completes formula input.

Should you use AutoComplete or the older method?

The choice is yours.

Page 34: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

34 Practice inputting formulas via names by completing the model as illustrated in Figure 4-26 using your method of choice.

Figure 4-26: The complete list of formulas.

Save the file.

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

D E

Contribution

Per Unit =Price-(uvc+ship)

Margin =contrib/Price

Break-Even Per Quarter

In Units =(tfc+Billboard)/contrib

In $ Sales =Price*TargQty

Results per Quarter at Target Sales

Revenue =Price*TargQty

Variable Cost =(uvc+ship)*TargQty

Fixed Cost =tfc

Billbord Ads =Billboard

Total Cost =SUM(E25:E27)

Net Income =E24-E28

•Names have been created for the input cells. In general names are assigned to input cells, not to output cells.

•There are exceptions for larger models and Scenarios but this is a wise starting point – too many names spoil the broth!

Note

Page 35: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

35 4.5.10 Format & Display

Excel has a wide variety of formatting abilities. It is assumed that you have explored many of these in Module I and that

you understand how to use tools like the Ctrl key and Format Painter (e.g., the latter ability from a Microsoft Word or

PowerPoint course). This section deals with three new ideas from the current break even model (WIV -2 Solution):

Short labels like “uvc” and “TargQty” are great names for formulas but they are a bit cryptic for users to read –

they should be replaced with more common labels in the worksheet.

The Net Income figure should display red when the firm makes a loss (where the term “in the red” comes from)

and black for a profit.

The worksheet must be spell checked.

4.5.10.1 Formatting the break even model

1. Open: WIV -2 Solution.

2. Activate the worksheet: Model and unhide the worksheet: Format. Hide all other worksheets.

3. Optional: Set a comfortable Zoom level:

View ribbon for the Zoom group.

Select cells A3:E27.

Click on Zoom| Zoom to Selection.

If this is not comfortable reset the Zoom level.

4. Excel setup: The primary activity is to format the model so the input strategy is to:

Open the Home ribbon (to get a wide range of formatting ability like Format Painter).

Or

Stay on Formulas ribbon use the right mouse to do any basic formatting and go to Home for finishing

touches.

The task is to format the worksheet Model to be identical to the worksheet Format. To make life easier it might be

useful to printout the worksheet Format or set up two Windows as shown in Figure 4-27 on the next page. Figure 4-27 is

not necessary, but a useful skill to know (review: Module I Section 3.12.2 Freeze Panes, Split & New Window: Create a

new window to view the worksheet). Apply all the formatting and run spell checker as per the Format worksheet

instructions shown in Figure 4-27 so that the Model display is identical the same as shown in Figure 4-28 .

Page 36: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

36 Figure 4-27: Model and Format worksheets using the New Window and Arrange Vertical features.

5. Save: WIV -2 Solution.

Figure 4-28: The Formatted Model.

Note the new skills practiced:

•Changing and modifying a number format by finding the format in the Custom Category: we modified the Accounting format so that negative numbers are displayed with a red font color. All number formats are reported under the Custom Category. This Category exists so that Number formats can be modified or "customized" to suit.

•Modifying font types and font colors in a cell comment.

•Spell Checking the worksheet labels for any spelling errors.

Page 37: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

37 4.5.11 Fine tuning the precision of calculation and adding “Dynamic Labels”

This is probably a good time to fine tune the model a bit (“rounding”) and introduce a couple of techniques that add a

useful “wow” factor (concatenate, TEXT). These techniques will be carried out on the Format ribbon so you might ask,

“Shouldn’t we have done this in the make it work stage?” A good question; let’s explore them and see if sensible

answers to the question arise…

4.5.11.1 Rounding the model

Those of you with backgrounds in math or computing know that rounding results at the appropriate time is an important

and sometimes complex matter. However, the general rule of thumb is to build the formulas letting the computer (or

calculator) calculate to its built in precision then round the results. This approach is adopted as the default for simple

models.

1. Open WIV -2 Solution.

2. Activate Model and hide all other worksheets.

3. Formulas ribbon for the names group.

4. Input a price f $31.99.

5. Select cell E20. Set the font to display 12 decimal places.

Excel is calculating to minute fractions of a widget. In reality a conservative business person would ask Excel to round up

to the nearest whole widget.

6. Reset E20 to display zero decimals – note the cell displays 1,676 widgets.

7. Edit E20 to =ROUNDUP((tfc+Billboard)/contrib,0). You may use any technique you want to input the new

formula. The authors know the syntax of ROUNDUP well so they just edited like a word processor in the

formula bar.

8. E20 now displays 1,677 widgets (Aha – roundup is conservative here because it requires a fractionally higher

output to reach break even).

9. Now to demonstrate a practical reason for leaving rounding until after the completion of formula testing:

Right Mouse Copy E20.

Point over B12 then Right Mouse Paste Special| Values and Number Formats.

Undo the Paste Special, Reset the Price to $30 and Save the file.

Interesting! Net Income shows $7 rather than $0 because of the ROUNDUP. As a practical matter many people drive

themselves crazy when they round at the formula building stage and start testing formulas A lot of time can be wasted

trying to account for these small discrepancies. So as a beginner leave rounding until later. As you get more experience

and deal with more complex problems “rounding” (and, for the math crowd, similar actions like taking and integer or

truncating) may need to be done as formulae are built.

Page 38: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

38 4.5.11.2 Concatenation and TEXT Functions to create dynamic labels

Concatenating is left to the “make it presentable” stage for two reasons. First, concatenating is not that common so it

may take some time to get it right. You don’t want playing with a “WOW” factor to get you frustrated or divert your

attention when the key task is developing the core formulas. Secondly, you may take some time to decide on the final

look of the labels including the concatenate so it’s wise to do this at the same time to maintain a consistent look and

feel.

Cell D23 is a standard text label. There’s nothing wrong with it! But concatenating (and the TEXT function) adds a little

(useful) “wow” factor to the model. Remember Sue’s Price List from Module I. She wanted to make her Output labels for

GST and PST change with changes in the tax rates from the Input Section. In Bob’s case concatenate allows D23 to

display changing Target Sales input as illustrated in Figure 4-29.

Figure 4-29: Basic Concatenation with the TEXT Function.

Panel 1: Cell B11 at 1,800 units

Panel 2: Cell B11 at 2,500 units

23

24

25

26

27

28

29

30

D E

Quarterly Results at Target Sales of 1,800 widgetsRevenue 54,000$

Variable Cost 36,000$ Fixed Cost 19,500$ Billbord Ads 600$

Total Cost 56,100$

Net Income (2,100)$

23

24

25

26

27

28

29

30

D E

Quarterly Results at Target Sales of 2,500 widgetsRevenue 75,000$

Variable Cost 50,000$ Fixed Cost 19,500$ Billbord Ads 600$

Total Cost 70,100$

Net Income 4,900$

Page 39: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

39

Question 4-7: Create the concatenate.

Since this exercise has been performed before take out a pencil and paper, use any Help you need, and input the

appropriate formula into D23. The text function syntax works as follows:

Equation 4-9: TEXT function syntax.

The TEXT function takes a cell reference or a cell name with a value or a numeric value for its first argument (e.g., 1200,

B30, Total_Cost, $B$11) and then applies the text format to the first argument value. The text format is enclosed in

double quotation marks (a text string) and can be any numeric format found in the Format Cells | Number | Custom

Category (e.g., “$0.00”, “0%”, “(#,##0)”, “d-mmm-yy”, “mmmm d, yyyy”).

Answer

6. Unhide the sheet Concatenate to compare answer.

4.5.11.3 (Optional) More complex concatenation using an IF function

Next, we will use concatenation, the IF function and the TEXT function to inform/alert the user, by changing the label in

cell D23, as to whether a profit, loss or break-even has resulted from a change in input.

1. Unhide the sheet Complex Concatenate.

Question 4-8: Inform the user whether a profit, loss or break-even has resulted.

1. Define the Name Net_Income for cell E30.

2. Input a formula to cell D23 that displays profit or loss or break-even as shown in Figure 4-30, thru Figure 4-32

Hint: create a nested if based on Net_ Income and use concatenate TEXT to create the message.

Figure 4-30: Concatenate, IF and TEXT used to inform the user whether a profit has resulted.

11

12

22

23

24

25

26

27

28

29

30

A B C D E

Target Quantity 2,500 widgets/qtr

Profit at 2,500 widgets/quarterRevenue 75,000$

Variable Cost 50,000$ Fixed Cost 19,500$ Billbord Ads 600$

Total Cost 70,100$

Net Income 4,900$

Page 40: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

40 Figure 4-31: Concatenate, IF and TEXT used to inform the user whether a loss has resulted.

Figure 4-32: Concatenate, IF and TEXT used to inform the user whether break-even has resulted.

Answer

3. Unhide the Complex Answer to view the formula in D23. Compare the answer to your formula inputs.

4. Save WI -2 Solution.

The formula is explained in detail on the next page.

The key to the concatenate is the nested IF discussed in Module I. There are three possibilities (n=3) – Losses, Break

Even, or Profits. Therefore you will need 2 IF functions (the number of IF’s needed is n-1). The logic can be illustrated

nicely using a simple line to highlight the three possibilities:

IF Net_Income is <0 =0 >0

Return text Loss at Break Even at Profit at

Now to build the nested IF moving from left to right along the line:

=IF(Net Income<0,“Loss at ”,

Should this evaluate as FALSE the next test for break even:

=IF(Net Income<0,“Loss at ”,IF(Net_Income=0,“Break Even at ”,

Now if the firm is not at break even we must have Net_Income>0 (since the first IF tested for Loss):

11

12

22

23

24

25

26

27

28

29

30

A B C D E

Target Quantity 1,800 widgets/qtr

Loss at 1,800 widgets/qtrRevenue 54,000$

Variable Cost 36,000$ Fixed Cost 19,500$ Billbord Ads 600$

Total Cost 56,100$

Net Income (2,100)$

11

22

23

24

25

26

27

28

29

30

A B C D E

Target Quantity 2,010 widgets/qtr

Break Even at 2,010 widgets/qtrRevenue 60,300$

Variable Cost 40,200$ Fixed Cost 19,500$ Billbord Ads 600$

Total Cost 60,300$

Net Income -$

Page 41: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

41

=IF(Net Income<0,“Loss at ”,IF(Net_Income=0,“Break Even at ”,“Profit at ”))

When you need to do multiple IF’s it is wise to drawing some type of “flow diagram” to help yourself work through

logically.

Now concatenate (&) the text to the Target Quantity using TEXT to return the desired number format:

=IF(Net Income<0,“Loss at ”,IF(Net_Income=0,“Break Even at ”,“Profit at ”))&TEXT(TargQty,“0,000”)

Finally concatenate (&) the final portion of text:

=IF(Net Income<0, “Loss at ”,IF(Net_Income=0, “Break Even at ”, “Profit at ”))&TEXT(TargQty,”0,000”)& “ widgets/qtr”

Test your concatenate by inputting the Target Quantities in the Figures above. Check to see there ate proper spaces

between text strings.

•Earlier, it was suggested that formulas be made as simple as possible. Can you think of a LOOKUP that would simplify the formula in B23?

•This approach (IF and Nested IF) is useful when you need to change labels based on the results of a calculation (e.g., you will be using this in the Pi and Omega Projects Income Statement).

Note

Page 42: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

42 4.5.12 Scenarios for comparison

Background

The final modification is to develop some Scenarios. This takes “What-If? Analysis” to its logical conclusion.

Remember the idea is to make the model reusable. Changes in Inputs lead to changes in Outputs. The problem with the

existing model is that this to review various input changes, users have to constantly re-enter the inputs – a waste of time

and difficult to track.

Scenarios overcome this difficulty. To quote Microsoft Excel Help:

“A scenario is a set of values that Microsoft Office Excel saves and can substitute automatically on your worksheet. You

can use scenarios to forecast the outcome of a worksheet model. You can create and save different groups of values on a

worksheet and then switch to any of these new scenarios to view different results.”

When Scenarios are created the modeler is testing the model’s sensitivity to changes in the inputs or assumptions.

Because of this Scenarios are frequently called “Sensitivity Analysis”.

Scenarios and the t-Layout

Scenarios are designed with the t-layout in mind. Figure 4-33below illustrates the key components in the process.

Namely users recorded a set of inputs then specify a set of outputs to be summarized and compared.

Figure 4-33: The logic of scenarios.

Scenarios for Bob’s Widgets

Each new Scenario is based

on a unique set of Input

values.

Excel generates Scenario

Summaries based on some or

all of the Output calculations

as specified by the user.

Page 43: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

43 Review the current model Figure 4-34.

Question 4-9:

What’s Bob’s current problem as revealed by the model?

Figure 4-34: The current model.

Answer He isn’t making any profit.

Now suppose he starts thinking about marketing: “Price, Product, Promotion, or Place”. His analysis may lead him to

conclude: “I think a price cut of 5% might lead to 25% higher target quantity. On the other hand, an extra $500 per

quarter for billboards might cause 20% higher target quantity.”

These results of these “scenarios” or “sensitivity analyses” are captured in Figure 4-35 on the next page.

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

A B C D E

Selling Price 30.00$ /widgetUnit Variable Cost 19.80$ /widgetShipping Cost 0.20$ /widgetBillboard Advertising 600.00$ /qtrTotal Fixed Cost 19,500.00$ /qtr

Target Quantity 1,800 widgets/qtr

ContributionPer Unit 10.00$ Margin 33%

Break-Even Per QuarterIn Units 2,010 In $ Sales 60,300$

Results per Quarter at Target SalesRevenue 54,000$

Variable Cost 36,000$ Fixed Cost 19,500$ Billboard Ads 600$

Total Cost 56,100$

Net Income (2,100)$

Outputs (Results)

Inputs (Assumptions)

Page 44: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

44 Figure 4-35: Scenario Summary.

The summary compares the original data to the two alternatives. If Bob’s estimates are correct Increased Promotion

seems like the better course of action; but neither strategy is overly attractive.

4.5.12.1 Adding Scenarios

Scenarios can be tricky if the user gets sloppy so a very methodical approach is employed in this exploration of

Scenarios. The method is:

Step 1: Create a Scenario using the original inputs (name it: Original Data or Baseline).

Step 2: Show the Original Data.

Step 3: Create a new Scenario.

Repeat Steps 2 and 3 for each new Scenario.

This method, always showing the Original Data before creating a new scenario ensures that each new scenario

compares to the Original case. This avoids accidentally compounding Scenarios. That is to say if we want to compare a

Price Cut to Increased Promotion, we do not want to accidentally combine and/or overtype the data from one scenario

with another.

Scenario Summary

Original Data Price Cut Increased Promotion

These are all the

original inputs for the

break-even model.

A price cut of 5% causes

an increase of 25% in

the target quantity.

Increased Billboard

Advertising of $500 per

quarter increases target

quantity by 20%.

Changing Cells:

Selling Price 30.00$ 28.50$ 30.00$

Unit Variable Cost 19.80$ 19.80$ 19.80$

Shipping Cost 0.20$ 0.20$ 0.20$

Bil lboard Advertising 600.00$ 600.00$ 1,100.00$

Total Fixed Cost 19,500.00$ 19,500.00$ 19,500.00$

Target Quantity (widgets/qtr) 1,800 2,250 2,160

Result Cells:

Break-Even (widgets/qtr) 2,010 2,365 2,060

Revenue 54,000$ 64,125$ 64,800$

Total Cost 56,100$ 65,100$ 63,800$

Net Income (2,100)$ (975)$ 1,000$

Page 45: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

45 First, create a baseline scenario (Original Data) by recording the original values:

1. Open the file: WIV -2 Solution.

2. Activate the worksheet: Model. Hide all other worksheets.

3. Select Data | Data Tools | What-If Analysis | Scenario Manager… and click the Add... button.

4. Add the baseline scenario as shown in Figure 4-36 (leave Prevent Changes and Hide boxes at their defaults) and

click OK.

Figure 4-36: Original Data scenario inputs.

5. Ensure all of the input values are correct as shown in Figure 4-37. Note that Excel uses names in lieu of cell

references – another reason to name input cells.

Figure 4-37: Original Data Scenario Values.

6. Click OK to accept the Scenario Values.

7. Click the Show button. This ensures the input values do not get mixed with those from another scenario and of

course, creates a comparison to the baseline case.

Name the Scenario.

Note all the inputs are included.

Describe the Scenario giving key information.

Page 46: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

46 Now the Price Cut scenario:

8. Keep the Scenario Manager Dialog box still open, click the Add... button.

9. Add the Price Cut scenario as shown in Figure 4-38 and click OK.

Figure 4-38: Price Cut scenario.

Remember in computing the idea is to minimize the input. Here’s a chance to see this in action. In the Scenario Values

dialog box we need to cut price by 5% and increase TargQty by 25%. Let Excel do the math.

To modify Scenarios people often reach for a pocket calculator to calculate 0.95*$30 and then transcribe the results into

the dialogue box. It’s dangerous to manually transfer information from one device to another. If you misread or mistype

the input you have no way of going back to double check and verify your work. This can be avoided in one of two ways.

First, one could use a blank cell in Excel to do calculations before starting the scenario but this is not the best method.

The alternative is to do the work directly in the dialogue box on the next page.

Figure 4-39: Price Cut Scenario Values.

10. Input the Scenario Values as shown in Figure 4-39 above. Notice that the only changing cells are Price and

TargQty. The other inputs are all left at the original values. Furthermore, Excel will perform the calculations and

The same input cells are used. We will edit

these values for this scenario.

Make sure you include the comment.

Page 47: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

47

then round to the desired decimal. In this case the desired decimal for price is “dollars and cents” or 2 and

integer units or 0 for Target Quantity.

11. Click OK. This results in the Warning Message :

Figure 4-40: Conversion of formulas into values Warning Message

Conversion to values means Excel is informing the user that it has treated the inputs for Price and Target Quantity

numerically rather than as “string” (or “Text”) input.

12. Show the Original Data Scenario and close the Scenario Manager Dialog box.

13. Save: WIV -2 Solution.

Question 4-10: Add the 3rd

Scenario.

Add the 3rd Scenario as shown in Figure 4-35.

Create a Scenario Summary worksheet. Ensure you have the comment row in view, apply the Calibri font type to

the worksheet and edit the Changing Cells and Result Cells labels as shown in Figure 4-35.

Answer

14. Open: WIV -2 Solution.

15. Unhide the worksheets: Scenario Summary and Scenarios.

16. Compare results and fix any errors.

17. Save: WIV -2 Solution, keep the file open to follow along with the ensuing discussion.

To create a Scenario Summary worksheet, open the Scenario Manager Dialog box, click on the Summary… button, select

the desired Result cells and click OK (see Figure 4-41).

Figure 4-41: Scenario Summary Result cell selection.

Key Observations:

Page 48: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

48

Excel uses names in preference to cell references –this help saves time when editing. Where there are no

names set up two Windows (use View Ribbon) and use Copy to avoid constantly flipping back and forth between

worksheets.

You can overtype the Changing Cells and Result Cells labels and format the worksheet as you would any other

worksheet.

The Scenario Summary worksheet is a “snapshot” in time; that is to say, if you later modify the Scenario Values

the Scenario Summary worksheet WILL NOT update with the changes. A new Scenario Summary is required to

display the modifications.

The Scenario Summary will report a column titled Current Values. This is a safety feature in case you haven’t

created a Scenario from the current data. Simply Hide or delete it from the Summary if it is not needed.

Important Information:

Scenarios operate on one sheet. That is to say the Input and Output cells for a Scenario Summary must reside on the

same worksheet. This is an important consideration in the design of large multi-sheet models.

4.5.12.2 Scenarios Drop-Down List

One problem with Scenarios is that it’s a bit awkward to constantly go Data | Data Tools | What-If Analysis | Scenario

Manager… | Show to jump back and forth across the scenarios. Excel offers a simple solution to this problem:

1. Right mouse the Quick Access Toolbar (QAT) and select Customize the Quick Access Toolbar. Excel now displays

the Excel Options Customize window.

2. Select Commands Not in the Ribbon from the Choose commands from drop-down box.

3. In the left hand pane, scroll down and select Scenario (see Figure 4-42).

Figure 4-42: Excel Options Customize window.

1. Click the Add > > button (see Figure 4-42). Scenario should now appear in the right-hand pane (see Figure 4-43).

Click OK to close the Excel Options window.

Page 49: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

49 Figure 4-43: Scenario (Scenario Gallery) added to the QAT.

Figure 4-44 shows the Scenario control (green button) and its drop-down list in the QAT:

Figure 4-44: Scenario Drop-Down List.

18. Add a Scenario Drop-Down List to the Model worksheet.

19. Check the Original Data scenario.

20. Save: WIV -2 Solution.

Page 50: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

50 4.5.12.3 Add Scenario Labels to the Model

An alternative or supplement to the Drop down List displays the active Scenario title directly on the worksheet. This

modification may be particularly useful when you begin to think about printing the model or “pasting” it into a report.

First add an Original Data scenario label and name the cell.

21. Open: WIV -2 Solution.

22. Activate the Model worksheet, hide all other worksheets.

23. Ensure the Original Data scenario is active.

24. Activate cell A1 and type: Scenario:

25. Select cells A1:C1, apply the Fill Color: Dark Blue, Text 2, apply the Font Color: White Background 1, apply the

Font Size: 16 and bold.

26. Activate cell B1 and type: Increased Promotion. Widen column C as necessary so that the entire label is visible

across cells B1:C1. Replace the text with Original Data.

27. Select cell B1 and name it: Scenario.

Next add the scenario label to the Original Data scenario Changing Cells. This ensures that when the scenario is changed,

the worksheet label change as well.

28. Open Scenario Manager.

29. With the Original Data scenario active, click Edit, point to the Scenario name cell to add it to the Changing cells

field as shown in Figure 4-45, delete any additional Comments added,click OK.

Figure 4-45: Scenario label added to the Original Data scenario changing cells.

30. Click OK and note that the scenario label now appears in Scenario Values (see Figure 4-46).

31. Click OK to accept the edit and close Scenario Manager.

Page 51: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

51 Figure 4-46: The scenario name has been added to the Original Data Scenario Values.

Finally, add the remaining scenario labels to their respective scenarios.

32. To add the remaining scenario labels, first select the scenario using the Scenarios drop-down list, type the

name of the scenario in cell B1 and repeat the steps above for each scenario. Ensure you type the correct

scenario names in cell B1. When a scenario is now selected, its label should also change as shown in Figure

4-47.

33. Unhide the sheet Scenarios to check your results

34. Save: WIV -2 Solution.

Figure 4-47: The scenario label updates to indicate which Scenario is active.

Page 52: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

52 4.5.12.4 Combining Goal Seek with Scenarios

Question 4-11: Using Goal Seek to help create a scenario.

Suppose Bob has the opportunity to renegotiate his rent. Assume for simplicity that all of the fixed cost is ($19,500) is

rent. After thinking a bit Bob wants a scenario showing the rent he needs to pay if he wants to generate a target profit of

$2,000 per quarter even if he only sells 1,700 widgets per quarter.

1. Unhide the sheet Rent Reduction. Activate Data so you can access What If Tools.

2. Create the Scenario Rent Reduction. Hint – use Goal Seek to help find the required rent reduction.

3. Unhide the sheet Rent Answer to compare answers.

If you have difficulties an outline of the answer is provided below.

Answer

1. Input Targ Qty 1,700 in B11.

2. Use Goal Seek to find the required rent for Net Income (E30) of $2,000 per quarter.

Figure 4-48: Goal Seek to find the required profit level

3. Select OK to accept the new values.

4. Create the new scenario starting with:

Page 53: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

53 Figure 4-49: Adding the new scenario.

5. The values 1,700 and the Goal Seek results are already inputted so add the scenario label then OK.

Figure 4-50: The Scenario values.

6. Unhide the sheet Rent Answer and review the settings if you have problems

.

•Remember that scenarios are sheet specific. This means that the inputs and outputs for the secnario must be on the same sheet. So for example when you created the Rent Reduction Scenario this only impacted the sheet Rent Reduction. Scenarios and Scenario Summaries genereated from other sheets are not altered.

Note

Page 54: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

54 4.5.13 Documentation and Input Validation

An old joke goes, “The hidden danger in “assume” is that you can make an ASS out of U and ME if you don’t understand

what you are assuming”. Even simple models need to provide some documentation and validation while complex

models demand careful documentation (and “validation”) lest you become the butt of the joke!

Documentation

In small models like Bob’s widgets careful use of names and Cell Comments as illustrated below may be all the

documentation required. In large complex models documentation will be much more important (a common strategy in

many multi-sheet models is to devote a worksheet to documentation). However, if small model are passed on to third

party users it is incumbent on the developer to ensure the user understands the model.

Figure 4-51: Original Data inputs.

Limits

The Scenarios considered in the previous section suggest that simply changing one input cell without reference to other

inputs may be dangerous. Recall Bob’s thinking:

“I think a price cut of 5% might lead to 25% more target sales. On the other hand, an extra $500 per quarter for

billboards might cause an increase of 20%. In target sales”

The resulting Scenarios are a kind of limitation on the model. Bob is really expressing ideas about the nature of demand

for the product. The assumptions are not really independent of each other. A lower price might lead to more target sales

or more advertising might cause more target sales.

Page 55: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

55 4.5.13.1 Model Review

Think about two assumptions - Unit Variable Cost, B6, and Total Fixed Cost, B9:

Define these terms as you understand them in this problem.

Next review the picture and charts that follow.

Come up with two important issues, one for Unit Variable Cost and one for Total Fixed Cost that suggest a

relationship between these values and the value of Target Quantity, cell B11.

Here are two useful definitions:

Unit Variable Cost: variable cost to produce one unit of output – think materials and labor.

Total Fixed Cost: the cost that occurs even if zero output is produced in a given period of time. In general, the

fixed cost relates to the “scale” or “capacity” of the operation.

Now keep the definitions in your head. Think about ideas discussed in Managerial Accounting, Microeconomics,

Marketing, or Operations Management. Review the picture and chart on the next page ask:

a. Why might the Unit Variable cost value be related to the quantity of widgets sold?

b. Is there any reason to make a connection between the Total Fixed Cost the quantity of widgets sold?

Figure 4-52: Bob’s Widgets flow of funds and activities (Original Data scenario).

$19,500 Rent to Landlord

$20.00 Paid in Labor, Materials

& Shipping

$30.00 into the Cash Register

Widgets are Sold

$10.00 Contribution

towards Rent & Advertising

Flow of Funds & Activities

$600 BillboardAdvertising

Page 56: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

56 Figure 4-53: Bob’s Widgets revenue vs. total cost, revenue at QtyBE and the profit/loss regions (Original Data scenario).

The picture and chart, in combination with the definitions suggests some interesting ASSUMPTIONS. For example:

The figures suggest a “physical limit” to the firm. It does not make sense to input ever increasing values of

Target Quantity and assume the firm can produce this much output. There is a capacity constraint.

The Break Even Chart may be more helpful when it comes to Unit Variable Cost. The “linear cost relation”

suggests that “to produce an extra unit of output always results in the same increase in costs”. Consider three

possibilities:

As production rises the firm may get a discount for volume purchases of material which reduces the

variable cost per unit.

The famous law of diminishing returns says that as output rises from zero, the labor cost rises slowly

because of the firm’s increased productivity through specialization of tasks but beyond a certain point,

costs rise quickly when more labor is added to generate more output.

Perhaps increased output is accomplished by adding a “night shift” which may require higher wage

rates and often means lower productivity causing unit costs to rise.

These criticisms do not invalidate the model. They simply indicate that some type of limitations should be placed on the

inputs.

(30,000)

(10,000)

10,000

30,000

50,000

70,000

90,000

110,000

130,000

0 400 800 1,200 1,600 2,000 2,400 2,800 3,200 3,600 4,000

Do

llar

s, $

Quantity of Widgets Produced

Bob's Widgets at Break-Even

TC

Revenue

Net Income2,010 widgets

$60,300

Profit

Loss

QtyBE

Page 57: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

57 4.5.13.2 Cell Comments

First, add a comment advising that Billboard Advertising is up for renewal but nevertheless it should be no less than

$600 per quarter.

5. Open: WIV -3 Validation and Protection.

6. Save as: WIV – 3 Solution.

7. Activate the worksheet: Model and hide all other worksheets.

8. Add the cell comment as shown in Figure 4-54.

Figure 4-54: Cell comment advising the user.

4.5.13.3 Data Validation

Suppose Bob feels that labor productivity is fairly constant for production levels between 1,500 units and 2,500 units.

And to keep things simple, assume that 2,500 widgets/qtr represents the physical capacity of the operation. Bob also

knows, that based on historical operating variances, Unit Variable Cost of $19.80 has not varied by more than ± 10%.

Excel’s Data Validation feature will be used to ensure that a user does NOT:

Input fractions of widgets (ROUNDUP to whole units was added the Break Even Quantity so it makes sense to

treat the Target Quantity the same way).

Input values outside of the 1,500 to 2,500 range this meets the needs of “constant productivity” and the

“capacity constraint”. The feature will also be used to ensure that a user does not input values outside of the

$19.80 ± 10% Unit Variable Cost range.

The Data Validation tool assigns one or both of the following to an Input cell:

Create an Input Message (similar to a cell comment) that displays when the user activates an input cell; and/or

Create an Error Alert (Stop, Warning or Information) that, in varying degrees of “benevolence”, informs (or

prevents) a user from making an incorrect input.

First, create an Input Message about the Target Quantity productivity and capacity range.

1. Open: WIV -3 Solution.

2. Activate the worksheet: Model, hide all other worksheets and activate B11.

3. Select Data | Data Tools | Data Validation.

4. Input the Settings tab, as shown in Figure 4-55.

Page 58: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

58 Figure 4-55: Data Validation Settings for the Target Quantity productivity and capacity range (used later in the Error Alert).

5. In the Input Message tab, input the information as shown in Figure 4-56. This creates the Input Message.

Figure 4-56: Data Validation Input Message for the Target Quantity productivity range, capacity and whole unit inputs.

When the Target Quantity value cell is activated, the Input Message should appear as shown in Figure 4-57 (note a line

break was added between the Title and the Input message:

Page 59: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

59 Figure 4-57: Data Validation Input Message.

Bob has passed on his data validated worksheet. Unfortunately the users are still making incorrect inputs and

disregarding the Input Message. Bob would like to prevent this.

6. Activate B11, Select the Data Validation Error Alert tab and input the information as shown in Figure 4-58.

Figure 4-58: Data Validation Error Alert input.

Page 60: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

60 Incorrect input displays the following Error Alert message:

Figure 4-59: Data Validation Error Alert: Stop message.

In Bob’s situation this is the best method he can use to prevent incorrect inputs.

7. Test the Error Alert - input 1500.3 widgets/qtr in the TargQty cell (try other inputs such as: 1400, 2600, 1500,

and 2500). The Error Alert in Figure 4-59 should be returned whenever an incorrect input has been made.

8. Select Data Validation and change Stop to Warning. Test 1,200 in B11.

Figure 4-60: Data Validation Error Alert: Warning message.

This message warns the user, lets the user continue on by selecting the Yes button and make the incorrect input – not

really of much use in Bob’s situation. The No button stops incorrect input.

The third possibility is to change Warning to Information. Test Information. Do you see that it is “weaker” than

Warning?

Question 4-12: Data validating the Unit Variable Cost.

Data Validate the Unit Variable Cost input by:

Allowing input values to dollars and cents.

Informing the user about the acceptable range of inputs.

Preventing a user from making an incorrect input.

Answer

9. Unhide the worksheet: Data Validation and compare to your Data Validation. Note that in the Settings tab Excel

does the math for the $19.80 ± 10% calculation.

10. Save WIV -3 Solution.

Page 61: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

61 Observations:

To remove Data Validation, select the cell with Data Validation and in the Data Validation dialog box, click on

the Clear All button.

Work in Progress: Microsoft is working on two new features Data Validation| Circle Invalid Data and Home |

Editing | Find & Select: Data Validation. They are “works in progress” as of December 2007 and not really

relevant to Validating Inputs so it is probably best to ignore these for now.

4.5.13.4 Conditional Formatting

Bob wants to ensure that before the changing the shipping expense, the user consult with him. Data Validation could be

employed (as could Protection). Instead, to introduce another Excel tool, the following solution will be implemented.

Conditional Formatting will trigger a change in cell fill and font and an IF function will provide the appropriate on screen

information when shipping cost is altered.

1. Open WIV -3 Solution.

2. Select the worksheet: Model and hide all other worksheets.

3. Activate B7 and apply Home | Styles | Conditional Formatting | Highlight Cell Rules: More Rules…

4. Create the inputs as shown in Figure 4-61. Choose Font and Fill colors that contrast well. The cell will be

highlighted when the user inputs anything other than 0.2.

Figure 4-61: Conditional Formatting Rule for shipping.

5. Activate D7 and input the IF function shown in Figure 4-62. Apply a suitable font color to the text.

Page 62: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

62 Figure 4-62: If function formula to inform the user about talking to Bob first before changing shipping.

6. Unhide the worksheet: Conditional Formatting for comparison.

7. Save WIV -3 Solution.

Conditional Formatting provides the visual cue (Conditional formatting) and IF gives directions.

To edit, delete or add a new rule select Home | Styles | Conditional Formatting | Manage Rules… as shown in Figure

4-63:

Figure 4-63: Conditional Formatting Rules Manager.

Page 63: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

63 4.5.14 Worksheet Protection

The great danger remaining is accidental type over of the formulas. Excel allows various levels of protection to deal with

this possibility. The most common strategy for protection is outlined in Figure 4-64 (more stringent protection can be

implemented).

Figure 4-64: A basic strategy for setting protection.

A Method for implementing protection

First make sure the Input cells are unlocked:

1. Open WIV -3 Solution.

2. Select the worksheet: Model and hide all other worksheets. Select the input cells: B5:B9, B11, Right mouse

Format Cells| Protection| uncheck the Locked check box.

Figure 4-65: Unlocked input cells.

Input cells are unlocked to

allow users to vary inputs

and play what if.

These sections will be

worksheet protected so that

users cannot corrupt or

delete formulas.

Page 64: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

64 Next, lock the remainder of the worksheet by protecting it:

3. Mouse over the Review | Changes | Protect Sheet button. Read and understand the ScreenTip information

4. Click on the Protect Sheet button and in the Protect Sheet dialog box (see Figure 4-66), accept the default

settings and click OK. DO NOT input a password to protect the worksheet.

5. Test the worksheet protection by trying to input a contribution of $40 in cell E16. Try changing a few inputs –

no warning message. This indicates that worksheet protection is working properly.

6. Undo any changes you made to the inputs in Step 6 above.

7. Save WIV -3 Solution.

Figure 4-66: Protect Sheet dialog box.

DO NOT DO THIS IN THE EXERCISE:

Question 4-13:

What if you need to unprotect the sheet? Can you see the solution in the protection group?

Answer

Figure 4-67: ScreenTip about removing worksheet protection.

Page 65: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

65 4.5.15 Beyond the Basics

Bob’s Widgets covered a lot of material. You started with paper and pencil and used tools from virtually every one of

Excel’s “ribbons” to produce the finished product. Each aspect of the model could be the source of many elaborations.

This section concludes our tour of modeling by going “beyond the basics” for three of these. The first two, layout and

names, are required ideas for the course. They will be employed over and over again in the Module and because we feel

they are he most helpful in your development as a user. The third is OPTIONAL it gives you a taste of what you might run

into as you progress.

4.5.15.1 The Layout of more complex models

The t-layout has served us well but you may be thinking:

“The basic answer to Bob’s break in can be calculated quickly in any business person’s head. So will the t-layout

be of any value in more complex models?”

The authors believe the answer is an emphatic “yes”. Understanding the business problem (using charts, pictures and

English) along with the “t” is the methodology burned in our brains. It forms the starting point for all our models - no

matter how complex.

4.5.15.2 Single sheet models

Visicalc, Bricklin’s original software, had but one sheet. So building complex models that were efficient and effective

required a diamond down (the t-generalized). These models often required multiple input and output sections flowing

upper left to lower right as shown in Figure 4-68.

Figure 4-68: Single worksheet multi-section model.

The diamond down stresses that the model should be built so that:

Each section contains similar (related) material.

Material from earlier sections flows down to be used in later sections. Following the logic of

Input/Process/Output, the Sections in the upper left contain Input (and Documentation), then come Process

sections, which use information from earlier sections to perform various calculations. In some models, the

Output is displayed on the screen as indicated; but in other situations, sections are not used in Output reports or

display.

Section 1

• Break-even inputs

• Capital Budgeting inputs

Section 2

• Break-even outputs.

Section 3

• Capital Budgeting outputs.

Page 66: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

66 4.5.15.3 Multi-worksheet models

As newer programs, Lotus and Excel, replaced Visicalc users gained the ability to build multi-sheet workbooks. Those

understanding the daimond down found it easy to adapt. If you understand the basic idea behind the diamond down the

three layouts that follow should be pretty straight forward.

Larger models may require multiple input, process and output worksheets. Here, diamond down layout sections are

replaced by individual worksheets. Data generally flows from left to right, worksheet to worksheet as shown in Figure

4-69.

Figure 4-69: A multi-worksheet model.

Figure 4-70 illustrates a single inputs/outputs worksheet, multiple process worksheets and an output summary

worksheet. The process calculations in the Income, Balance Sheet and Cash Flow statements are interrelated (i.e.,

calculations from one workhseet are used by another as inputs) and use values in the inputs section of Worksheet 1

(e.g., CCA rate).

The inputs/ouputs worksheet is used for two purposes. Firstly, it gathers together summary information from spearate

sheets (some relating to the Income Statement and some from the Balance sheet) to allow for an overview. Secondly,

the designer of the model is aware that Scenarios require the inputs and outputs for a Scenario Summary to be on the

same sheet.

Figure 4-70: An interrelated multi-worksheet model.

Worksheet 1

• Inputs (Financial Assumptions)

Worksheet 2

• Inputs (Sales Forecast)

Worksheet 3

• Inputs (Wages and Equipment Purchases)

Worksheet 4

• Outputs (Receipts/Disbursements Cash Flow)

Worksheet 1

• Inputs (e.g., CCA rates)

• Outputs (e.g., Ratios)

Worksheet 2

• Income Statement

Worksheet 3

• Balance Sheet Statement

Worksheet 4

• Cash Flow Statement

Worksheet 5

• Outputs (e.g., Scenario Summary)

Page 67: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

67 A third multi-worksheet model uses 3-D cell references (the keystrokes will be demonstrated in a later section of this

Module). This layout is appropriate when the goal is to summarize input from a series of identically laid out worksheets.

Consider Error! Reference source not found.. The data flows backwards to the summary worksheet from the multiple-

worksheets.

The layout for Worksheets 1 to 4 is exactly the same so results in the same cell from each worksheet may be added in

the Summary Worksheet in a single cell (e.g., the total hours for the Acme account appears in the same cell reference on

Worksheets 1 to 4 and is added in a cell in the Summary Worksheet using a few keystrokes).

Figure 4-71: A multi-worksheet model with 3-D cell references.

4.5.15.4 Watch Window

Consider the following multi-sheet model.

Formulas on the Cash Flow statement may use inputs from Worksheets 1 through 3. For example those of you familiar

with accounting and finance will know that the latter three worksheets:

Are interdependent (i.e., one Statement uses values from another Statement in its calculations; e.g., Inventory

from the Balance Sheet and Materials Expense from the Income Statement are used in Cash Flow Statement

calculations and in turn the increase/decrease in cash flow is used in the Balance Sheet cash account

calculation).

Use financial assumptions from the Inputs (e.g., Tax Rate, Revenue Growth Rate, depreciation Rates).

Calculations are summarized in an Outputs section, i.e., key financial indicators that use values from the

Statements (e.g., Return on Sales uses Net Income and Revenue from the Income Statement in its calculations,

Current Ratio uses Current Asset and Current Liability account values in its calculations).

In this situation you may find yourself switching back and forth from one worksheet to another to view calculated

values. The freeze panes, split and new window features will not solve this problem easily, if at all.

Worksheet 4

• Week 4 Timesheet & Billings

Worksheet 3

• Week 3 Timesheet & Billings

Worksheet 2

• Week 2 Timesheet & Billings

Worksheet 1

• Week 1 Timesheet & Billings

Summary Worksheet

• Weeks 1 to 4 Timesheets & Billings

Worksheet 1

• Inputs (e.g., CCA rates)

• Outputs (e.g., Ratios)

Worksheet 2

• Income Statement

Worksheet 3

• Balance Sheet Statement

Worksheet 4

• Cash Flow Statement

Worksheet 5

• Outputs (e.g., Scenario Summary)

Page 68: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

68 A Watch Window creates an always visible window that displays the value of any cell, on any worksheet that you

choose to watch. To enable this feature apply: Formulas | Formula Auditing | Watch Window. Add cells from any

worksheet to the Watch Window by selecting the cell and clicking on the Add Watch button in the Watch Window or

delete a cell from the Watch Window by selecting it from the list and clicking on the Delete Watch button:

Figure 4-72: Watch Window and the Add Watch and Delete Watch buttons.

In the figure above, the values used to calculate the Current Ratio have been added to the Watch Window. Any change

in the Inputs that changes the cell values listed will be automatically updated. Imagine trying to do this with freeze

panes, split or a new window – this is a real time saving feature for interdependent multi-sheet models.

4.5.15.5 Conclusion

The decision to go with one large worksheet or several sheets is partly a matter of taste (and ease of printout) and partly

a function of Excel. But no large model can be built without a good understanding of the basics. As you proceed through

the course you will employ all the layouts above. The better you understand the t layout and excel tools explored in

Bob’s Widgets the easier your progress.

Page 69: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

69 4.5.16 More on Names

Bob’s break even used names to input formulas. This section reviews this idea briefly and introduces a few more

features of names to add to your repertoire. This material will be more than sufficient for this course and most give you

some insight into more complex uses of names. If you need more information on Names Excel Help is a good starting

point for further research. The Help material is quite useful (beyond the Shakespeare takeoff).

4.5.16.1 The Basics – a review

The key ideas in the break even model were:

a. Input short but useful labels in the Input cells (Price, uvc ,and tfc);

b. Use Define Create from Selection or the Name Box to define names;

c. Input formulas using any/ or all of three ways:

Use point and click – Excel converts to names.

Type the name assisted by the F3 (“Paste “Name”) key or Defined Names| Use in formula.

Type “part” of the Name and use Formula AutoComplete to complete entry.

d. Use the Name Manager to delete any problem names.

4.5.16.2 Guidelines for creating useful names.

The names in the break even are typical. Remember the purpose of the names is to aid in formula input not to mimic the

final display of the model’s labels. With this in mind here are a few guidelines for creating sensible names:

a. Names are short, generally a minimum of 3 characters and maximum of 6 or 7 (it is possible to use one letter

names except for C and R which Excel reserves for itself).

b. Remember once names have been set you can overtype cell labels with more user friendly labels when making

the work presentable.

c. Names begin with letters, not numbers (Coll30 not 30Coll).

d. Names cannot be confused with cell references (Coll30 not CO30).

e. Names should be meaningful. One of the authors, an economist uses lots of “rates” in models. So “drate” for

discount rate, “irate” for interest rate, “xrate” for exchange rate etc. work well for him.

f. Names are not case sensitive but it’s easier to read names if they are not all capital letters (Excel uses caps for

A10 in cell references);

g. Avoid special characters and blanks in names (Excel will connect blanks with the underscore so Total Cost

becomes Total_Cost);

h. Names should be unique in each workbook until the modeler is very comfortable with the differences between

global and local scopes for names.

Page 70: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

70 4.5.16.3 Names default to absolute references with a global (workbook) scope.

Excel assumes that most of the time users want to create names to be used anywhere in a workbook. So Create from a

Selection and Name Box default to absolute references applied at a global (workbook) scope. This is a perfectly sensible

approach especially the aim is to build multi-sheet models.

Now to explore the meaning of global scope and (and review the techniques)…

1. Open: WIV -4 More on Names.

2. Activate Create Names and select the Formula ribbon.

3. Select A5:B7 then Defined Names| Create from Selection| OK

4. Activate B9 Click in the Name Box and input TargQty then Enter.

Now to get a feel for workbook scope:

5. Activate Create Names, Select E14 and input =Price-uvc. The formula works.

6. Activate Create Names, Select E20 and input =Price*TargQty. The formula works.

7. Activate Test Names, Select B2 and input =Price*TargQty. The formula works on this sheet too!

8. Select Name Box and “go to” Price back to the sheet Create Names.

This is the essence of global (workbook) scope. Global names can be employed to input formulas on any worksheet and

can be accessed as a “go to” from any sheet.

4.5.16.4 Name Define or Name Manager| New to define local (worksheet) scope names.

This method is used less frequently and of less interest to newer users. On the other hand it offers a richer variety of

choices. In particular it allows users to choose the scope of the name.

1. Activate Create Names, Select E14, Select Define Name.

2. Edit the Dialog box as shown below (note the Scope setting):

Figure 4-73: The scope of a name.

Page 71: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

71

3. OK.

4. Select E17 and input the break even formula =tfc/contrib.

5. Activate Test Names, Select B5 and input the break even formula =tfc/contrib.

6. Use Evaluate Formula if you are unclear as to the problem.

Can you use contrib. as a "go to" on the sheet Test Names?

Do you see what limiting the scope has accomplished?

To be sure:

7. Select Name Manager. Compare the entries for “tfc” to “contrib.”.

4.5.16.5 Editing and Deleting names.

Editing

The key limitation on editing is that the scope of the name cannot be changed.

1. Activate Create Names.

2. Name Manager Select Edit and edit TargQty to the shorter TQty.

3. Check the edit by examining E20.

Now suppose you want to use “contrib.” throughout the workbook so the scope needs to be edited.

4. Select Name Manager Select contrib. then edit the scope of contrib to workbook.

Excel will not edit the scope (a useful restriction). The alternative is:

5. Delete

6. Select Name Manager|Delete contrib.|New next edit to create the workbook scope cont.

Unfortunately deleting means you need to correct any formulas using the contribution value as input. In this case you

must make edits on both Create Names and Test Names –this can be a real pain in a large model.

•The moral of the story is that it's far better to think through your names carefully, regarless of scope, before tyuo get into major editing or deleting.

Critical Idea

Page 72: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

72 4.5.16.6 Applying Names after formula input

Sooner or later the follow situation will arise. A model has been started and some formulas built. Then the modeler

decides define some names (local scope in this case) for the input cells. The problem is that the names do not display.

1. Unhide Apply Names.

2. Use Ctrl+` to view the formulas. No names appear.

3. Use Ctrl+` to return to the normal display.

4. Select A3:B5 then Create from Selection

5. Examine the formulas. Still no names.

6. The solution to this problem is to Apply names:

7. Select the whole worksheet

Figure 4-74: Selecting the worksheet.

8. Select the down arrow to the right of Define Names and select Apply Names.

9. Select irate, prin and term then OK:

Figure 4-75: Applying the names.

10. Check the formulas.

11. Save WIV – 4 Solution.

Click on the the upper corner of the sheet to "select all".

Page 73: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

73 4.5.16.7 Defining names on a range of contiguous cells

Names can be defined on a range of contiguous cells using the Name Box (most common) or via Define Name| New

Name. Create from Selection does NOT WORK for this purpose.

1. Unhide the sheet Shipping_Costs.

Illustration #1: Shipping Cost estimator

Acme Leets has a graduated scale for determining tits shipping costs. Higher volume generate discounts for customers

1. Input 10,000 in B3: For those who order less than 20,000 tons Acme charges $.40 per ton. Excel calculates

shipping cost as $4,000.00;

2. Input 30,000 in B3: On the first 20,000 tons the base charge is $.40*20,000 =$8,000 while the incremental

10,000 tons are charged at $.375 per ton so the total cost is $11,750.00;

3. Input 50,000 in B3: On the first 40,000 tons the base charge is $.40*20,000 +$.375*20,000 = $15,500 while the

incremental 10,000 tons are charged at $.350 per ton for a total cost of $19,000.00.

In order to build the formulas a LOOKUP() was selected for D5, E5, E8, and E9.

If you do not understand how the lookup works use Help or Evaluate Formula.

It’s common practice to assign names to ranges like F16:H20 for Input and interpretation purposes. The formulas have

already been inputted so:

4. Select F16:H20 then use the Name box to name the range Rate_Table. (This assigns a workbook scope name).

Figure 4-76: Defining Rate_Table.

5. Select rows 1 through 14.

6. Use Formulas | Define Names |Apply names for Rate_Table and Order You should have Figure 4-77.

Page 74: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

74 Figure 4-77: The final formulas.

7. Hide the sheet Shipping_Costs.

Illustration #2: Adding Information to a Range

1. Unhide the sheet Test.

2. Select Cells B5:B13.

3. Use the Name box to name the range Test.

4. In D13 input =SUM(Test).

5. In B4 input 2. This has NO impact on the sum.

6. Delete the 2 from B4.

7. Insert a row at B6.

8. In B6 input 2. Does this have any impact on the SUM?

The point is that information is inserted to a range the name updates to include the new material. When information is

appended above or below the range the name does not update. What do you suppose happens if you delete row 6?

9. Save the file and Hide the sheet Test.

4

5

6

7

8

9

10

11

12

13

14

D E

Base Cost

="Cost on first "&TEXT(VLOOKUP(Order,Rate_Table,1),"000,0")& " tons" =VLOOKUP(Order,Rate_Table,3)

Incremental Cost Calculation

Incremental Rate per ton =VLOOKUP(Order,Rate_Table,2)

Incremental tons =Order-VLOOKUP(Order,Rate_Table,1)

Incremental Cost =E8*E9

Total Shipping Cost =E5+E10

Cost per ton shipped =E12/Order

Page 75: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

75 Illustration #3: Quarterly Net Income Model

Suppose want to create multiple sheets (perhaps to be consolidated) that project net income for regions. This situation

illustrates a nice way to use named ranges with scope set to a single sheet.

1. Unhide the sheet Template.

2. Select B4:E4 then Formulas |Define name as Revenue set scope to Template as illustrated:

Figure 4-78: Defining Revenue as a local name.

3. Select B12:E12 then Formulas |Define name as Expenses set scope to Template.

4. Select B14:E14 input =Revenue-Expenses then Ctrl+enter.

5. Make a copy of Template and rename it as North.

6. Edit the title as shown in Figure 4-79.

7. Examine E12 and Formulas| Name Manager to verify the locally scoped names are on North.

Figure 4-79: North Region Sheet.

8. Save the file.

Revenues and Expenses could be inputted into North…

Page 76: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

76 4.5.16.8 (Optional Extension) Using locally scoped names and 3-D references to create a summary

The results above suggest that it should be easy to create a summary sheet (to add West and East). It is indeed easy to

do provided you also remember how to input 3-D references and use “Ctrl+enter”. Here’s how:

9. Make three copies of Template rename them South, East and West.

10. Rename Template as Summary and organize your sheets as in Figure 4-80 (this is not really necessary but it’s

clean).

11. Activate Summary and edit the title in A1 to indicate All Regions.

Figure 4-80: Create the summary sheet.

12. Activate Summary.

Page 77: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

77

13. Use Ctrl to select all the Revenue B4:E4 and Expense B7:E11 (not the Profit calculation) as in Figure 4-81.

Figure 4-81: Ctrl to select all the value cells for Revenue and Expenses

14. Note carefully the active cell –based on this selection it is B7 the labor cost cell.

Now to create the 3-D formula

15. Use point and click (BUT DO NOT ENTER) to input the 3D formula =sum(

16. .Activate North then click on B7 to get:

17. Hold down Shift and click the West tab to get:

18. Input ) to close the sum then Ctrl+enter. Save the file.

Page 78: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

78

19. Activate Summary then Review |Protect Worksheet (don’t add a password) so you don’t accidentally over type

formulas.

20. Activate North input 100 in B4. Repeat for South, East and West.

21. Activate Summary the sheet should appear as Figure 4-82. If it doesn’t delete your formulas and re-enter.

Figure 4-82: The Summary sheet tested.

22. Save the file.

For most new users this really is “beyond the basics” but can be readily understood based on three key ideas (Ctrl+enter,

3-D references, and the scope of names).

4.5.17 (Optional) Comments on Excel Error Messages

Inevitably building formulas leads to an of Excel error message (e.g., #N/A, #VALUE!, #REF!, #DIV/0!, #NUM!, #NAME?,

or #NULL!). Typical causes for the errors include incorrect: input, failure to exploit optional function arguments or

problems with names. These messages are very useful and can often be “fixed” with a few key strokes or a slight rework

of material. The error can be “trapped” to return a label, value or blank. The trapping isn’t perfect and sometimes the

error is quite complex (especially if the modeler has not used a sound design methodology). On the other hand many

“common problems” ca be dealt with by using the optional arguments in functions and/or using Logical and Information

Functions.

4.5.17.1 Understand the use of optional arguments

The basic problem is that the user has not set up the function carefully so Excel DOES NOT report a serious error when

input mistakes are made.

1. Unhide the sheet LOOKUP.

The Model calculates the union dues owed by the worker. The firm has four unions each with its own dues rate as

shown in the Union Dues table. The lookup in E4 uses only the required arguments. Excel traps the problem with Alice

and returns #NA since D7 is blank. This may lead the user to think Excel has trapped all the problems! But what if an

inputs an incorrect union code is inputted?

Page 79: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

79 First, test and compare Version 1 and Version 2. Then attempt the question.

It is possible to trap for both the blank cell and the BUSA problem but that’s a topic for another day. The point is that

when using function make sure you understand how to “fine tune” them with optional arguments.

4.5.17.2 Using Logic and Information Functions to error trap

Many input errors depend upon the type of contents (blank, value or label). Logic and Information functions are often

useful in this situation. A look at Insert Function reveals several of these functions (see Figure 4-83).

Figure 4-83: Logical and Information Functions.

These functions require some thought and often the effort to trap everything is more trouble than it’s worth. But let’s

see if we can do a bit more trapping on our Union Dues model using logic (IF) and Information (ISBLANK) tools.

1. Unhide the sheet Logic and Information Fcns.

2. Use Evaluate Formula to see how the logical and information function work.

•This is only a brief introduction to error trapping methods. If you want to see another example using IFERROR go to the FF Files folder and open Cdn Mortgage Calculator. Notice that IFERROR is used in cells E23, E25, and E26.Input 600 in cell B9 and observe the trapping by IFERROR.

Note

Page 80: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

80

5 Exploring various models

This section provides information on a variety of issues. We begin by considering Grouping and 3-D references to build a

model that summarizes a series of (similar) worksheets. The remaining sections focus on a variety of model components

used in many business applications. These applications explore key groups of functions shown in the Formula| Function

Library.

Figure 5-1: The Function Library

The material presented will be discussed in Lectures and your instructor will cover those elements felt most important

for your program.

5.1 Multi-Worksheet Model: Grouping & 3-D Cell References Many models consist of a number of worksheets with a similar layout as shown in Figure 5-31. Users input billable hours

on the weekly worksheets. The weekly results are then summarized (via 3_D reference formulas) on the Summary

worksheet.

Figure 5-2: Model layout.

Figure 5-3and Figure 5-4 give the details of the model.

1 Adapted from J. Gips: “Mastering Excel – A Problem Solving Approach”, Second Edition, Computer Exercises, Q. 8-1, p. 134.

Worksheet 4

• Week 4 Timesheet & Billings

Worksheet 3

• Week 3 Timesheet & Billings

Worksheet 2

• Week 2 Timesheet & Billings

Worksheet 1

• Week 1 Timesheet & Billings

Summary Worksheet

• Weeks 1 to 4 Timesheets & Billings

Page 81: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

81 Figure 5-3: Duplicate worksheets with the same layout (Week 1 to Week 4).

Figure 5-4: the Totals worksheet.

The methodology for creating such models follows three steps:

a. Use Grouping or Copy the Worksheet to create the worksheet labels.

b. Group the sheets and use Shift or Ctrl techniques to efficiently input formulas on each sheet.

c. Use 3-D references to create “drill down” summary formulas on the Summary Sheet.

Page 82: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

82 5.1.1 Group or Copy to create multiple sheets

There are two ways to create a series of similar sheets. One way is to groups the required number of sheets (in this case

five) and input the Week 1 sheet then ungroup the sheets and edit for the differences.

The alternative method, explained below, is to input one of the sheets, Week 1, make copies and edit the copies.

To save time the sheets have been made up in the file:

1. Open the file: MSV - 1 Grouping (contained in the MS Files folder).

2. Save as MSV – 1 Solution.

Creating the worksheets.

The first step is to create the summary worksheet as shown in Figure 5-4. The next step is to copy the worksheet. Label

the summary worksheet: “Totals” and its copy: “Week 1”. In the Week 1 worksheet, change the title from “Monthly

Total” to “Monday”. Next, select cell B4 and drag across to copy the cell to adjacent columns until the ScreenTip

“Monday” appears. This creates a title for each day of the week. Next, edit the last “Monday” title to read “Week Total”.

Next, drag cells B3:C3 across to P3:Q3 to complete the top border of the day titles. Merge cells B3:O3 and add the

centered text “Week Day”. Select cells B5:C16 and drag across to the Week Total column. With all columns in place,

AutoFit the column widths, clean-up any border formatting etc. as necessary. The worksheet will appear as shown in

Figure 5-3 without the hourly inputs.

Next, make 4 copies of the Week 1 worksheet and re-label them Week 2, Week 3 and Week 4. In the Week 1 worksheet,

assign the Workbook name “rate” to cell B1. Of course, the next step is to input the weekly and daily hours until all 4

weeks contain the billable and non-billable hour’s values.

5.1.2 Group sheets and input formulas simultaneously

The next challenge is to input formulas in each weekly worksheet. This is when worksheet grouping and the “old” Ctrl +

Enter formula entry technique proves their worth.

Create the Week 1 to Week 4 Formulas using multi-sheet selection, non-contiguous cell selection and Ctrl + Enter.

3. Open MS - 1 Solution (contained in the MS Files folder).

4. Click on the Week 1 worksheet and Shift + click the Week 4 worksheet to group them (see Figure 5-5).

5. Make a non-contiguous selection of the $ Charges cells as shown in Figure 5-5, input the formula as shown and

press Ctrl + Enter. This inputs the formula in the selected cells of all grouped worksheets (see Figure 5-6).

Page 83: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

83 Figure 5-5: Non-contiguous selection of the $ Charges cells and formula input.

Figure 5-6: $ Charges formula input in all selected cells and worksheets.

6. Click on any other grouped worksheet to view the $ Charges formulas.

Question

Consider the formulas for cells P6:P10 and Q6:Q10. Can these be inputted simultaneously or will you have to input the

column P formulas then the column Q formulas?

Answer

The formula for cell P6 is =SUM(B6,D6,H6,J6,L6,N6) or =B6+D6+H6+J6+L6+N6. Since all the cells are relative references if

we use Shift to select P6:Q10 Excel should adjust the input to be Q6 =SUM(C6,E6,I6,K6,M6,O6) when the formulas are

simultaneously entered (Ctrl+enter)

7. Select Week 1 cells P6:Q10.

8. Since P6 is active input =SUM( then Hold down Ctrl and point and click the arguments B6,D6,F6,H6,J6,L6,N6

close with )

Worksheets Week 1 to Week 4 are highlighted

indicating they are grouped. When we input a

formula into a cell of a grouped worksheet, the

formula will also be input to the same cell in the

other grouped worksheets.

Page 84: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

84

9. Ctrl+enter to input the formulas as shown in Figure 5-7 .

10. . Your results should appear as shown in Figure 5-8. If the do Save the file. If not re-try the exercise.

Figure 5-7: Week Total Hours and Charges formulas across all worksheets.

Figure 5-8: Results of the Week Total formula inputs across all worksheets.

11. Again, click on any other grouped worksheet to view the Week Total formulas.

Question

a. Examine Figure 5-9 below.

b. Make sure your sheets are grouped.

c. Use Ctrl methods to input the Hours (rows 12,13 and 14) and Charges (row 16) formulas.

d. If you have problems check the answer below.

Figure 5-9: Results of the Hours and Charges formula inputs across all grouped worksheets.

Page 85: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

85 Answer

a. Ctrl to select all row 12 entries.

b. P12 is active so input =SUM(P6:P8) then Ctrl+Enter.

c. Repeat the process for the remaining rows. You cannot do all the entries at once for these formulas.

5.1.3 Create the Totals worksheet formulas using 3-D cell references.

Since the totals sheet merely sums the values for each Week we can create all of the Totals worksheet formulas

simultaneously using a 3-D reference.

1. Ungroup the Week 1 to Week 4 worksheets by either clicking on the Totals worksheet or right mouse one of the

grouped worksheets and select Ungroup Sheets (see Figure 5-10).

Figure 5-10: Ungrouping worksheets by selecting Ungroup Sheets.

2. Activate the Totals worksheet.

3. Select all of the cells as shown in Figure 5-12,

Figure 5-11: Selecting ALL the cells to contain SUM formulas.

Page 86: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

86

4. Enter a formula beginning with the SUM function, click on the Week 1 worksheet, then Shift + click the Week 4

worksheet to select all of the worksheets (this tells Excel you will be summing cells across these worksheets –

this creates the 3-D cell reference), click in the same summary cell in the Week 4 worksheet that you selected

in the Totals worksheet (in this case: Q16, which summarizes the Total $ billable cells for all weekly worksheets,

as shown in Figure 5-12)

5. Close the SUM function brackets and press Ctrl + Enter. We have now created all of the 3-D cell reference

formulas for the Totals worksheet. If you want to get fancy, you can format the $ figures using a currency or

similar format.

Now, you can truly say: “While everyone else at the office is still inputting formulas, worksheet by worksheet, you can

leave the office, go for a beer (or wine), play a round of golf…and rest assured, that by the time you arrive back at the

office, your colleagues will still be at it.”

Figure 5-12: Results of the Totals worksheet formula inputs.

•We used the Shift+click key to group the contiguous sheets Week 1 through Week 4. If you want to group non contiguous sheets (say Week 1 and Week 3) use Ctrl+click. .

Note

The 3-D cell reference is:

‘Week1:Week4’!Q16

This is also known as “drilling down” the worksheets.

Note that Week1:Week4 is the same format we use to indicate

a cell range (e.g., B6:C10), instead of a cell range we have a

worksheet range (the grouped worksheets). !Q16 indicates a

specific cell in the grouped worksheets.

Page 87: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

87

5.2 Financial Function Models Business students take many courses related to financial activities. In these courses you will encounter many classic

problems like Amortization of Mortgages and Capital Budgeting. Not surprisingly Excel has many built-in tools to help

construct these and other financial models. In this section we examine some of these tools.

5.2.1 Canadian Mortgage Calculator

Most of you, at one point in your lives, will purchase a home, condo or acreage and finance it with a mortgage. Most

prospective owners will want to calculate general information about the mortgage, such as:

The payment amount (e.g., per month).

Total interest paid over the life of the mortgage.

The total payment amount over the life of the mortgage.

Most prospective owners will want to calculate accrual information about the mortgage (e.g., after the 50th payment):

The total interest paid.

The total payment amount.

The total principal paid.

The outstanding balance (how much principal remains to be paid).

Also, most prospective owners will want to run various scenarios for the above (e.g., lower principal, more frequent

payments).

In the sections that follow, a model will be investigated that provides the above information for Canadian mortgages – a

Canadian Mortgage Calculator, for want of better words. The model will also use the following What-If? Modeling skills

learned to this point:

Cell comments as documentation.

Named cells.

IF function.

VLOOKUP function.

PMT function.

Scenarios.

Concatenation.

Data validation Input Message and Error Alert.

Conditional formatting based on the value of a cell.

Worksheet protection.

Page 88: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

88 The model introduces the following new tools:

The EFFECT, NOMINAL, CUMIPMT and CUMPRINC functions.

A data validation List (a.k.a. a “pick list”).

IFERROR function.

A hyperlink reference to another worksheet.

Conditional formatting based on the values in other cells.

First, a discussion about Canadian and US mortgage rates is necessary. Following this discussion, the model layout and

features are examined.

5.2.1.1 Nominal and Effective Interest Rates

The difference between many Canadian mortgages and US mortgage calculations is that the stated or nominal rate of a

Canadian mortgage (the advertised mortgage rate) is based on semi-annual compounding.

For Canadians, this means we must first convert the semi-annual compounded mortgage rate to an effective rate based

on the desired payment frequency (e.g., monthly payments) and then use the effective rate in mortgage payment

calculations. The formula to convert a nominal rate, at its compounding frequency (e.g., semi-annually) to the effective

rate, at the desired compounding frequency (e.g., monthly), is calculated using the following formula where “i”

represents the interest rate and “m” represents the compounding frequency:

Equation 5-1: Nominal to effective interest rate conversion.

For example, if you wanted to convert a Canadian mortgage rate of 6% to an effective monthly compounded interest

rate using Equation 5-1, the following inputs are made:

Rearranging the above to solve for “i-effective” yields:

Equation 5-2: Effective interest rate formula and calculation.

Very messy indeed!

Excel to the rescue. To accomplish the calculation in Equation 5-2 we can use the EFFECT and NOMINAL functions in a

single formula. Again, if you’re looking for an easier way to do things – it probably exists in Excel.

The EFFECT function converts a nominal rate to an effective annual compound interest rate – it uses the nominal rate

and the nominal rate’s compounding frequency as arguments.

Page 89: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

89 The NOMINAL function converts an effective annual compound interest rate into an effective interest rate at the

desired compounding frequency – it uses the effective annual compound interest rate and the desired compounding

frequency as arguments.

To make the Equation 5-2 calculation using the EFFECT and NOMINAL functions, we would input the formula as follows

into Excel (for illustration purposes only, since this is hard coding, a big “no-no” in Excel modeling):

Figure 5-13: Effective interest rate formula using Excel’s NOMINAL and EFFECT functions.

=NOMINAL(EFFECT(6%,2),12)

Clearly, the Excel formula in Figure 5-13 is simpler (especially to input) than Equation 5-2.

5.2.1.2 Model layout, features & testing

1. Open the file: FFV -1 Cdn Mortgage Calculator (found in the FFV Files folder of the Module II Excel Lab Files).

The model contains 3 worksheets:

The mortgage calculator worksheet with scenarios.

A scenario summary worksheet.

An explanation worksheet about nominal and effective interest rates.

In the following paragraphs you will be examining the model and testing it.

Let’s begin with the “Cdn Mortgage Calculator” worksheet.

2. Activate any cell other than the green highlighted input cells – you should observe that worksheet protection

has been enabled. Unprotect the worksheet. Note the Good cell style has been applied to the input cells to

highlight them as such.

3. Open Name Manager examine the names used in the model. Do most make intuitive sense?

4. Hover over cells B4 and B9 to examine the cell comments.

5. Observe the Nominal Interest Rate note which uses a superscript.

6. Activate cell B6 and examine the Data Validation applied to this cell.

7. Activate cell B7 and examine the Data Validation List or Pick List created for this cell and where the source list

is located on the worksheet. Examine the Conditional Formatting applied to this cell.

8. Activate cell B9 and examine the Data Validation and Conditional Formatting applied to this cell. Note that the

Conditional Formatting depends upon the value in another cell.

9. Activate cell D9 and examine the IF function and its concatenation and how it is used to return feedback to the

user.

10. Open Scenario Manager and examine the 4 scenarios created for the model.

11. Activate cell E14 and examine how the VLOOKUP function uses the Payment Frequency input and Frequency

table input to calculate the Number of Payments (the payment frequency).

12. Right mouse select Edit Hyperlink… in cell D15 and examine the inputs.

13. Activate cells E15 and then G15 to view the nominal to effective interest rate formulas. Note how the ^ (caret)

is used to indicate “to the power of” in cell E15.

14. Examine the cell E16 and E17 formulas.

15. Activate cell E18 and examine the PMT function and its inputs.

Page 90: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

90

16. Activate cell E19 and examine the CUMIPMT function and its inputs.

17. Examine the cell E20 formula.

18. Activate cell E22 and examine the concatenation.

19. Activate cell E23, examine the CUMIPMT function and its inputs and how the IFERROR function uses its results

to return an error message to the user.

20. Examine the cell E24 formula.

21. Activate cell E25, examine the CUMPRINC function and its inputs and how the IFERROR function uses its results

to return an error message to the user.

22. Examine the cell E26 formula and how the IFERROR function uses its results to return an error message to the

user.

23. Open the Conditional Formatting Rules Manager, select Show formatting rules for: This Worksheet and

examine the applied formatting to cells $E$23,$E$25:$E$26 if an error occurs in those cells.

24. Add a Scenario drop-down list to the QAT if there is none present, select the various scenarios and examine

how the inputs and outputs change.

25. Test and Goal Seek the model:

Input negative Principal, Nominal Interest Rate and Payments Made to Date values.

Input an amortization period <1 or >25 or a decimal amortization period between 1 and 25.

Input a Payment > the Number of Payments.

Select the Baseline scenario and Goal Seek a Payment of $5,000 by changing the Principal (this will calculate

the maximum price of a home based on the monthly payment the user can afford). Undo the Goal Seek.

Select the Baseline scenario, input a value of 100 for the Payments Made to Date value and select all of the

Payment Frequency pick list items to view the calculations and error trapping.

26. Examine the units of measure in column F and any concatenation used.

27. Examine any “pretty” formatting that you see.

28. Activate cell B4 and apply Worksheet Protection.

Finally, we will examine the “Effective Interest Rate” and “Scenario Summary” worksheets:

29. Activate the “Effective Interest Rate” and “Scenario Summary” worksheets and examine them. Unprotect the

worksheets if you need to activate cells and then Protect the worksheets when you are finished.

30. Save the file and rename it using an appropriate file name.

•We were looking for an easier way to calculate an effective interest rate and we found it using the EFFECT and NOMINAL functions – Excel is designed for Business People, always search in Excel to see if there is a function or method to make a difficult task easy.

•Further to the above, we used the CUMPRINC and CUMIPMT functions to easily calculate cumulative principal and interest for a specific payment period.

Critical Idea

Page 91: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

91

5.2.2 Capital Budgeting, WACC, ATNCF & CCA

One very important financial model is the capital budgeting model (a.k.a., “the discounted cash flow model” or “the net

present value model”). The problem below illustrates the idea.

Wanda’s E-Commerce Inc. is considering a project: building an E-Commerce website. The initial investment is $1.5

million and largely consists of PC hardware and set-up charges including labor and materials. A working website will

generate Operating Income of $480,000 per year, for five years. At the end of five years, the investment has an

estimated salvage value (a.k.a. scrap value) of about $137,260.

Figure 5-14: Cash Flow Diagram for Wanda’s E-Commerce Website Project

Wanda intends to finance the investment at a ratio of 60:40 debt to equity. She feels that she can borrow at 6% and

assigns an estimated 11% on the cost of equity financing. On this basis, her weighted average cost of capital (WACC) is

8%. WACC is one method of determining the cost of money (or cost of capital) of a company. WACC is used as the

discount rate in calculations such as the Net Present Value (NPV), Internal Rate of Return (IRR) and the Modified Internal

Rate of Return (MIRR).

The Excel model below summarizes the project for Baseline Scenario:

•You can apply Conditional Formatting to a cell based on the value of another cell.

•For complicated (e.g., formulas in an explanation) and lengthy comments, use the Hyperlink feature to link to another worksheet and insert the comments in that worksheet.

•If there are few and specific values for an input, use the Pick List feature in Data Validation.

Tips

$480,000 $480,000 $480,000 $480,000

$480,000

$137,260

$1,500,000

0 1 2 3 4 5 Year

Receipts

Disbursements

Page 92: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

92 Figure 5-15: Project Inputs (Assumptions).

Figure 5-16: WACC calculation.

Figure 5-17: Income Statement projections (a.k.a. Pro Forma Income Statement).

Figure 5-18: After-tax Net Cash Flow (ATNCF).

Scenario Basel ine

Investment 1,500,000$ Revenue 845,000$

Sa lvage Value 137,259$ Materia ls 85,000$

Debt Labor 80,000$

% of Investment Financed 60% Overhead Rate 125%

Market Rate 6% Other 100,000$

Equity Other Interest 5,000$

% of Investment Financed 40% Tax Rate 40%

Market Rate 11% Reinvestment Rate 5%

E-Commerce Project: Inputs (Assumptions)

Capita l Item Rate Value Weight

Debt 6% 900,000$ 60%

Equity 11% 600,000 40%

1,500,000$

WACC 8.00%

Weighted Average Cost of Capital

Income Statement 1 2 3 4 5

Revenue 845,000$ 845,000$ 845,000$ 845,000$ 845,000$

Expenses

Materia ls 85,000 85,000 85,000 85,000 85,000

Labor 80,000 80,000 80,000 80,000 80,000

Overhead 100,000 100,000 100,000 100,000 100,000

Other 100,000 100,000 100,000 100,000 100,000

Operating Expense 365,000 365,000 365,000 365,000 365,000

Operating Income 480,000$ 480,000$ 480,000$ 480,000$ 480,000$

CCA 337,500 523,125 287,719 158,245 56,152

Net Operating Income 142,500$ (43,125)$ 192,281$ 321,755$ 423,848$

Other Interest 5,000 5,000 5,000 5,000 5,000

Income b/Tax 137,500$ (48,125)$ 187,281$ 316,755$ 418,848$

Income Tax 55,000 - 74,913 126,702 167,539

Net Income 82,500$ (48,125)$ 112,369$ 190,053$ 251,309$

Year

Income Statement, After-Tax Net Cash Flow & Capital Budgeting

After-Tax Net Cash Flow

NOI Method 423,000$ 497,250$ 403,088$ 351,298$ 310,461$

OI Method 423,000$ 497,250$ 403,088$ 351,298$ 310,461$

Page 93: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

93 Figure 5-19: Capital Budgeting calculations and financial measures.

Figure 5-20: Capital Cost Allowance (CCA) and Straight Line Depreciation (SLD) calculations.

Capital Budgeting

Year Cash Flows

Cumulative

Cash Flow

Payback

Period

0 (1,500,000)$ (1,500,000)$

1 423,000 (1,077,000)

2 497,250 (156,750)

3 403,088 1,166,588 2.4 years

4 351,298 2,841,223

5 447,720 4,963,579

NPV 200,888$ Cons ider

IRR 13.0% Cons ider

MIRR 9.4% Cons ider

PC Hardware 1st Cost 1,500,000$

Salvage Value 137,259$

Life 5 years

CCA Rate 45%

1 2 3 4 5 6 7 8 9 10

Year CCA Class # UCC start Additions Dispositions 2+3-4 1/2 x (3-4) Base CCA 5-6 Rate Yr. CCA (7x8) UCC end (5-9) SLD

1 45 $0 $1,500,000 $0 $1,500,000 $750,000 $750,000 45% $337,500 $1,162,500 $272,548

2 45 $1,162,500 $0 $0 $1,162,500 $0 $1,162,500 45% $523,125 $639,375 $272,548

3 45 $639,375 $0 $0 $639,375 $0 $639,375 45% $287,719 $351,656 $272,548

4 45 $351,656 $0 $0 $351,656 $0 $351,656 45% $158,245 $193,411 $272,548

5 45 $193,411 $0 $137,259 $56,152 -$68,630 $124,781 45% $56,152 $0 $272,548

SLD = Straight Line Depreciation calculated using the SLN function.

Canada Revenue Agency CCA Calculations

Page 94: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

94 Figure 5-21: CCA vs. SLD chart.

Figure 5-22: Scenario Summary.

$337,500

$523,125

$287,719

$158,245

$56,152

$272,548 $272,548 $272,548 $272,548 $272,548

$0

$100,000

$200,000

$300,000

$400,000

$500,000

$600,000

1 2 3 4 5

De

pre

ciat

ion

, $

Year

CCA SLD

Scenario Summary

Basel ine High Rates Large Investment High Revenue

Basel ine Scenario High Financing

Rates +5%.

Investment

increases by 10%

Revenue increases

by 10%.

Changing Cells:

Scenario Basel ine High Rates Large Investment High Revenue

Investment 1,500,000$ 1,500,000$ 1,650,000$ 1,500,000$

Salvage Value 137,259 137,259 150,985 137,259

Percent Debt 60% 60% 60% 60%

Debt Rate 6% 11% 12% 6%

Percent Equity 40% 40% 40% 40%

Equity Rate 11% 16% 15% 11%

Revenue 845,000 845,000 845,000 929,500

Materials 85,000 85,000 85,000 85,000

Labor 80,000 80,000 80,000 80,000

Overhead Rate 125% 125% 125% 125%

Other 100,000 100,000 100,000 100,000

Other Interest 5,000 9,200 5,000 5,000

Tax Rate 40% 40% 40% 40%

Reinvestment Rate 5% 10% 6% 6%

Result Cells:

WACC 8.00% 13.00% 13.20% 8.00%

Cash Flow Year 0 (1,500,000)$ (1,500,000)$ (1,650,000)$ (1,500,000)$

Cash Flow Year 1 423,000 423,000 436,500 473,700

Cash Flow Year 2 497,250 497,250 518,175 547,950

Cash Flow Year 3 403,088 403,088 414,596 453,788

Cash Flow Year 4 351,298 351,298 357,628 401,998

Cash Flow Year 5 447,720 447,720 463,692 498,420

NPV 200,888 1,578 (106,957) 403,318

IRR 13.0% 13.0% 10.5% 17.9%

MIRR 9.4% 11.7% 8.5% 12.3%

Payback Period, yrs 2.4 2.4 2.6 2.0

Page 95: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

95 5.2.2.1 Comments on the model

1. Open the file: FFV -2 Capital Budgeting and activate the worksheet: Model.

In this case, the T-layout has been modified since it’s sensible to calculate values like WACC and Operating Income “at

the start”. To help reduce the chance of overtyping the formulas, they are put to the right of the inputs. If you were

giving this template to a third party, worksheet protection and data validation of the inputs would be very useful.

Note how the SUMPRODUCT function has been used to calculate the WACC:

Figure 5-23: SUMPRODUCT function to calculate the WACC.

SUMPRODUCT multiplies cell ranges (arrays) that are equal in size (i.e., the number of rows and/or columns in each

array is the same) by each other and sums their product. The alternative formula in cell J9 would have been:

=H5*J4+H6*J6. In large arrays (e.g., 10 rows by 2 columns) inputting a formula using this method would take forever to

input not to mention that a key stroking error is likely to occur – in such cases, SUMPRODUCT is a real time saver and

minimizes the chance for key stroking error when you need to calculate weighted averages.

NPV has to be inputted very carefully. Note that Excel’s NPV function does not calculate the financial measure: Net

Present Value. The NPV function sums discounted cash flows only (converts cash flows to “today’s” or Year 0 dollars

using the cost of capital as the discount rate). To calculate the NPV, you must subtract the investment from the sum of

the discounted cash flows:

Figure 5-24: NPV calculation.

The IRR function calculates the Financial Measure: Internal Rate of Return or IRR. IRR is the discount rate at which the

NPV is equal to $0 and measures the project rate of return. Note that the Values argument of the IRR function must

Note that ONLY the cash flows are discounted and

summed by the NPV function. To calculate the

financial measure NPV, you must subtract the

Investment from the NPV function result.

Page 96: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

96 contain at least one positive value and one negative value to calculate properly. This is why the Cash Flows (see Figure

5-25) have been arranged to show cash inflows as positive values and cash outflows as negative values.

Figure 5-25: IRR function.

In most cases you do not need to provide the Guess argument for the IRR calculation. If Guess is omitted, it is assumed

to be 0.1 (10 percent). Guess is input when there is more than one valid IRR. This situation occurs when there is a

double sign reversal in the cash flows. Consider the following example with two valid IRR’s, 20% and 100%:

Figure 5-26: Multiple IRR’s and the Guess argument.

Year Cash Flow 0% 20% 40% 60% 80% 100% 120% 140%

0 (5,000)$ (5,000)$ (5,000)$ (5,000)$ (5,000)$ (5,000)$ (5,000)$ (5,000)$ (5,000)$

1 16,000 16,000 13,333 11,429 10,000 8,889 8,000 7,273 6,667

2 (12,000) (12,000) (8,333) (6,122) (4,688) (3,704) (3,000) (2,479) (2,083)

NPV (1,000)$ -$ 306$ 313$ 185$ -$ (207)$ (417)$

IRR 100.0%

IRR 20.0%

Present Value at Various Discount Rates

Note the Guess argument input to calculate the

two IRR’s. Excel will usually calculate one of the

IRR’s correctly. To obtain the other IRR, input a

number that is much greater or much less than

the calculated IRR – a manual iterative operation.

Page 97: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

97 Figure 5-27: NPV at various discount rates (IRR is the discount rate at which NPV = $0).

When you have multiple IRR values, it is best defer to the result of the MIRR function (discussion follows).

Another problem with IRR and NPV is that they assume the cash flows (for the exception of the last cash flow or

terminal cash flow) are reinvested at the IRR. In most situations this is unrealistic especially when large IRR’s are

obtained (e.g., where would you reinvest the project cash flows in Figure 5-26 to obtain a 20% or 100% rate of return?).

To obtain a more realistic project rate of return, the MIRR function is used. The MIRR function adds a third argument:

the Reinvestment Rate. If you deposit the cash flows in a bank account with an interest rate of 5%, then this is the

reinvestment rate. If a reinvestment rate is not provided, then assume the reinvestment rate is equal to the cost of

capital (i.e., cash flows are reinvested in some project or account or investment yielding the cost of capital).

Figure 5-28: MIRR function.

Another problem that arises in capital budgeting is when you have cash flows that are not periodic, in such cases, use

the XIRR function. The XIRR function calculates a rate of return with for non-periodic cash flows:

$(1,200)

$(1,000)

$(800)

$(600)

$(400)

$(200)

$-

$200

$400

$600

0% 20% 40% 60% 80% 100% 120% 140% 160%

Ne

t P

rese

nt V

alu

e

Discount Rate

When the NPV = $0, the discount rate = IRR.

Page 98: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

98 Figure 5-29: XIRR function.

In terms of project acceptability, if the NPV > $0 then the project is acceptable and would be considered for funding by

Wanda (Wanda has other projects she is considering investing in). If the IRR, MIRR or XIRR are > WACC, then the project

is acceptable and would be considered for funding (in this case the WACC or cost of capital is also known as the “hurdle

rate”). In general, NPV, IRR, MIRR or XIRR are used to rank projects. If Wanda has only $1.5 million to spend and this is

the only project she is considering, then she would invest in the project (Baseline Scenario).

Another capital budgeting measure is the Payback Period – it calculates the time it takes to break-even (i.e., when the

cumulative cash flows equal the investment). The Payback Period is a measure of risk. The longer the project takes to

break-even, the riskier the project since we are less able to predict the future, the farther out in time we go. Typically, a

Payback Period of ≤ 3 years is considered low risk. If all of the yearly cash inflows are the same, the Payback Period may

be calculated as follows:

Equation 5-3: Payback Period equation when the ATNCF’s are the same.

In Wanda’s project, the ATNCF’S are not the same. Wanda has to resort to another method of determining the Payback

Period. To do this, she calculates the Cumulative Cash Flow and in the year it becomes positive, she knows that the

Payback Period is equal to the previous year plus a fraction (or all) of the year the Cumulative Cash Flow is positive:

Figure 5-30: Payback Period calculation and formula (column I).

Note in column I, how an IF function is used to determine whether the previous year’s Cumulative Cash Flow is positive

and based on this logical test, either a blank is returned if it is TRUE, or a nested IF function is returned if it is FALSE. The

nested IF function tests if the current year Cumulative Cash Flow is negative and based on this logical test, either a blank

is returned if it is TRUE or if FALSE, the previous year’s Cumulative Cash Flow is divided by the current year’s Cash Flow

Page 99: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

99 (this calculates the fraction of the current years Cash Flow required to retire the remaining investment) and this is added

to the previous year’s value to obtain the Payback Period.

For example, in Year 2, the Cumulative Cash Flow is $(156,750) which returns a FALSE from the IF function in cell I40 (it is

not > 0). This causes its nested IF function to test if $1,166,588 is negative which returns FALSE. The FALSE argument of

the nested IF function calculates the fraction of the year it takes to retire the investment: – $(156,750) is ÷ by $403,088

which calculates to 0.4 years and this is added to the previous year, 2, to yield: 2.4 years for the Payback Period.

Also note that if the Cumulative Cash Flow is negative in Year 5, the IF function will return the label “> 5 years”.

The unit of measure, “years” in column J, will return blank if the adjacent cell is blank or “years”.

No matter what the Cash Flow and Cumulative Cash Flow values are, the same or otherwise, the Payback Period formula

will correctly return the break-even duration.

Note that the user has also been provided with an explanatory After-tax Net Cash Flow worksheet (the underlined link in

Figure 5-18) and a SLD vs. CCA worksheet which calculates the Capital Cost Allowance and Straight Line Depreciation for

each year of the project. Straight Line Depreciation is calculated using the SLN function.

5.2.2.2 Playing with the model

2. Activate the worksheet: Scenario Summary.

Here various scenarios have been recorded based on higher financing rates, investment and revenue increases. Note

how Conditional Formatting has been applied to the financial measures and Payback Period to indicate whether the

results are acceptable (Payback Period), acceptable and worthy of consideration or unacceptable (NPV, IRR and MIRR).

3. Activate the worksheet: Model.

Question 5-1: Debt/Equity ratio data validation.

Try changing the debt/equity ratio to see how this affects the capital budgeting measures and cash flow. Try inputting a

value for the % financed by debt or equity that does not add up to 100%.

Answer

Both cells have Data Validation Custom (Formula) and an Error Alert applied if the user makes an input error:

Figure 5-31: Data Validation Error Alert for the Debt % of Investment Financed input (cell B7).

Both the Debt and Equity % of Investment Financed cells have been Data Validated using this method.

Page 100: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

100 Figure 5-32: Data validation settings for the Debt % of Investment Financed input (cell B7).

Question 5-2: Break-even.

Use Goal Seek to determine what annual Revenue is required to break-even by the 3rd year.

Answer

$657,719. Set the Year 3 Net Income to $0 by changing the Revenue input.

4. Save the file and rename it using an appropriate file name.

•Use the SUMPRODUCT function with multiply arrays of the same dimension - useful in WACC calculations.

•The NPV function does not calculate the financial measure NPV, you must subtract the investment from the sum of the discounted cash flows of the NPV function.

•Use Data Validation Custom (Formula) to test a cells value based on the results of another cell in a formula.

•Use the MIRR function to return a more realistic project rate of return.

•Use the XIRR function for nonperiodic cash flows.

•In the absence of a detailed cash flow forecast, use ATNCF - this will require tax reporting of the Operting Income using the CCA not Straight Line Depreciation.

Tips

Page 101: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

101 5.2.3 The Rule of 72

In finance, the Rule of 72 is a method for estimating an investment's doubling time. To determine how long it takes an

investment to double, divide 72 by the compound interest rate (e.g., if the compound annual interest rate is 12% for an

investment, the Rule of 72 predicts that the investment will double in 6 years time: = 72/12).

1. Open the file: FFV -3 Rule of 72.

2. Save as: FFV-3 Solution.

3. Follow the directions in the text box.

4. Unhide the worksheet: Rule of 72 Answer and compare to your results – fix any errors.

Note that the future value equation uses exponentiation:

Figure 5-33: Future Value formula using Exponentiation (^ or caret).

Exponentiation (^) is an Arithmetic Operator and takes precedence (is calculated before) over: multiplication, division,

addition, subtraction, concatenation and Comparison Operators (e.g., <, >, ≥). Only parentheses, negation and %

precede exponentiation.

In the future value formula shown in Figure 5-33, the (1+grate) calculation is carried out first since we have addition

within parentheses. Next comes the exponentiation ^Year and finally multiplication where (1+grate)^Year is multiplied

by initial. Use Evaluate Formula in Formula Auditing to examine this for yourselves.

Page 102: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

102

5.3 Logical, Lookup & Reference Function Models Module I and Bob’s Widgets introduced basic Logical (IF) and Lookup (VLOOKUP) functions found in the Function Library

(see Figure 5-34). The material that follows reviews the basics and introduces a few more crucial ideas about these

function groups.

Figure 5-34: The Function Library.

5.3.1 Comments on Logical functions and Comparison operators

Table, from Excel Help, lists the logical functions provided by Excel. They will be familiar to any of you familiar with

programming (or mathematics).

Table 5-1: Logical Functions.

Function Description

AND Returns TRUE if all of its arguments are TRUE

FALSE Returns the logical value FALSE

IF Specifies a logical test to perform

IFERROR Returns a value you specify if a formula evaluates to an error; otherwise, returns the result of the formula

NOT Reverses the logic of its argument

OR Returns TRUE if any argument is TRUE

TRUE Returns the logical value TRUE

In addition to the built in functions Excel contains several comparison operators. When values are compared by these

operators, the result is a logical value either TRUE or FALSE. TRUE also evaluates to 1 and FALSE to 0. This is illustrated

in Figure 5-34. Column C is the result of column A entries times column B entries. This idea is over great importance if

you want to use the Comparison operators in Table 5-2

Page 103: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

103 Table 5-2: Comparison operators.

Comparison operator Meaning Example

= (equal sign) Equal to A1=B1

> (greater than sign) Greater than A1>B1

< (less than sign) Less than A1<B1

>= (greater than or equal to sign) Greater than or equal to A1>=B1

<= (less than or equal to sign) Less than or equal to A1<=B1

<> (not equal to sign) Not equal to A1<>B1

Question 5-3: Formulas based on Comparison Operators.

Examine each case in Fig and predict the resulting value:

Answer

Let’s take a closer look at the Logical Functions AND, NOT and OR with the assistance of Help.

AND Function

Returns TRUE if all its arguments are TRUE; returns FALSE if one or more argument is FALSE.

=AND(logical1,logical2,...)

Logical1, logical2,... are 1 to 255 conditions you want to test that can be either TRUE or FALSE. The arguments must

evaluate to logical values such as TRUE or FALSE, or the arguments must be arrays or references that contain logical

1

2

3

4

5

6

7

8

9

A B C D E

Value 1 1

Value 2 2

Value 3 3

Value 4 4

Formulas

Case 1 =B2>B3

Case 2 =SUM(B2:B5)*(B4=3)

Case 3 =12+(B4<>MAX(B2:B5))

1

2

3

4

5

6

7

8

9

A B C D E

Value 1 1

Value 2 2

Value 3 3

Value 4 4

Formulas

Case 1 FALSE

Case 2 10

Case 3 13

Page 104: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

104 values. If an array or reference argument contains text or empty cells, those values are ignored. If the specified range

contains no logical values, AND returns the #VALUE! error value. Examine the following examples.

Cell A2 value = 50

Cell A3 value = 104

Table 5-3: AND function examples from Excel Help.

Formula Description (Result)

=AND(TRUE, TRUE) All arguments are TRUE; return: TRUE

=AND(TRUE, FALSE) One argument is FALSE; return: FALSE

=AND(2+2=4, 2+3=5) All arguments evaluate to TRUE; return: TRUE

=AND(1<A2, A2<100) Because 50 is between 1 and 100; return: TRUE

=AND(1<A2, A2<100) Because 50 is between 1 and 100; return: TRUE

=IF(AND(1<A3, A3<100), A3, "The value is out of range.") Displays the second number above, if it is between 1 and 100, otherwise displays a message (The value is out of range.)

=IF(AND(1<A2, A2<100), A2, "The value is out of range.") Displays the first number above, if it is between 1 and 100, otherwise displays a message (50)

NOT Function

Reverses the value of its argument. Use NOT when you want to make sure a value is not equal to one particular value.

=NOT(logical)

Logical is a value or expression that can be evaluated to TRUE or FALSE. If logical is FALSE, NOT returns TRUE; if logical is

TRUE, NOT returns FALSE. Examine the following examples:

Table 5-4: NOT function examples from Excel Help.

Formula Description (Result)

=NOT(FALSE) Reverses FALSE (TRUE)

=NOT(1+1=2) Reverses an equation that evaluates to TRUE (FALSE)

OR Function

Returns TRUE if any argument is TRUE; returns FALSE if all arguments are FALSE.

= OR(logical1,logical2,...)

Logical1,logical2,... are 1 to 255 conditions you want to test that can be either TRUE or FALSE. The arguments must

evaluate to logical values such as TRUE or FALSE, or in arrays or references that contain logical values. If an array or

reference argument contains text or empty cells, those values are ignored. If the specified range contains no logical

values, OR returns the #VALUE! error value. Examine the following examples:

Page 105: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

105 Table 5-5: OR Function examples from Help.

Formula Description (Result)

=OR(TRUE) One argument is TRUE; return: TRUE

=OR(1+1=1,2+2=5) All arguments evaluate to FALSE; return FALSE

=OR(TRUE,FALSE,TRUE) At least one argument is TRUE; return TRUE

•Related Functions: There are many functions that return either TRUE or FALSE. For example there are the “IS…” Information Functions also return True or False. If cell B5 is blank then the formula =ISBLANK(B5) returns TRUE.

Note

Page 106: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

106 5.3.2 Comments on Lookup and Reference functions

Excel includes a variety of lookup and reference functions. Most students will use the VLOOKUP and function frequently.

To this end the notes will look more carefully at the use of the optional argument to create an exact lookup. As

illustrated in FIG the optional “range_lookup” argument is based on TRUE and FALSE

Figure 5-35: The “Range_lookup” argument.

Table 5-6 gives a list of functions. Students often use HLOOKUP which should pose few problems to those understanding

VLOOKUP.

Look carefully at the other functions and you see functions that operate on “areas, “lists” and “arrays”. These are

functions that look at “ranges” of cells. So many of these functions are used to return values (CHOOSE), cell addresses

(ADRESS) and other information. They seldom come up in most student work so we omit discussion of them.

Page 107: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

107 Table 5-6: Lookup and reference functions.

Function Description

ADDRESS Returns a reference as text to a single cell in a worksheet

AREAS Returns the number of areas in a reference

CHOOSE Chooses a value from a list of values

COLUMN Returns the column number of a reference

COLUMNS Returns the number of columns in a reference

HLOOKUP Looks in the top row of an array and returns the value of the indicated cell

HYPERLINK Creates a shortcut or jump that opens a document stored on a network server, an intranet, or the Internet

INDEX Uses an index to choose a value from a reference or array

INDIRECT Returns a reference indicated by a text value

LOOKUP Looks up values in a vector or array

MATCH Looks up values in a reference or array

OFFSET Returns a reference offset from a given reference

ROW Returns the row number of a reference

ROWS Returns the number of rows in a reference

TRANSPOSE Returns the transpose of an array

VLOOKUP Looks in the first column of an array and moves across the row to return the value of a cell

• The Evaluate Formula feature is very useful to step through complex nested IF, VLOOKUP and Logical Functions.

Tips

Page 108: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

108 5.3.3 Practice problems IF, VLOOKUP and Logical functions

You have already explored the basics of IF and LOOKUP in both Module I and Bob’s Widgets. These functions and the

related functions AND,OR and NOT are found in many models so it is time to consider these in more detail.

5.3.3.1 Identifying winners a basic IF model

1. Open the file: IFV - 1 IF Logical and VLOOKUP.

2. Activate the sheet Basic IF.

In the Basic IF model, Figure 5-36 you are asked to determine, from a very long list of data:

a. Which employee’s are Winners and Loser’s based on their Sales (Status).

b. Based on Sales, what is an Employees rank relative to all other Employees (Rank).

c. In case there is a tie for the highest Sales, the number of winners.

Figure 5-36: Basic IF model layout.

Question 5-4: Using IF to determine winners.

a. Input an IF function in cell C4 that returns the text “Winner” if the employee has the maximum sales otherwise

return “Loser”.

b. Input a function in D4 that ranks each Bob’s sales.

c. Select C$:D4 and auto-fill down to Bob7682.

Beyond the Basics:

d. Input a function in cell C1 that counts a Bob if he is a Winner.

Answer

3. Unhide the sheet Basic IF Answer to check your work. Make sure you read Comments & Tips for this model as

advice is provided about handling large lists of data that may take Excel a while to recalculate – found in the

hidden Basic IF Answer worksheet.

1

2

3

4

5

6

7

8

A B C D

Number of

winners

Employee Sales Status Rank

Bob 1 114

Bob 2 6.47

Bob 3 154.57

Bob 4 124.23

Bob 5 106.17

Page 109: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

109 5.3.3.2 A Bonus Rules model using IF, AND, and OR

1. Activate the worksheet Bonus Rules.

In the Bonus Rules Model, you are asked to determine (using the IF, AND and OR functions) which Employee(s) obtain a

Bonus based on:

a. Years Worked vs. the Trigger (Rule 1).

b. General Opinion vs. the Trigger (Rule 2).

c. Years Worked and the General Opinion vs. the Triggers (Rule 3).

d. Years Worked or their Performance vs. the Triggers (Rule 4).

The layout of the Bonus Rules Model is shown in Figure 5-37.

Figure 5-37: Bonus Rules Model layout.

2. Unhide Bonus Rules Answer to check your answers.

5.3.3.3 A Bonus and Vacation model using Lookup

1. Activate the worksheet Basic Lookup.

In the Basic Lookup Model you are asked to:

a. Format the appearance of the tables to match the Bonus Rules Model table.

b. Create formulas in columns C and D, using Employee Seniority as a lookup value, that return the correct Bonus

and Vacation values from the table in E9:G12 (see Figure 5-38).

c. Answer questions that test your thinking about basic usage of the VLOOKUP function.

d. Modify the table in E9:G12 so that a Seniority of > 25 years returns the label: N/A for Bonus and Vacation.

1

2

3

4

5

6

7

8

9

10

11

12

13

14

A B C D E F G H

Triggers

Years Worked 25

Performance 5

General Opinion G

Bonus

$1,000

Performance General Opinion

(0 - 10) (G or B) Rule 1 Rule 2 Rule 3 Rule 4

Bob 5 4 G

Carol 26 6 G

Ted 10 3 B

Alice 4 9 B

Employee

Years

Worked

Bonus Rules

Page 110: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

110 The layout of the Basic Lookup Model is shown in Figure 5-38.

Figure 5-38: Basic Lookup Model layout.

2. Unhide Basic Lookup Answer to check your answers.

5.3.3.4 An Invoice model using an Exact Lookup

1. Activate the worksheet Exact Lookup.

In the Exact Lookup Model you are asked to:

a. Format the appearance of the tables to match the Bonus Rules Model table.

b. Calculate the Extended Cost (see Figure 5-39 for the model layout).

c. Edit the Price formula in D3 to lookup an exact match for the Part Number in table F6:I9 and test using various

Part Number inputs. As a result of the exact match, suggest a solution using Data Validation to prevent the #N/A

error from occurring.

Figure 5-39: Exact Lookup Model layout.

2. Unhide Exact Lookup Answer to check your answers.

3. When you are finished, save the file.

3

4

5

6

7

8

9

10

11

12

A B C D E F G

Employee Seniority Bonus Vacation/wks

Bob 5

Carol 20

Ted 10

Alice 4

Years Bonus Vacation

0 0 2

5 50 3

10 100 4

15 200 5

2

3

4

5

6

7

8

9

A B C D E F G H I

Part Number Qty Description Price Extended Cost

112 10 Wing Nut 12 1.4

Part Number Description Supplier Price

110 Wing Nut 10 Jones 1.25

112 Wing Nut 12 Jones 1.4

113 Wing Nut 13 Smith 1.65

114 Wing Nut 14 Jones 1.7

Page 111: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

111 5.3.4 More Practice problems IF, VLOOKUP and Logical Functions

For additional practice and to explore common issues in the use of the IF, VLOOKUP and Logical functions (including

Data Validation), the Attending the Fair Model has been developed with 5 cases to test your knowledge – and to give

you a “break” from business oriented models.

Instructions:

1. Open the file: IFV - 2 More IF Logical and VLOOKUP and activate the Case 1 Simple IF worksheet.

2. Unhide the answer as directed by the text box and check your work. See below if you forgot how to unhide

material.

3. Complete each subsequent case in the same manner.

Method 1: Unhiding one or several contiguous rows (columns).

a. Row headers for 15 and 18 are visible so drag select rows 15:18.

b. Use Right Mouse or Home |Cells |Format to Unhide rows 16 and 17.

Method 2: Unhiding all hidden rows (columns).

a. Point and click the Select All box.

Figure 5-40: Selecting the worksheet.

b. Home |Cells |Format lets you unhide all rows (or columns) in the worksheet.

.

Page 112: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

112

5.4 Date & Time Models

Dates and Times are important in many business models. The notes focus on two key ideas: direct input of a date (i.e.

the user inputs 1-Jun-90) or time (i.e. the user inputs 13:45) and, secondly, the use of built-in functions related to dates

(TODAY or NETWORKDAYS) or time (NOW or MINUTES).

The notes on dates and times focus on two key ideas: direct input of a date (i.e. the user inputs 1-Jun-90) or time (i.e.

the user inputs 13:45) and, secondly, the use of built-in functions related to dates (TODAY or NETWORKDAYS) or time

(NOW or MINUTE). The Beyond the Basics section presents two problems for (more) complex practice and an example

of a fairly complex problem that requires the use of various TEXT functions to assist in converting input so it may be

interpreted as times.

5.4.1 Dates and Times as Serial values

1. Open the file: DTV - 1 Basic Ideas about Date and Time (DTV Files folder of the Module II Excel Lab Files).

Activate the sheet Serial.

The key to understanding both of these ideas is that Excel converts dates and times into serial numbers.

Dates are assigned “whole numbers” starting with January 1, 1900.

Question 5-5: Interpreting dates.

2. Activate B2 select format the cell to Number.

3. Input your birth date in B3. Then select Number format and interpret the value.

Answer

One of the authors was born on July 17, 1950. Setting the format to number reveals that he was born on the 18,461 day

of the twentieth century (no wonder he retired!)

Excel is pretty smart. The author inputted 17-Jul-50 and Excel knew it was 1950 not 2050.

Question 5-6: Arithmetic on dates.

Some people believe the world will end in 2012 (based on the Mayan calendar). Suppose we want to create a

countdown to this doomsday that updates every day.

4. Input the 21/12/12 in B6 – does Excel assume you want 1912 0r 2012?

5. Activate B7 input the function =TODAY(). There are no arguments between ().Then select number format.

6. Activate B8 input a formula to calculate the days remaining to doomsday.

Answer on next page:

2

3

A B

Dates are serial numbers

starting January 1/ 1900: 1.00

Your birthday: 18461.00

Page 113: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

113 Answer

Since Excel assigns serial numbers to dates we can do arithmetic on them. It also means, as discussed in later sections

that we can sort, filter and create Pivot Tables using dates.

Times are assigned fractions of a day running from 0.0 to 0.999…

Question 5-7: Examining time as fractions of a day.

7. Examine cells B11 (midnight) and B12 (noon). What fractions of the day should these represent?

Answer

a. The day starts at just after midnight so it has a value of 0.00 of a day.

b. Noon is half way through the day so it has a value of 0.5 of a day.

c. To verify this format the cells to Number.

Question 5-8: NOW() returns the current date and time.

8. Activate B14. Set a Time format so that the cell displays the time to the nearest second.

9. Activate B15. Set a Custom format so that the cell displays date and time to the nearest minute.

Answer

Figure 5-41: Formatting using Time and Custom.

Panel 1: B14 -Time Format to the nearest second

5

6

7

8

A B

The world ends on: 41264

Today's date is: =TODAY()

Days to the end of next month: =B6-B7

Doomsday Countdown

Page 114: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

114 Panel 2: B15 -Custom Format show date and time

Figure 5-42 summarizes a variety of date and time issues.

10. Unhide the sheet Basics to examine the formats and serial dates.

Figure 5-42: Basic information about Date and Time inputs in Excel.

Date Formatted Number Formatted Comments

10-Nov-08 39,762.00 Any date can be expressed a number.

October 21, 2007, 2:00:57 PM 39,376.58 Time is expressed as a fraction of a day (see Day Fractions below).

14.00 Hour of the day using the 24 hour system (e.g., 0 = 12 AM, 14 = 2 PM).

Sunday, January 1, 1900, 12:00:00 AM 1.00 Smallest date in Excel. When the default 1900 Date System begins.

Friday, December 31, 9999, 11:59:59 PM 2,958,466.00 Largest date in Excel. When the default 1900 Date System ends.

February 29, 1900 60.00 Excel's Leap Year Bug. The year 1900 was not a leap year!

January 2, 1904 1,463.00 1904 Date System. Early 1980's Apple Computer compatibility.

12/15/30 11,307.00 2-digit years between 00 and 29 are interpreted as 20th Century dates in the

1900 Date System. Type a 4-digit year to avoid this problem.

12/15/28 47,102.00 2-digit years between 30 and 99 are interpreted as 21st Century dates in the

1900 Date System. Type a 4-digit year to avoid this problem.

July 1, 1867 July 1, 1867 Pre-1900 dates are interpreted as labels by Excel (use CELL to verify).

11/10/08 39,762.00 English (U.S.) default date format: mm/dd/yy.

10/11/08 39,762.00 English (Canada) default date format: dd/mm/yy.

10/23/2007 1:47:24 39,378.07 NOW() returns the current date and time, changes only when the worksheet is

calculated: F9 or Shift + F9 or the fi le is closed and reopened a second or

more later. Includes day fraction.

10/23/2007 39,378.00 TODAY() returns the current date, changes only when the fi le is closed and

reopened the next day or later. No day fraction.

2:11 PM 0.59 Ctrl + Shift + ; enters the current time (does not change).

10/21/2007 39,376.00 Ctrl + ; enters the current date (does not change).

10/21/2007 5:18 PM 39,376.72 Date and time created from the above 2 shortcuts with a custom format

applied: m/d/yyyy h:mm AM/PM (does not change).

Day Fractions:

12:00 AM 0.00000 Midnight.

6:00 AM 0.25000 6 in the morning.

12:00:00 PM 0.50000 Noon.

6:00:00 PM 0.75000 6 in the evening.

11:59:59 PM 0.99999 1 second before Midnight.

Page 115: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

115 5.4.1.1 Date and Time Stamps

Sometime you need to input the current date or time as a static value (i.e. one that does not change). Excel offers two

key stroke combinations to allow this to be done easily.

1. Activate the worksheet Basics.

2. Activate G1 input Ctrl+; to create a date stamp.

3. Activate G2 input Ctrl+Shift+: to create a time stamp.

5.4.1.2 More background information

The list of comments below summarizes a few fine points and quirks.

a. A pre-1900 date is treated as labels in Excel.

b. If the serial number contains a fraction, a Date and/or Time format can be applied to reveal the time. Time is

represented as a serial number from 0 to < 1.0. A time can be formatted using the AM/PM System, which uses a

colon to separate hours, minutes and seconds or the 24 hour System which uses a decimal to separate hours

from the minutes and seconds fraction.

c. The Date System contains a Leap Year Bug and does not factor into the majority of date and time calculations.

d. An alternative Date System exists in Excel: the 1904 Date System which dates back to the early 1980’s and

should rarely, if ever, have to be applied as the default Date System.

e. When using a Date format with a 2-digit year – Excel interprets years between 00 and 29 as 20th Century years

and years between 30 and 99 as 21st Century years. To avoid this problem, use a 4-digit year Date format.

f. Certain Date formats depend upon the Operating System: Regional Language Options (more on this later).

5.4.2 Doing math on text string dates “1-Jan-08”

The Dates as Labels Model (nicknamed “Awkward” by one of the authors – and it is, but it works) demonstrates that

dates entered as labels can be operated on as if they were entered as serial number dates and that this idea may be

useful to you in the future.

1. Unhide the worksheet Awkward. Examine the formula in C3.

Figure 5-43: Arithmetic on Date Labels.

2. Input a formula in C10 that will calculate the number of days from today to June 30, 2012.

3. Unhide the worksheet: Awk Ans and compare your results. When finished, hide Awk Ans.

4. Save the file using an appropriate name.

5.4.3 Canadian and American Date input.

For many of us a date format like 11/10/08 poses problems. Is this October 11th or November 10th? The interpretation

depends upon the default operating system Control Panel: Regional and Language Options settings (see Figure 5-44). For

example, if Regional Options are set for English (United States), the date 11/10/08 is interpreted as: November 10, 2008

(see Figure 5-45). If the Regional Options are set for English (Canada), the date 11/10/08 is interpreted as: October 11,

2008 (see Figure 5-46). To avoid this problem altogether, specify a Date format displaying some variant of month (e.g.,

Page 116: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

116 March 14, 2001 or 14-Mar-01). Also, note that the default Time setting is also determined by the Control Panel: Regional

and Language Options settings.

Figure 5-44: Windows XP Professional (Control Panel): Regional Language Options – English (United States) setting.

Figure 5-45: The English (US) 03/14/01 Date format.

Page 117: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

117 Figure 5-46: The English (Canada) 14/03/01 Date format.

Page 118: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

118 5.4.4 Date and Time Functions

All users need to understand the idea that dates and times are serial numbers, that Excel can do math on dates and

times, and most of you will use TODAY or NOW at some time or other. But Excel offers many more functions that relate

to date and time. Remember the idea: “the programmers must make common tasks easy” and consider the list of

functions in the library.

1. Activate the Date & Time Functions worksheet.

The sheet, reproduced as Figure 5-47 below illustrates the range of functions. Roughly speaking:

a. Functions in E3:E12 allow you to breakdown dates and times like A3 (e.g. DAY is 1 or HOUR is 10) or convert

input (values or text) into date and time equivalent (e.g. TIME or DATEVALUE);

b. Functions in E13:E19 allow you to calculate various days or dates. For example E13 calculates that there are 253

(net of holidays) workdays in 2007 while E14 indicates that Nov 1, 2007 is ten months from Jan 1.

c. Functions in E20:E23 are pretty straightforward. They allow you to determine the day of the week, number of

weeks between dates or the fraction of the year between dates.

Figure 5-47: Date and Time Functions in Excel.

23456789

101112131415161718192021

22

232425

A B C D E F

Input Format Date & Time Functions1 Result FormulaJanuary 1, 2007, 10:09:39 AM Date & Time YEAR 2007 =YEAR(A3)39,377.4234 Number MONTH 1 =MONTH(A3)December 31, 2007, 10:09:39 AM Date & Time DAY 1 =DAY(A3)January 1, 2008 Text HOUR 10 =HOUR(A3)6:32 AM Text MINUTE 9 =MINUTE(A3)

SECOND 39 =SECOND(A3)BC Statutory Holidays, 2007 Date DATE 2007-January-1 =DATE(E3,E4,E5)New Year's Day 1-Jan TIME 8:12 PM =TIME(20,12,5)Good Friday 6-Apr DATEVALUE 39,448.00 =DATEVALUE(A6)Victoria Day 21-May TIMEVALUE 6:32 AM =TIMEVALUE(A7)Canada Day 2-Jul NETWORKDAYS 253 =NETWORKDAYS(A3,A5,B10:B18)B.C. Day 6-Aug WORKDAY August 2, 2007 =WORKDAY(A3,150,B10:B18)Labour Day 3-Sep WORKDAY June 5, 2006 =WORKDAY(A3,-150,B10:B18)Thanksgiving Day 8-Oct EDATE November 1, 2007 =EDATE(A3,10)Remembrance Day 11-Nov EDATE August 1, 2006 =EDATE(A3,-5)Christmas Day 25-Dec EOMONTH December 31, 2007 =EOMONTH(A3,11)

EOMONTH February 28, 2006 =EOMONTH(A3,-11)WEEKDAY 2 =WEEKDAY(A4)WEEKDAY Monday =TEXT(WEEKDAY(A4),"dddd")

WEEKNUM 43 =WEEKNUM(A4)

YEARFRAC 1.674 =YEARFRAC(E19,E16,1)

TODAY October 24, 2007 =TODAY()NOW October 24, 2007 18:42 =NOW()

Page 119: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

119 5.4.5 Beyond the Basics

Beyond the Basics includes two practice problems (Christmas Perpetuity Model and Riding the Roller Coaster) and an

illustration of a more complex problem where a lot of Excel skills are required to deal with a date and time problem

(Hospital). The Hospital model is provided as a problem with answers but it really is far beyond the basics.

5.4.5.1 Problem #1: Christmas Perpetuity model

1. Unhide the Perpetuity worksheet.

The Christmas Perpetuity Model, Figure 5-48 calculates (until December 25th 9999):

a. What day of the year the current date is.

b. The number of days remaining in the year.

c. How many days, hours, minutes and seconds it is from the current date until Christmas day.

d. Christmas day for (based on) the current year.

e. The Christmas day text weekday for the current year.

This is a very tricky model! The idea behind the model is to give you practice using:

a. The NOW(), TODAY() and functions that extract/combine date and time components.

b. Math operators and the IF function to calculate specific dates, days and times.

c. The IF functions and Concatenate to insert appropriate label comments.

Figure 5-48: Christmas Perpetuity Model layout.

2. When you have completed your inputs, unhide the worksheet: Perpetuity Ans and compare your results. When

you are finished, hide Perpetuity Ans.

Insert the appropriate formulas so that cell values will calculate correctly until December 25, 9999:

Ensure that the text titles read correctly (e.g., "There is" instead of "There are" when there is 1 day to go

before Christmas).

Today is October 22, 2007 3:46:27 PM

This is day 295 of the year 2007

There are 70 days remaining in the year.

There are 63 days,

8 hours,

13 minutes, and

33 seconds before Christmas.

December 25, 2007 Christmas Day

Tuesday is the day of the week that Christmas falls on.

Page 120: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

120 5.4.5.2 Problem #2: Roller Coaster Record model

1. Unhide the Roller Coaster worksheet.

Figure 5-49 The Roller Coaster Record Model2:

a. Formats a date using a Custom Date and Time format.

b. Calculates a future date and time based on a specified start date and time.

c. Calculates lost pay based on net working days (for BC) see the Date and Time Function sheet.

d. Calculates a decimal calendar day duration based on a decimal duration in hours.

e. Converts a decimal calendar day duration into days, hours, minutes and seconds.

f. Converts a decimal duration in hours into a fraction of a year.

The goal of the model is to calculate:

a. When a record breaking roller coaster ride should start.

b. The minimum pay the “would be” record breaker (John) will lose.

c. Provide specific date and time information about the record breaking ride.

Figure 5-49: Roller Coaster Record Model layout.

2. When you have completed your inputs, unhide the worksheet: Roller Coaster Ans and compare your results.

When you are finished, hide Roller Coaster Ans.

2 Adapted from J. Gips: “Mastering Excel – A Problem Solving Approach”, Second Edition, Computer Exercises, Q. 13-6, p. 219.

1. John loves riding on roller coasters. His l ifetime dream is to break the world endurance record for riding a roller coaster.

The PNE is excited about supporting John and has offered to let him ride their roller coaster. The PNE would like John to finish

no later than 6:30 PM July 3, 2007. The current world record is 503.452 hours.

2. John's foregone pay is $240 for every workday he rides the rollercoaster.

Answer the questions below.

Record duration: 503.452 hours

John's pay: $240.00 /day

Finish time and date:

To break the record, John must start

before this start time and date:

The minimum pay John forgoes:

Record Time in calendar days:

The duration of the existing record is: days

hours

minutes, and

seconds.

The duration of the existing record as: a fraction of a year.

Page 121: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

121 5.4.5.3 Hospital Patient Arrival Times model

This model was an actual problem from a health consultant analyzing “bed usage” in various emergency and post-

operation wards at a hospital. The problem was referred to the then BCIT School of Business Office Manager, Kyle

Gruen. The authors decided to give Kyle “a hand” with the problem. It was a very interesting problem as it turns out.

1. Activate the Hospital worksheet.

There were several issues to be considered but the core problem was that the nurses inputted times into an Excel

worksheet as: 945 not 9:45 and then calculated the length of stay manually (see Figure 5-50). In order to analyze the

data, many sheets similar to this one needed to be converted to serial number values so that Excel can perform analysis

and ultimately generate summary output as shown in Figure 5-51. The red shaded values are the result of Conditional

Formatting applied to highlight values in excess of the average.

Figure 5-50: Hospital Patient Arrival Times Model layout.

Monday March 1, 2004

Total cases = 15

Patient Number Procedure Hours Minutes

Total Time

Calc.

1 915 1115 2

2 918 1035 1 17

3 1022 1220 1 58

4 1050 1200 1 10

5 1140 1215 35

6 1207 1440 2 38

7 1215 1535 3 20

8 1222 1315 53

9 1232 1407 1 35

10 1333 1410 37

11 1432 1535 1 3

12 1445 1525 40

13 1455 1613 18

14 1512 1650 1 38

15 1555 1750 1 55

Average

Median

Patient Arriva l Times Total Time

Time In Time Out

Page 122: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

122 Figure 5-51: Calculated times using Excel serial number inputs and Time formats.

The goal of the Hospital Patient Arrival Times Model is to determine if you can come up with a method to convert the

data. This is a difficult model to solve, with at least 2 solutions that take advantage of the following facts about Time

formats and label inputs (Hints):

The nurses were manually entering times (as labels or text strings) using the “24 hundred hour” system (e.g.,

1900 hours or “19 hundred hours” represents the time: 7:00 PM).

The LEFT, RIGHT and MID functions are used to extract a specified number of characters, from a specified

starting position in a text string.

Characters which are extracted from a text string can be reassembled, using Concatenate, into a text string

version of the time.

The TIMEVALUE function converts a time, input as text string, into a serial number time which can be then

formatted using a Time format.

Conditional Formatting can be applied using a formula to decide which cells to format and the conditional

formatting can be copied to other cells using Format Painter.

In addition to solving the above problem, the health consultant would like to produce a Gantt chart (or Bar Chart), a

timeline, of the Total Time vs. the Time of Day (see Figure 5-52).

Monday March 1, 2004

Total cases = 15

Patient Number Procedure Hours Minutes

Total Time

Calc.

1 915 9:15 AM 1115 11:15 AM 2 2:00

2 918 9:18 AM 1035 10:35 AM 1 17 1:17

3 1022 10:22 AM 1220 12:20 PM 1 58 1:58

4 1050 10:50 AM 1200 12:00 PM 1 10 1:10

5 1140 11:40 AM 1215 12:15 PM 35 0:35

6 1207 12:07 PM 1440 2:40 PM 2 38 2:33

7 1215 12:15 PM 1535 3:35 PM 3 20 3:20

8 1222 12:22 PM 1315 1:15 PM 53 0:53

9 1232 12:32 PM 1407 2:07 PM 1 35 1:35

10 1333 1:33 PM 1410 2:10 PM 37 0:37

11 1432 2:32 PM 1535 3:35 PM 1 3 1:03

12 1445 2:45 PM 1525 3:25 PM 40 0:40

13 1455 2:55 PM 1613 4:13 PM 18 1:18

14 1512 3:12 PM 1650 4:50 PM 1 38 1:38

15 1555 3:55 PM 1750 5:50 PM 1 55 1:55

Average

1:30

Median

1:18

Patient Arriva l Times Total Time

Time In Time Out

Page 123: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

123 Figure 5-52: Gantt Chart or Bar Chart timeline of the Total Time vs. the Time of Day.

When you have completed your inputs, unhide the worksheets: Hosp Ans 1, Hosp Ans 2 and Hospital Chart and compare

your results. When you are finished, hide Hosp Ans 1, Hosp Ans 2 and Hospital Chart. Note that in the worksheet: Hosp

Ans 1 there is a new format applied to hide a cell’s content from view.

9:00 AM 10:00 AM 11:00 AM 12:00 PM 1:00 PM 2:00 PM 3:00 PM 4:00 PM 5:00 PM 6:00 PM

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

Time of Day

Pat

ien

t N

um

be

r

Gantt Chart or Bar Chart ofPatient Arrivals

Page 124: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

124

All lists have one feature in common, they contain

Tables in Excel are similar to tables in a database (e.g., Microsoft Access). In Excel a column title is known as a header, in a database table it is known as a field. Each row in an Excel table is known as a record in a database table.

In Excel, tables are unrelated to other tables. In a database, tables are usually related to other tables; hence the term, a relational database (e.g., Microsoft Access). An Excel workbook with one or more tables is often called a flat file database. Flat file means there are no relationships between tables but database operations can be applied to the (e.g., sorting, filtering, data validation).

Large tables (100's or 1,000's of rows or records), that require summarizing at a higher level (e.g., Sales by Country and Salesperson for the Sales table – see the PivotTable figure below), use PivotTables and PivotCharts.

6 Data Lists (Tables)

Excel has a variety of tools that allow users to convert data into information. This aspect of Excel can be thought of as a

basic “Information Technology” application. Excel’s primary “IT” tools are:

a. Data List or List (Table) manipulation using: sorting, filtering, subtotals, functions (e.g., AVERAGE, MAX, MIN)

and advanced functions (e.g., COUNTIF, COUNTIFS, SUMIF, SUMIFS).

b. PivotTable and PivotChart analysis to summarize large data lists (tables).

The old Excel 2003, the term list or data list has been replaced by table in Excel 2007. Any type of data organized in a

tabular format can be converted into a table. The Figures that follow show common examples of data tables (based on

sample data from Microsoft Access).

Figure 6-1: Customer table: sales by quarter.

An orders list:

Figure 6-2: Sales table: sorted by order date.

A product list:

Figure 6-3: Product table: sorted by highest to lowest sales.

The PivotTable, Figure 6-4, summarizes an 800 row Sales table (see Figure 6-2) by country, salesperson and order

amount.

Country Salesperson Order Date OrderID Order Amount

UK Suyama 7/10/2003 10249 $1,863.40

USA Peacock 7/11/2003 10252 $3,597.90

USA Peacock 7/12/2003 10250 $1,552.60

UK Dodsworth 7/15/2003 10255 $2,490.50

USA Leverling 7/15/2003 10251 $654.06

UK Buchanan 7/16/2003 10248 $440.00

USA Leverling 7/16/2003 10253 $1,444.80

USA Leverling 7/17/2003 10256 $517.80

USA Peacock 7/22/2003 10257 $1,119.90

Category Product Sales Quarter

Beverages Côte de Blaye $25,127.36 Qtr 1

Meat/Poultry Thüringer Rostbratwurst $14,037.79 Qtr 4

Beverages Côte de Blaye $12,806.10 Qtr 2

Dairy Products Raclette Courdavault $11,959.75 Qtr 4

Produce Manjimup Dried Apples $11,898.50 Qtr 4

Dairy Products Camembert Pierrot $10,273.10 Qtr 3

Grains/Cereals Gnocchi di nonna Alice $9,868.60 Qtr 2

Dairy Products Raclette Courdavault $9,116.80 Qtr 1

Customer Qtr 1 Qtr 2 Qtr 3 Qtr 4

ALFKI 814.50$ 1,208.00$

ANATR 479.75$ 320.00$

ANTON 4,771.91$ 1,188.86$

AROUT 407.70$ 2,142.90$ 3,856.30$

BERGS 1,206.60$ 4,693.73$ 5,920.68$ 2,028.00$

BLAUS 615.80$ 464.00$

BLONP 3,832.72$ 2,875.16$ 1,110.00$

BOLID 3,026.85$

BONAP 1,820.80$ 3,368.40$ 1,930.40$ 4,088.75$

Table header.

Contiguous rows – individual

cells may be blank.

Related column data (e.g.,

Sales, Quarter).

Page 125: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

125 Figure 6-4: PivotTable of the Sales list summarized by Country, Salesperson and Order Amount.

Before introducing the tools a few caveats:

1. Assume the data problem is a common problem.

One of difficulty with data analysis is that the range of Questions (Output) is huge so the Module focuses on

process (how does Excel produce Tables). The idea is to develop some common examples that can be employed

in other problems. However, some caution is in order. What happens if you run into a data problem which you

have not tackled previously? Assume it’s common and that Excel has tools to solve it. If it is an important

problem do a little research or explore Excel a bit. The sections that follow cover some but not all of the tools

available in Excel. For instance, those familiar with statistics will recognize that the phrase data analysis is also a

common statistical term. Various descriptive statistics (average, max, min and the like) will be demonstrated,

but it should come as no surprise that Excel includes various analytical statistics (normal distribution,

regression, Chi-Square and the like).

2. Do not limit the notion of data – treat it as a generic worksheet concept.

Many users associate data with databases. This can lead to myopia when using Excel. Data imported as labels,

values or blank cells can be manipulated using a variety of Excel features.

3. Excel’s data manipulation abilities are evolving.

Recall the opening comment: “Excel can also be thought of as an Information Technology application.” Since

information technology is, and continues to be, one of the exploding areas in computing, one should not be

surprised if newer versions of Excel concentrate even more on its ability to analyze data. The more users do

data analysis in their jobs, the more they need to keep up to date with changes in Excel’s abilities. A good

understanding of the material in these sections will enable you to work with data. These basics also serve as a

bridge to explore more sophisticated ideas. For example:

PivotTables are used in Microsoft Access.

Excel can be linked to databases and export data to databases.

Excel can do “Business Analytics” (a user friendly name for the Business Intelligence term: Online

Analytical Processing or OLAP – see the Advanced Section).

Country UK

Salesperson Order Amount

Buchanan $68,792

Dodsworth $75,048

King $116,963

Suyama $72,528

Grand Total $333,331

Page 126: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

126

6.1 Concepts

As usual the “mantra”, Input Process Output provides background for the exploration of data concepts.

Figure 6-5: The Input Process Output “mantra”.

The key questions to ask about are:

Input: How does Excel accept data input?

Process: How does Excel treat the data and what tools are available to manipulate the data?

Output: What questions am I trying to answer when analyzing the data? How should I display these?

A note on Data Sources

Some store data in Excel; however, many import data from other sources (see Module I on External Data Sources (.txt,

.csv., .pdf etc.). Database applications are yet another frequent source of input (e.g., Microsoft Access, Microsoft SQL

Server, Oracle 11, IBM DB2, Microsoft Dynamics GP, Sage Accpac, SAP ERP). Since Excel is the most commonly used

spreadsheet application most databases readily export to Excel. For example, in Microsoft Access you need only activate

the table to be exported and apply the External Data | Export | Excel command.

Figure 6-6: Exporting a database table from Microsoft Access as an Excel “spreadsheet”.

Many users prefer to manipulate and analyze data in Excel. Databases can be complicated and typically require query

and report building skills that many users do not possess.

Input Process Output

Page 127: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

127

6.2 Table Layout

A table should have the following characteristics (adapted from Excel Help):

a. The top row should consist of labels (header), with each label describing the contents of the column beneath it.

Each label should be unique. (The labels row is not mandatory, if you omit it, Excel will generate one default

column names.)

b. Each column should contain the one type of data (e.g., customer ID’s, sales values, order dates).

c. Data to be sorted, filtered, or otherwise manipulated should occupy a separate column (e.g., Customer ID, Sales,

Order Date).

Figure 6-7 represents a typical worksheet range of data:

Figure 6-7: Customer table imported from a Microsoft Access database (Northwind.accdb) into Excel.

Page 128: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

128

6.3 Table Basics

6.3.1 Inserting and naming a table

1. Open the file: TBV - 1 Table Basics (in the TBV folder of the Module II Excel Lab Files) and rename the file: TBV –

1 Solution.

2. Activate the Beverages worksheet.

3. Select the Insert ribbon.

4. Activate any cell in the data range and apply Insert | Tables | Table (for those who prefer keystrokes Ctrl+T).

Excel asks if you want to create a table as shown in Figure 6-8. Note that Excel has correctly selected the data range and

interpreted that the table header is in row 4.

5. In the Create Table dialog box, click OK.

Excel formats the table and adds Filter & Sort drop-down arrows to header row as shown in

Page 129: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

129 Figure 6-9. ) An alternative method is to create a table by applying a Table Style to the entire data range.)

Once a table has been created it can be manipulated independent from other data in the worksheet.

Figure 6-8: Create Table dialog box.

Page 130: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

130 Figure 6-9: The table has been automatically formatted using a default Table Style (Medium 9) and Filter & Sort has been applied to the table header row (drop-down arrows next to the header row titles).

Some find thiis style difficult to read so change the table style:

6. Notice that Excel is now in Insert| Design. Click anywhere in the table and apply: Table Tools | Design: Table

Style Medium 2.

7. Save the file: TBV – 1 Solution. The table appears as follows:

Figure 6-10: Table Style Medium 2 applied to the table.

8. Activate the Data ribbon to get a broad range of tools.

9. Data |Table Tools| Design and Name the table Beverages.

Note that the Beverages table cell range is B5:F15 and that this excludes row 4 the header row.

Product Qtr 1 Qtr 2 Qtr 3

Chai $706 $878 $1,175

Chang $2,721 $228 $2,062

Chartreuse verte $590 $360 $1,101

Côte de Blaye $25,127 $12,806 $7,312

Guaraná Fantástica $529 $468 $219

Ipoh Coffee $1,398 $4,497 $1,196

Lakkal ikööri $1,142 $1,774 $3,262

Laughing Lumberjack Lager $518 $350

Rhönbräu Klosterbier $215 $1,509 $1,234

Sasquatch Ale $179 $1,037

Steeleye Stout $1,742 $1,008 $1,683

The banded rows make it much easier

to scan large amounts of data.

Header row displays appropriate names

for the column titles.

Page 131: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

131 6.3.2 Simple Filtering

Filter Qtr 1 for above average sales (see Figure 6-11if you have problems)

Figure 6-11: Specific filtering of numbers and general sort criteria for Qtr 1.

Figure 6-12: Results of the Above Average filter.

The table rows that less than or equal to the average are hidden.

10. Mouse over the Filter & Sort icon to view the Filter applied.

11. Remove the Filter by selecting Undo or Clear Filter from the Qtr 1 Filter & Sort drop-down menu.

Figure 6-13: Clear Filter.

Question 6-1: Simple Filters.

Find all the products that begin with the letter “r”. (Answer Rhönbräu Klosterbier).

Find all Qtr 1 sales greater than $2,000 (Answer Chang and Côte de Blaye).

Note the Filter & Sort icon has changed to

indicate the column has been filtered.

Page 132: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

132 Later sections will look at more sophisticated Filters. Now some basic sorts…

6.3.3 Simple Sorting

Question 6-2: Combining a filter and a Sort.

Sorting is straight forward so combine a filter and a sort as follows:

Filter for all products whose Qtr 2 sales exceed $1,000 then sort (for the heck of it) from Z to A.

Check your answer then Undo the sort and Clear the Filter.

Answer

6.3.4 Add a Column

Next, add a column.

12. Activate E4, right mouse Insert | Table Column to the Right.

Figure 6-14: Adding a column.

(Dragging the resize handle in the lower right corner of the table also adds a column.)

13. Press Undo. This will remove the new column from the table.

14. Drag the Resize Handle to the right until a new column is added.

Product Qtr 1 Qtr 2 Qtr 3

Steeleye Stout $1,742 $1,008 $1,683

Sasquatch Ale $179 $1,037

Rhönbräu Klosterbier $215 $1,509 $1,234

Lakkal ikööri $1,142 $1,774 $3,262

Ipoh Coffee $1,398 $4,497 $1,196

Côte de Blaye $25,127 $12,806 $7,312

Page 133: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

133 Figure 6-15: Adding a new column using the Resize Handle.

Note Excel correctly guessed that the new column ought to be named “Qtr 4”.

15. Enter the following Qtr 4 data:

Figure 6-16: Qtr 4 data inputs.

16. Save the file.

6.3.5 Add a Calculated Column

Add a calculated column named: “Grand Total”.

17. Activate G4, input: Grand Total.

Before moving on, note that Excel calls the above step: AutoExpansion. Creating the label “Grand Total” caused Excel to

add another column to the table.

Figure 6-17: Add the Grand Total calculated column.

Product Qtr 4

Chai $2,128.50

Chang $2,028.25

Chartreuse verte $2,424.60

Côte de Blaye $1,317.50

Guaraná Fantástica $337.50

Ipoh Coffee $3,979.00

Lakkal ikööri $1,705.50

Laughing Lumberjack Lager $42.00

Rhönbräu Klosterbier $1,233.80

Sasquatch Ale $750.40

Steeleye Stout $1,273.50

Page 134: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

134

18. Activate G5, select Sum from the Home | Editing group (or stay on Data and use point/click to input SUM). The

worksheet should appear as follows:

Figure 6-18: Sum applied to the first cell in the “Grand Total” calculated column.

Examine the formula as shown in Figure 6-18. This is known as a Structured Reference – different than a normal cell

reference. They make it easier and more intuitive when working with Tables (one reason it was wise to name the table).

The syntax of a Structured Reference is as follows (from Excel Help):

Figure 6-19: Structured Reference syntax.

A table name is a meaningful name that you provide to

reference the actual table data (excluding the headers row

and totals row, if any).

A column specifier is derived from the column header,

enclosed in brackets, and references the column data

(excluding the column header and total, if any).

A special item specifier is a way to refer to specific portions of the table, such as the Totals row.

The table specifier is the outer portion of the structured reference that is enclosed in square brackets following the

table name.

A structured reference is the entire string beginning with the table name and ending with the table specifier.

19. If Excel did not input the SUM to all the data use the AutoCorrect Option to Overwrite all cells in this column

with this formula.

Figure 6-20: Add the Grand Total formula.

Page 135: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

135 Figure 6-21: AutoCorrect results.

A formula entered into the first cell of a calculated column is automatically applied to all of the cells in the calculated

column as shown in Figure 6-21.

6.3.6 Add a Total Row

Next add a Total row and explore the SUBTOTAL Function.

20. Activate any cell in the table.

21. To create the Total Row either Design |Table Style Options group or Right Mouse | Table: Totals Row. This adds

the Total Row to the bottom right hand of table

22. Activate cell G16 Excel has inputted a SUBTOTAL function to calculate the total value (sum) of all products sold

based on the Grand total column (see Figure 6-22). (Multiple total rows can be created to calculate MIN, MAX,

COUNT, etc.)

Figure 6-22: Adding a formula to the Total row of a table to calculate the Qtr 1 average.

23. Edit B16 to Average.

24. Activate G16 use the drop arrow to select Average then fill left yielding:

25. To practice: Set G16 back to Sum drag left and re-label B16:

Question 6-3:

What three products contributed most to the total sales and how many sales dollars did they generate?

Product Qtr 1 Qtr 2 Qtr 3 Qtr 4 Grand Total

Chai $706 $878 $1,175 $2,129 $4,887

Chang $2,721 $228 $2,062 $2,028 $7,039

Chartreuse verte $590 $360 $1,101 $2,425 $4,476

Côte de Blaye $25,127 $12,806 $7,312 $1,318 $46,563

Guaraná Fantástica $529 $468 $219 $338 $1,554

Ipoh Coffee $1,398 $4,497 $1,196 $3,979 $11,070

Lakkal ikööri $1,142 $1,774 $3,262 $1,706 $7,883

Laughing Lumberjack Lager $518 $350 $42 $910

Rhönbräu Klosterbier $215 $1,509 $1,234 $1,234 $4,191

Sasquatch Ale $179 $1,037 $750 $1,967

Steeleye Stout $1,742 $1,008 $1,683 $1,274 $5,707

Total $96,246

14

15

16

B C D E F G

Sasquatch Ale $179 $1,037 $750 $1,967

Steeleye Stout $1,742 $1,008 $1,683 $1,274 $5,707

Average $3,435 $2,280 $1,959 $1,566 $8,750

14

15

16

B C D E F G

Sasquatch Ale $179 $1,037 $750 $1,967

Steeleye Stout $1,742 $1,008 $1,683 $1,274 $5,707

Total $34,350 $25,083 $19,593 $17,221 $96,246

Each formula is adjusted for each row to

calculate the data.

Page 136: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

136 Answer

6.3.7 Adding a new records (new rows)

Next insert a new row (record) for Outback Lager above Rhönbräu Klosterbier and input the produce sales for all four

quarters:

If you had problems:

26. Activate cell B13, right mouse select Insert: Table Rows Above.

Note that as you enter the Qtr 1 to Qtr 4 data, the Grand Total column and the Total row automatically update. Your

table should now appear as follows:

Figure 6-23: Add the Outback Lager row.

Consider another product:

1. Activate G16, press Tab, input the new data.

2. In the Product Filter & Sort drop-down list select Sort A to Z. to by Product name. Note that the Sort & Filter

icon, in the Product header, has changed to an arrow icon indicating a sort has been performed.

3. Before adding a new calculated column, let’s see if Excel has added the new rows to the table name.

4. Activate a cell in the table and in the Name Box select Beverages. Note that the table header row and Total row

are excluded from the named table range.

Product Qtr 1 Qtr 2 Qtr 3 Qtr 4 Grand Total

Côte de Blaye $25,127 $12,806 $7,312 $1,318 $46,563

Ipoh Coffee $1,398 $4,497 $1,196 $3,979 $11,070

Lakkal ikööri $1,142 $1,774 $3,262 $1,706 $7,883

Total $27,668 $19,077 $11,770 $7,002 $65,516

Product Qtr 1 Qtr 2 Qtr 3 Qtr 4

Outback Lager $1,508.40 $384.00 $1,252.50 $2,683.50

Product Qtr 1 Qtr 2 Qtr 3 Qtr 4 Grand Total

Chai $706 $878 $1,175 $2,129 $4,887

Chang $2,721 $228 $2,062 $2,028 $7,039

Chartreuse verte $590 $360 $1,101 $2,425 $4,476

Côte de Blaye $25,127 $12,806 $7,312 $1,318 $46,563

Guaraná Fantástica $529 $468 $219 $338 $1,554

Ipoh Coffee $1,398 $4,497 $1,196 $3,979 $11,070

Lakkal ikööri $1,142 $1,774 $3,262 $1,706 $7,883

Laughing Lumberjack Lager $518 $350 $42 $910

Outback Lager $1,508 $384 $1,253 $2,684 $5,828

Rhönbräu Klosterbier $215 $1,509 $1,234 $1,234 $4,191

Sasquatch Ale $179 $1,037 $750 $1,967

Steeleye Stout $1,742 $1,008 $1,683 $1,274 $5,707

Total $35,858 $25,467 $20,845 $19,904 $102,074

Product Qtr 1 Qtr 2 Qtr 3 Qtr 4

L'araniciata Sanpellegrino 190.92$ 1,342.94$ 822.64$ 1,098.08$

Page 137: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

137

5. Input Average Quarterly Sales in H14. There are two ways to input the AVERAGE function in H18. The

dangerous one is to use the Σ and select AVERAGE. Why is this dangerous? Try it and compare your results to

Figure 6-24. The alternative is to input AVERAGE using point and click.

Figure 6-24: Add the Average Sales calculated column.

6.3.8 Worksheet Column Headings on Scroll

Another interesting feature is that as you scroll down the table the worksheet column headings change into the table

header labels – for large Tables this saves some time by not having to use Freeze Panes or Split to keep the table header

in view after scrolling down a long list of data.

Figure 6-25: Worksheet column headings replaced with table header labels.

Product Qtr 1 Qtr 2 Qtr 3 Qtr 4 Grand Total

Average Quarterly

Sales

Chai $706 $878 $1,175 $2,129 $4,887 $1,222

Chang $2,721 $228 $2,062 $2,028 $7,039 $1,760

Chartreuse verte $590 $360 $1,101 $2,425 $4,476 $1,119

Côte de Blaye $25,127 $12,806 $7,312 $1,318 $46,563 $11,641

Guaraná Fantástica $529 $468 $219 $338 $1,554 $388

Ipoh Coffee $1,398 $4,497 $1,196 $3,979 $11,070 $2,767

Lakkal ikööri $1,142 $1,774 $3,262 $1,706 $7,883 $1,971

Laughing Lumberjack Lager $518 $350 $42 $910 $303

Outback Lager $1,508 $384 $1,253 $2,684 $5,828 $1,457

Rhönbräu Klosterbier $215 $1,509 $1,234 $1,234 $4,191 $1,048

Sasquatch Ale $179 $1,037 $750 $1,967 $656

Steeleye Stout $1,742 $1,008 $1,683 $1,274 $5,707 $1,427

L'araniciata Sanpel legrino $191 $1,343 $823 $1,098 $3,455 $864

Total $36,049 $26,810 $21,668 $21,002 $105,529

Page 138: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

138 6.3.9 Convert Table to a Normal Data Range

Finally, convert the table to a normal range of data and reformat the title row.

A Table loses some of its formatting when converted to a normal range so:

6. Make a copy of the worksheet Beverages. Accept the default worksheet copy name Beverages(2).

Now convert to a normal data range:

7. Activate the Beverages worksheet. Activate any cell in the table. Apply Table | Design | Tools | Convert to

Range or Right Mouse | Table: Convert to Range.

8. Click Yes to convert the table to a normal range.

9. Select the header row. Change the font color to: White, Background 1 (see Figure 6-26).

Figure 6-26: The Beverages table converted to a normal range of data.

Conversion to a normal data range removes the table tools (the drop down arrows and the resize handle). It also

replaces the structured references with “normal” references as illustrated for cell G5 in Figure 6-26 above. The only

remaining feature is the formatting applied by the user.

Note:

If the normal data range needs to be updated foruse as a table then click anywhere inside the table and press Ctrl + T (or

the Insert Ribbon). The table will be recreated using the default Table Style format. However neither the Total row

formula drop-down box nor the structured references will be restored. This is why it is a good idea to make a copy of

the table on another worksheet before converting the table to a normal range of data.

10. Activate a cell in the table. Press Ctrl + T or apply Insert | Tables | Table and in the Create Table dialog box click

OK. Apply Table Style Medium 2.

11. Undo to return the data to a normal range of data.

Page 139: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

139

6.4 Introduction to Conditional Formatting

Conditional formatting, first encountered in Bob’s widgets, can be used to supplement or replace filtering. Excel allows a

wide variety of pre and user defined rules for conditional formatting. A few of these will be explored below.

6.4.1 Find Blank Cells

1. Home |Styles to access the Conditional Formatting option.

2. Activate the Beverages (2) worksheet. Select C5:F17 (the data in the table) and apply Conditional Formatting |

Highlight Cell Rules: Equal To… input 0 in the text field and accept the default fill and text colors (see Figure

6-27). Click OK.

3. Input 0 into the red highlighted cells and remove the conditional formatting from these cells.

Figure 6-27: Find the blank cells.

Question 6-4: The difference between blank and zero.

Will replacing blanks with $0 affect calculations?

Answer

Yes. Remember built in functions ignore blanks but calculate zeroes. So any AVERAGE function that formerly contained

a blank cell in the range will calculate a reduced value when zero replaces the blank. The point is that you must be sure it

makes sense to replace blanks by zero before doing so.

Page 140: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

140 6.4.2 Top/Bottom Rules

1. Apply a Top 10% conditional format (use green highlighting) and a Bottom 10% conditional format (use red

highlighting).

Figure 6-28: Top 10% (Green highlighted) and Bottom 10% (Red highlighted) Top/Bottom Rules.

2. Examine the rule (and explore) by selecting Conditional Formatting| Manage Rules |Edit takes you to (Figure

6-29). When you are finished examining the dialog box Clear the rules.

Figure 6-30: Top 10% Rule Type and Description.

6.4.3 Icon and Color Sets

Excel offers a variety of “fancier” choices that may enhance the impact of the conditional format. Using these is really a

matter of taste. So, to get a sense of what can be done…

Product Qtr 1 Qtr 2 Qtr 3 Qtr 4

Chai $706 $878 $1,175 $2,129

Chang $2,721 $228 $2,062 $2,028

Chartreuse verte $590 $360 $1,101 $2,425

Côte de Blaye $25,127 $12,806 $7,312 $1,318

Guaraná Fantástica $529 $468 $219 $338

Ipoh Coffee $1,398 $4,497 $1,196 $3,979

Lakkal ikööri $1,142 $1,774 $3,262 $1,706

L'araniciata Sanpel legrino $191 $1,343 $823 $1,098

Laughing Lumberjack Lager $0 $518 $350 $42

Outback Lager $1,508 $384 $1,253 $2,684

Rhönbräu Klosterbier $215 $1,509 $1,234 $1,234

Sasquatch Ale $179 $1,037 $0 $750

Steeleye Stout $1,742 $1,008 $1,683 $1,274

Page 141: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

141

3. Select the entire data in the table and apply Icon Sets the 4 Arrows (Colored) conditional format:

Figure 6-31 4: Arrows (Colored) Icon Sets.

4. To understand what the arrows mean, select the entire data in the table, select Manage Rules… and click on the

Edit Rule… button.

Figure 6-32: Icon Sets Rule Type and Description.

Note that the type of icon added to each cell depends upon its value relative to the maximum value in the data table.

Observe that the comparison operator, value threshold and type of comparison (Number, Percent, Formula, and

Percentile) can be edited.

Icon Sets might provide a useful visual cue about trends in the data or relative magnitude of the data.

Page 142: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

142

5. Cancel out of the New Formatting Rule dialog box and in the Conditional Formatting Rules Manager dialog box,

click on the Delete Rule button and click OK. This removes the Icon Sets conditional formatting from the table

data.

As noted above using this type of conditional formatting is entirely up to the tastes of a user; however, too many icons

make the table appear a bit “on the busy side”.

Color Scales represent another formatting style:

6. Apply the Green – Yellow – Red Color Scale.

7. Review the Rule Type and Description for the Green – Yellow – Red Color Scale then delete the conditional

formatting.

This conditional format provides a visual cue about the relative magnitude of the data.

6.5 Sorting & Filtering and Outline: Subtotal The Beverages Tables was fine for illustration but data sets often involve hundreds, or thousands, or records and require

more sophisticated sorting and filtering.

1. Open the file: TBV - 2 Sales. Save As: TBV - 2 Solution.

2. Setup for analysis:

Insert ribbon Activate any cell, Insert | Table.

Select a Table style (Medium 2 is popular).

Data |Design and Name the Table Multiple-sort.

Make a copy of the sheet Sales List as back-up (accept the default name Sales List (2)).

3. Activate the Sales List worksheet.

The first 15 rows of the table should appear as follows:

Figure 6-33 Sales table, first 15 rows of data.

Country Salesperson Order Date OrderID Order Amount

UK Buchanan 7/16/2003 10248 $440.00

UK Suyama 7/10/2003 10249 $1,863.40

USA Peacock 7/12/2003 10250 $1,552.60

USA Leverling 7/15/2003 10251 $654.06

USA Peacock 7/11/2003 10252 $3,597.90

USA Leverling 7/16/2003 10253 $1,444.80

UK Buchanan 7/23/2003 10254 $556.62

UK Dodsworth 7/15/2003 10255 $2,490.50

USA Leverling 7/17/2003 10256 $517.80

USA Peacock 7/22/2003 10257 $1,119.90

USA Davolio 7/23/2003 10258 $1,614.88

USA Peacock 7/25/2003 10259 $100.80

USA Peacock 7/29/2003 10260 $1,504.65

USA Peacock 7/30/2003 10261 $448.00

USA Callahan 7/25/2003 10262 $584.00

Page 143: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

143 6.5.1 Multiple Sort

Excel allows users to sort data in a hierarchical basis (i.e. “by level” in Excel jargon).

4. Select Data | Sort button and apply the multiple sort criteria (use Add Levels) as shown in

5. Figure 6-34.

Figure 6-34: Multiple Sort criteria and results

Note the order of the sorting. The sorting order is by priority and cumulative, e.g., sort first by Country and then for

each Country sort by Salesperson and then finally, sort by Order Date for each Salesperson and Country. Excel first sorts

the Country column, once it is sorted from A to Z, Excel then sorts the Salesperson column from A to Z, for each country.

For example, the UK the salespeople are: Buchanan, Dodsworth, King, and Suyama while Callahan, Davolio, Fuller,

Leverling and Peacock are the American salespeople. Finally, for each Salesperson the Order Date, is sorted from Oldest

to Newest.

You can specify different Sort On criteria:

Figure 6-35: Sort On criteria.

Page 144: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

144 This could come in handy if some Conditional Formatting had been applied prior to sort (Cell Color, Font Color and Cell

Icon can be added using conditional formatting) or when negative dollar values are formatted to a currency format

displaying red.

You can specify different Order Criteria:

Figure 6-36: Order criteria.

The 2 main choices (e.g., A to Z, Z to A) are from small to large or from large to small. A Custom List… Order is used for

data that has been entered using abbreviations (e.g., Mon for Monday):

Figure 6-37: Custom List.

You can add your own Custom List by selecting NEW LIST, input your list in the List entries panel and clicking the Add

button when finished. Use this for nonstandard sort criteria, that Excel does not recognize, but you require to sort a list

(e.g., J, F, M for January, February,March). The Custom List will then appear in the Order list.

Page 145: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

145 You can copy a level and edit to suit your needs by selecting an existing sort level and clicking the Copy Level button; you

can change the sort order by selecting a sort and moving it up or down by clicking the Move Up or Move Down buttons.

If you have a large table, about as wide as it is tall and similar data you can specify whether the sort is from top to

bottom or from left to right by clicking the Options… button and selecting an Orientation:

Figure 6-38: Sort Options dialog box.

When case matters in the sort (e.g., lower case, UPPER CASE), specify this as a part of the sort criteria. Notice that Excel

has “grayed out” the Sort left to right button for our multiple sort of the Multiple_Sort table since it is obvious that this

is a top to bottom oriented table.

6. Unhide the: Multiple Sort, compare to your results and fix any errors.

7. Activate the Sales List worksheet and to remove the sort criteria applied, click on the Clear button in the Sort &

Filter group. To verify the sort criteria have been removed, open the Sort dialog box – there should be no sort

levels in the list. Note that the original sort order has not been restored after removing the sort criteria –

compare the Multiple_Sort table to the Sales List (2) worksheet table to verify this.

8. Save the file: TBV - 2 Solution.

6.5.2 Number Filters

Before applying filters to the Multiple_Sort table, it may be useful to add a Total row to determine the number of rows

(records) and the average sales value.

1. Open the file: TBV - 2 Solution.

2. Activate the Sales List worksheet, add a Total Row and in the Total row specify Count for the Order ID column

and Average for the Order Amount column:

Figure 6-39: Sales List Total row.

SUBTOTAL Functions to count and the

number of orders on display and report

their average value.

Page 146: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

146 Figure 6-39 indicates there are 799 rows (records) in the Multiple_Sort table and the average Order Amount is

$1,537.33.

Question 6-5: Above Average Order Amounts.

How many orders are above average (Order Amounts > $1,537.33)?

Answer

271.

Apply an Above Average number filter to the Order Amount column and then sort largest to smallest:

3. Unhide the Above Average worksheet, compare to your results and fix any errors.

4. Hide the Multiple Sort and Above Average worksheets.

5. Clear the filter and sort state of the table in the Sales List worksheet.

Question 6-6: Top 10.

What are the top 10 and the top 10% order values?

Answer

Apply a Top 10 filter and select Items (see Figure 6-40) for the Top 10 order values (see Figure 6-41). Copy the worksheet

and in the worksheet copy, apply a Top 10 filter and select Percent for the Top 10% order values (see Figure 6-42).

Figure 6-40: Top 10 AutoFilter dialog box.

Figure 6-41: Top 10 order values.

Country Salesperson Order Date OrderID Order Amount

USA Fuller 2/12/2005 10865 $16,387.50

USA Davolio 4/2/2005 10981 $15,810.00

UK King 4/27/2005 11030 $12,615.05

UK Dodsworth 2/23/2005 10889 $11,380.00

USA Peacock 1/28/2004 10417 $11,188.40

USA Leverling 1/13/2005 10817 $10,952.84

USA Leverling 2/25/2005 10897 $10,835.24

USA Leverling 3/21/2004 10479 $10,495.60

USA Leverling 6/13/2004 10540 $10,191.70

USA Fuller 10/22/2004 10691 $10,164.80

Total 10 $12,002.11

Page 147: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

147 Figure 6-42: Top 10% order values.

6. Clear the filter and sort state of the table in the Sales List worksheet.

Question 6-7: Filter for a range of data.

Filter for orders with an Order ID between 11000 and 11020.

Answer

In the Order ID column, apply the Between number filter and in the Custom AutoFilter dialog box, make the following

inputs:

Figure 6-43: Filter range inputs for Order ID’s.

Page 148: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

148 Figure 6-44: Order ID’s in the 11000 to 11020 range.

7. Clear the filter and sort state of the table in the Sales List worksheet.

8. Save the file: TBV - 2 Solution.

6.5.3 Text Filters

1. Open the file: TBV - 2 Solution.

2. Unhide the Products List worksheet.

3. Insert a table for the Products List and name it Products. Apply a table style to suit your tastes. Add a Total Row

to the table, a sum formula for the Sales column and a count formula for the Product column (AutoFit the

column width as required). Make a copy of the Products List worksheet and accept the default worksheet

name. The bottom of the Products table should now appear as follows:

Figure 6-45: Products table Total row with a count formula for the Product column and a sum formula for the Sales column.

From Figure 6-45 shows there are 286 products with sales totaling $608,846.76 over 4 quarters.

Country Salesperson Order Date OrderID Order Amount

UK Dodsworth 4/20/2005 11017 $6,750.00

UK Dodsworth 4/13/2005 11016 $491.50

USA Davolio 4/17/2005 11012 $2,825.30

USA Fuller 4/14/2005 11001 $2,769.00

USA Callahan 4/13/2005 11007 $2,633.90

USA Fuller 4/10/2005 11005 $586.00

USA Fuller 4/10/2005 11009 $616.50

USA Fuller 4/10/2005 11013 $361.00

USA Fuller 4/14/2005 11000 $903.75

USA Fuller 4/15/2005 11014 $243.18

USA Fuller 4/16/2005 11020 $632.40

USA Fuller 4/20/2005 11015 $622.35

USA Fuller 4/21/2005 11010 $645.00

USA Leverling 4/8/2005 11003 $326.00

USA Peacock 4/16/2005 11002 $1,811.10

USA Leverling 4/13/2005 11011 $933.50

USA Leverling 4/15/2005 11006 $329.69

USA Leverling 4/20/2005 11004 $295.38

USA Peacock 4/16/2005 11018 $1,575.00

Total 19 $1,334.24

Page 149: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

149 Question 6-8: Produce products.

How many products are there in the Produce category and what was their total sales value?

Answer

There are 19 products in the Produce category with a total sales value of $53,019.98.

In the Category column filter, deselect all of the categories (uncheck the Select All checkbox) and check the Produce

checkbox (see Figure 6-46).

4. Hide the Produce worksheet.

5. Clear the filter and sort state of the table in the Products List worksheet.

Figure 6-46: Category filter for Produce products.

Figure 6-47: Filtered table for Produce products.

Question 6-9: Specific product name.

Category Product Sales Quarter

Produce Longlife Tofu $360.00 Qtr 1

Produce Longlife Tofu $128.00 Qtr 2

Produce Longlife Tofu $400.00 Qtr 4

Produce Manjimup Dried Apples $1,411.92 Qtr 1

Produce Manjimup Dried Apples $8,384.60 Qtr 2

Produce Manjimup Dried Apples $1,855.00 Qtr 3

Produce Manjimup Dried Apples $11,898.50 Qtr 4

Produce Rössle Sauerkraut $4,105.92 Qtr 1

Produce Rössle Sauerkraut $3,310.56 Qtr 2

Produce Rössle Sauerkraut $1,881.00 Qtr 3

Produce Rössle Sauerkraut $3,556.80 Qtr 4

Produce Tofu $2,018.10 Qtr 1

Produce Tofu $2,185.50 Qtr 2

Produce Tofu $1,866.97 Qtr 3

Produce Tofu $470.81 Qtr 4

Produce Uncle Bob's Organic Dried Pears $1,084.80 Qtr 1

Produce Uncle Bob's Organic Dried Pears $1,575.00 Qtr 2

Produce Uncle Bob's Organic Dried Pears $2,700.00 Qtr 3

Produce Uncle Bob's Organic Dried Pears $3,826.50 Qtr 4

Total 19 $53,019.98

Page 150: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

150 Find a product that has the words “mix” and “chef” in its name and what were its total sales?

Answer

Chef Anton's Gumbo Mix. $373.62.

Use the Contains… text filter with the filter criteria as shown in Figure 6-48.

Figure 6-48: Contains text filter to find a product containing the words “mix” and “chef”.

Figure 6-49: Contains text filter results (AND).

Note that we used AND in the filter criteria since we want products containing both words. If we had specified OR, we

would have obtained products that contained any of the two words:

Figure 6-50: Contains text filter results (OR).

6. Clear the filter and sort state of the table in the Products List worksheet.

You may have noticed the following information in the bottom left corner of the AutoFilter dialog box:

Figure 6-51: Wildcard characters.

Category Product Sales Quarter

Condiments Chef Anton's Gumbo Mix $288.22 Qtr 3

Condiments Chef Anton's Gumbo Mix $85.40 Qtr 4

Total 2 $373.62

Category Product Sales Quarter

Condiments Chef Anton's Cajun Seasoning $225.28 Qtr 1

Condiments Chef Anton's Cajun Seasoning $2,970.00 Qtr 2

Condiments Chef Anton's Cajun Seasoning $1,337.60 Qtr 3

Condiments Chef Anton's Cajun Seasoning $682.00 Qtr 4

Condiments Chef Anton's Gumbo Mix $288.22 Qtr 3

Condiments Chef Anton's Gumbo Mix $85.40 Qtr 4

Grains/Cereals Filo Mix $187.60 Qtr 1

Grains/Cereals Filo Mix $742.00 Qtr 2

Grains/Cereals Filo Mix $226.80 Qtr 3

Grains/Cereals Filo Mix $911.75 Qtr 4

Total 10 $7,656.65

Page 151: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

151 At times, you may want to filter for specific word characters. The “? and *” wildcard characters are used for this

purpose. Read Table 6-1 for a description of wildcard characters. Note that tilde ~ is used to find the characters ? and *

in a word (a wildcard filter will ignore ? and * unless you tell Excel to look for them in a word by preceding them with ~).

Table 6-1: Wildcard characters and examples (from Excel Help).

Use To find

? (question mark) Any single character For example, sm?th finds "smith" and "smyth"

* (asterisk) Any number of characters For example, *east finds "Northeast" and "Southeast"

~ (tilde) followed by ?, *, or ~ A question mark, asterisk, or tilde For example, fy06~? finds "fy06?"

Wildcard characters are used as comparison criteria for text filters, and when searching and replacing content.

Question 6-10: Wildcards.

Your boss wants you to find all of the sauce products currently sold, including German sauces. He wants to know how

many sauce products there are and their total sales value. He goes on to tell you that sauce might be spelled as “Soße”

in German (where the ß = “ss”, e.g., Straße = strasse, road in English). Mercifully, he goes on to say there are no Spanish

(“salsa”) or Italian sauce products (e.g., “salsa” or “sugo”).

Answer

This is a tricky one. The “contains” filter captures the English word “sauce”. Since most of you do not speak German, you

rely on your boss as to the German spelling (you could check the list manually) and input the filter “so?e” using “?” to

accept any character (i.e. the ß).

Figure 6-52: Contains text filter with the “?” wildcard to identify ß.

Notice you cannot use this setup “*ß*” since other German word’s might contain ß.

Figure 6-53 shows the results of the wildcard text filter.

Page 152: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

152 Figure 6-53: Sauce products.

From Figure 6-53 we note that there are 3 sauce products (by inspection) and their total sales value is $18,498.06 (for

the curious: “grüne” is “green” in German, like “Die Grünen” or “the Greens” as in “Green Party” or “Grüne Partei”, so

“grüne Soße” is “green sauce” in English…a literal translation).

7. Clear the filter and sort state of the table in the Products List worksheet.

8. Save the file: TBV - 2 Solution.

6.5.4 Date Filters

At times you may want to filter a table by year, month, week, day and so forth to obtain sales data for a period. Date

filters are very handy for this type of filtering.

1. Open the file: TBV - 2 Solution.

2. Unhide the Sales List worksheet and hide the

Products List and Products List (2) worksheets. Change the

Total row Order Amount formula to calculate the sum.

3. Click on the Order Date Sort & Filter drop-down

icon to view the available date sort and filter criteria (see

Figure 6-54).

Excel has many built-in date filters which are based on the

current date (e.g., Tomorrow, Today, This Week, Last

Month, Next Year, Year to Date) or any date (i.e., Equals,

Before, After, Between, All Dates in the Period, Custom

Filter).

Category Product Sales Quarter

Condiments Louisiana Fiery Hot Pepper Sauce $1,347.36 Qtr 1

Condiments Louisiana Fiery Hot Pepper Sauce $2,150.77 Qtr 2

Condiments Louisiana Fiery Hot Pepper Sauce $1,975.54 Qtr 3

Condiments Louisiana Fiery Hot Pepper Sauce $3,857.41 Qtr 4

Condiments Northwoods Cranberry Sauce $1,300.00 Qtr 2

Condiments Northwoods Cranberry Sauce $2,960.00 Qtr 4

Condiments Original Frankfurter grüne Soße $1,112.80 Qtr 1

Condiments Original Frankfurter grüne Soße $1,027.78 Qtr 2

Condiments Original Frankfurter grüne Soße $2,255.50 Qtr 3

Condiments Original Frankfurter grüne Soße $510.90 Qtr 4

Total 10 $18,498.06

Figure 6-54: Date sort and filter criteria.

Page 153: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

153 You may be wondering why Excel has built-in date filters for dates in the future – remember some of the data you will

be parsing (analyzing and in our case, by sorting and/or filtering) may consist of forecasts (e.g., forecasted demand,

forecasted sales).

Question 6-11: Leverling’s January 2005 sales.

Your boss has asked you to calculate how many orders the salesperson: Leverling placed in January 2005, their total

value and to sort the filtered data in chronological order?

Answer

In January 2005, Leverling placed 10 orders worth $23,638.68 in total.

To obtain this result apply the following filter criteria to the Salesperson and Order Date columns and sort criteria to the

Order Date column:

Figure 6-55 Filter and sort criteria for January 2005 orders by Leverling.

With the following result:

Figure 6-56: Leverling January 2005 filters and oldest to newest Order Date sort results.

4. Unhide the Leverling worksheet, compare to your results and fix any errors.

5. Hide the Leverling worksheet.

6. Clear the filter and sort state of the table in the Sales List worksheet.

Country Salesperson Order Date OrderID Order Amount

USA Leverling 1/5/2005 10806 $439.60

USA Leverling 1/8/2005 10793 $191.10

USA Leverling 1/13/2005 10817 $10,952.84

USA Leverling 1/13/2005 10820 $1,140.00

USA Leverling 1/14/2005 10796 $2,341.36

USA Leverling 1/14/2005 10779 $1,335.00

USA Leverling 1/14/2005 10814 $1,788.45

USA Leverling 1/22/2005 10839 $827.55

USA Leverling 1/23/2005 10831 $2,684.40

USA Leverling 1/23/2005 10838 $1,938.38

Total 10 $23,638.68

Page 154: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

154 Question 6-12: Between two dates.

Your boss a summary of the orders placed between 10/02/05 and 05/02/05?

Answer

To obtain the answer, specify a Between date filter, in the Order Date column. Input the dates directly or use the Date

Picker control to specify the start and end dates for November 2005 (see Figure 6-57).

Figure 6-57: Between date filter and the Date picker:

7. Unhide the Feb 05 worksheet, compare to your results and fix any errors.

8. Hide the Feb 05 worksheet.

9. Clear the filter and sort state of the table in the Sales List worksheet.

10. Unhide the Products List (2) worksheet and hide the Sales List worksheet.

11. Save the file: TBV - 2 Solution.

Country Salesperson Order Date OrderID Order Amount

USA Peacock 04/02/2005 10816 $8,446.45

USA Leverling 05/02/2005 10854 $2,966.50

UK Buchanan 02/02/2005 10851 $2,603.00

USA Leverling 04/02/2005 10855 $2,227.89

UK Dodsworth 04/02/2005 10828 $932.00

UK Dodsworth 03/02/2005 10853 $625.00

USA Fuller 03/02/2005 10858 $649.00

USA Davolio 02/02/2005 10859 $1,078.69

USA Leverling 04/02/2005 10860 $519.00

USA Callahan 02/02/2005 10862 $581.00

Total 10 $20,628.53

Page 155: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

155 6.5.5 Outline: Subtotal

Study Figure 6-58 closely and ask yourself this question: “How, using Sort & Filter, could I produce a summary of total

sales for each product category in the Products List?”

Figure 6-58: Outline: Subtotal applied to the Products List.

The answer is: you cannot. You can only show one total at a time in the Total row (e.g., a Grand Total for all products, a

total for Dairy products).

Remember if this is a common problem, then more than likely a solution exists in Excel. In this case the solution is the

Subtotal feature found in the Outline group of the Data ribbon. Outline: Subtotal is not the same as the SUBTOTAL

function although some of the results are similar.

Before applying the Outline: Subtotal command to the data in our Products List (2) worksheet, let’s examine some of its

key features and caveats:

1. Subtotal CANNOT be applied in an Excel table, it can only be applied to a range of data (“raw” data) that has not

been converted into an Excel table (i.e., if your data is in an Excel table, you will have to FIRST apply the Convert

to Range command to convert the table to a range of data BEFORE applying Subtotal).

2. Subtotal uses the SUBTOTAL function (e.g., SUM, AVERAGE, COUNT) in its calculations.

3. Subtotal can calculate a Grand Total which is based on the Summary function selected in (2) above.

4. Subtotals are presented hierarchically, usually with 3 levels of information:

a. Level 1 shows the Grand Total.

b. Level 2 shows the subtotal results only (same a Figure 6-58).

c. Level 3 shows the subtotal results and the detailed data summarized for each subtotal.

5. The data can be edited (values, labels can be changed or rows can be deleted) and the subtotals will

automatically update.

6. The data MUST contain header titles and be SORTED in advance (if you want to sort by product Category, you

must sort the product Category column BEFORE applying subtotal).

Now that we have an understanding of what Subtotals can and cannot do, let’s apply Subtotals to the Products List (2)

worksheet data list.

1. Open the file: TBV - 2 Solution.

2. Activate the Products List (2) worksheet (a copy of the Product List worksheet was created in Section 6.5.3) and

hide all other worksheets.

3. If the data list is in Excel table format, apply Table Tools |Design |Convert to Range to convert to a normal

range of data.

4. Activate any cell in the data list, sort the Category column (A to Z).

Category Sales

Beverages Total $102,074.29

Condiments Total $55,277.56

Confections Total $80,894.11

Dairy Products Total $114,749.75

Grains/Cereals Total $55,948.82

Meat/Poultry Total $81,338.06

Produce Total $53,019.98

Seafood Total $65,544.19

Grand Total $608,846.76

Page 156: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

156

5. Data |Outline |Subtotal button (see Figure 6-59). This will open the Subtotal dialog box and select the data (see

Figure 6-60).

Figure 6-59: Subtotal command.

Figure 6-60: Subtotal dialog box.

6. Examine Figure 6-61. ENSURE that the data list is FIRST sorted by the header row title you want a subtotal for (in

this case Category – i.e. do not skip the steps above). Now we want to summarize the Category total sales so

input the Dialog box:

Page 157: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

157 Figure 6-61: Subtotal dialog box criteria.

7. Check the Replace current subtotals checkbox if you intend to apply a subtotal calculation more than once.

8. Check the Summary below data checkbox if you want the subtotals to appear below the data list, uncheck it if

you want the subtotals to appear above the data list.

9. OK.

10. The top part of your worksheet should now appear as follows:

Figure 6-62: Results of applying Subtotal at each change in Category.

11. Scroll down the list and examine the subtotals at each change in product Category.

Note that the total sales for each product Category has been calculated and a Grand Total using the SUBTOTAL function.

Page 158: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

158 Figure 6-63: Beverages total sales, Seafood total sales and the Grand Total sales calculated using the SUBTOTAL function.

12. To display a summary of just the subtotals and grand totals, click the outline symbols to the left of the

row numbers. Use the and symbols to display or hide the detail rows for individual subtotals. See Figure

6-63 for an example of Outline Level 3 and the figures that follow for examples of Outline Levels 1 and 2.

Figure 6-64: Outline Level 2 displays the Category sales subtotals and the Grand Total sales.

Unhide the sheet Subtotal if you could not generate Figure 6-64.

13. Hide the Subtotal worksheet.

14. Remove Subtotal by activating a cell in the data list, click the Subtotal button in the Outline group and click

Remove All.

15. Save the file: TBV - 2 Solution.

Sorting & Filtering and Subtotal are powerful tools to convert data into information; however, at times you may want

specific information from a range of data requiring more sophisticated tools than Sorting & Filtering and Subtotal can

provide or you may require additional information (e.g., more than one total for a specific column such as: total sales,

average sales, standard deviation of sales etc.).

The Functions section that follows provides proposed solutions for the above needs.

Page 159: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

159

7 Functions and Descriptive Statistics as alternatives to Tables

Data Tables and Pivot Tables are fine for many purposes but sometimes you want a more ways to summarize and

compare data. In such situations you may want to access various built in functions (SUBTOTAL, SUMIF, SUMIFS,

AVERAGEIF, AVERAGEIFS, MIN, MAX, MODE, SMALL and LARGE) or use Excel’s built-in Descriptive Statistics tool

generate a richer set of results.

7.1.1 SUBTOTAL to create a richer analysis.

Data Tables are “new” to Excel 2007 and are handy. However they are somewhat restricted in the range of comparisons.

Suppose you set up a Data Table and filter it to find all the sales made by Leverling. The results are given as Figure 7-1.

Figure 7-1: Using Data Tables to analyze sales.

Now consider Figure 7-2 which inputs functions then filters on Leverling.

Figure 7-2: Using Excel functions to analyze sales

Comparing the results we note that:

a. By placing the functions above the data you do not have to scroll down to see the calculations.

b. Using functions allows for more comparisons. It seems sensible to think about Callahan’s results in comparison

to the overall results. A Table and Total Row do not allow you to calculate the largest, smallest, average, total

and count of the order values – only one of these values could be calculated. Nor could you recalculate all of

these values based on some filter criteria.

Page 160: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

160

c. Finally a small point. The label “Total” in the Data Table model can be misleading if you choose subtotal

functions like MIN or MAX.

1. Open the file: TBV - 3 Functions.

2. Save as: TBV - 3 Solution.

Question 7-1: Creating the calculations area (If you have problems the answers are on the next page).

Insert functions (and formulas) to complete the calculation area in Figure 7-3below. Since the list ahs not bee filtered

the “subtotal” values are equal to the values for the whole list –a good check.

If you have problems look at the solution on the next page

a. B2, E2 and E6 are subtotal functions.

b. B3, E3 and E7 are regular functions.

c. B4 and E4 are simple formulas.

Figure 7-3: Subtotals

3. When your formulae are finished select A9.

4. Data | Filter | then filter for Callahan.

5. If your results agree with Figure 7-3. Save the file.

6. If not check your formulae against those on the next page.

Notice that you do not need to insert a Table to access filtering.

•If you want to use functions you must insert at least one blank row between the calculations and the list of data, otherwise Excel will treat the calculations as a part of the list of data (if we apply a sort and/or filter to the list)..

Critical Idea

1

2

3

4

5

6

7

8

A B C D E

Filter Total 799 Filter Total $1,228,327

Grand Total 799 Grand Total $1,228,327

Percent of Total 100% Percent of Total 100%

Filter Average $1,537

Overall Average $1,537

Page 161: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

161 Answer.

Figure 7-4: The formulae.

7.1.1.1 Variations of SUBTOTAL - Filtering Data versus Hiding Rows

Excel 2007 contains two variations on the Subtotal Function as illustrated in Table 7-1: Variations on SUBTOTAL from

Excel Help from Excel Help.

Table 7-1: Variations on SUBTOTAL from Excel Help

Syntax: SUBTOTAL(function_num, ref1, ref2, ...)

The argument “Function_num” is the number 1 to 11 (includes hidden values) or 101 to 111 (ignores hidden values) that

specifies which function to use in calculating subtotals within a list.

Function_num (includes hidden values)

Function_num (ignores hidden values) Function

1 101 AVERAGE

2 102 COUNT

3 103 COUNTA

4 104 MAX

5 105 MIN

6 106 PRODUCT

7 107 STDEV

8 108 STDEVP

9 109 SUM

10 110 VAR

11 111 VARP

2

3

4

5

6

7

A B C D E

Filter Total =SUBTOTAL(3,$B$10:$B$808) Filter Total =SUBTOTAL(9,$E$10:$E$808)

Grand Total =COUNTA($C$10:$C$808) Grand Total =SUM($E$10:$E$808)

Percent of Total =B2/B3 Percent of Total =E2/E3

Filter Average =SUBTOTAL(1,$E$10:$E$808)

Overall Average =AVERAGE($E$10:$E$808)

Page 162: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

162 According to Help:

a. “For the function_num constants from 1 to 11, the SUBTOTAL function includes the values of rows hidden by the Hide Rows command under the Hide & Unhide submenu of the Format command in the Cells group on the Sheet tab. Use these constants when you want to subtotal hidden and non-hidden numbers in a list. For the function_num constants from 101 to 111, the SUBTOTAL function ignores values of rows hidden by the Hide Rows command. Use these constants when you want to subtotal only non-hidden numbers in a list.

b. The SUBTOTAL function ignores any rows that are not included in the result of a filter, no matter which function_num value you use.

c. The SUBTOTAL function is designed for columns of data or vertical ranges. It is not designed for rows of data, or horizontal ranges. For example, when you subtotal a horizontal range using a function_num of 101 or greater, such as SUBTOTAL(109,B2:G2), hiding a column does not affect the subtotal. But, hiding a row in a subtotal of a vertical range does affect the subtotal.”

Point “a” is interesting:

1. Open the file TBV – 3 Solutions.

2. Unhide the sheet Variations on Subtotal.

Figure 7-5 shows that cells C2 and E2 use Function_num 3 and 9 as arguments whereas C18 and E18 use 103 and 109 for

the arguments.

Figure 7-5: Comparing the SUBTOTAL Functions.

3. Filter for King. The SUBTOTAL counts and sums are the same for both sets of functions:

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

B C D E

SUBTOTAL COUNT =SUBTOTAL(3,C8:C17) SUBTOTAL SUM =SUBTOTAL(9,E8:E16)

COUNT =COUNT(C8:C17) SUM =SUM(E8:E17)

Salesperson Order Date OrderID Order Amount

Fuller 38473 11042 405.75

Buchanan 38471 11043 210

Peacock 38473 11044 591.6

Callahan 38466 11046 1485.8

King 38473 11047 817.87

King 38472 11048 525

Leverling 38473 11052 1332

Fuller 38471 11053 3055

Callahan 38473 11056 3740

Leverling 38473 11057 45

=SUBTOTAL(103,'Sales List (2)'!$C$8:$C$17) =SUBTOTAL(109,'Sales List (2)'!$E$8:$E$17)

Page 163: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

163 Figure 7-6: The Impact of Filtering.

4. Clear the Filter for King.

5. Hide rows 12 and 13 (i.e. King’s sales). As Figure 7-7 shows the results are quite different for the SUBTOTALS.

Figure 7-7: The Impact of Hiding.

Interestingly Excel defaults to the 100 plus arguments when it inserts subtotals in Tables but when you go to input

functions Formula AutoComplete offers all possible arguments.

2

3

4

5

6

7

12

13

18

A B C D E

SUBTOTAL COUNT 2 SUBTOTAL SUM $1,342.87

COUNT 10 SUM $12,208.02

Country Salesperson Order Date OrderID Order Amount

UK King 01/05/2005 11047 $817.87

UK King 30/04/2005 11048 $525.00

Total 2 $1,342.87

2

3

4

5

6

7

8

9

10

11

14

15

16

17

18

A B C D E

SUBTOTAL COUNT 10 SUBTOTAL SUM $12,163.02

COUNT 10 SUM $12,208.02

Country Salesperson Order Date OrderID Order Amount

USA Fuller 01/05/2005 11042 $405.75

UK Buchanan 29/04/2005 11043 $210.00

USA Peacock 01/05/2005 11044 $591.60

USA Callahan 24/04/2005 11046 $1,485.80

USA Leverling 01/05/2005 11052 $1,332.00

USA Fuller 29/04/2005 11053 $3,055.00

USA Callahan 01/05/2005 11056 $3,740.00

USA Leverling 01/05/2005 11057 $45.00

Total 8 $10,865.15

•If you want to exclude any hidden cells from your subtotals use arguments 101-109

•If you want to include hidden cell values in subtotals use arguments 1-9

•Basic functions like SUM ,COUNT or AVERAGE include both hidden and filtered cells in their calculations.

Tips

Page 164: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

164 7.1.2 SUMIF and SUMIFS

1. Open the file: TBV - 3 Solution.

2. Unhide the worksheet: Aged. Hide all other worksheets.

Examine Figure 7-8. Column E shows when an invoice (an Order) is due. Column F shows the current date or report date.

Column G shows whether an invoice has been paid by the due date or remains to be paid, as of the report date. SUMIF

or SUMIFS can be used to calculate an Aged A/R list from this data.

Figure 7-8: Invoice list with Aged A/R.

First, examine the syntax information for the SUMIF function (from Excel Help):

SUMIF(range,criteria,sum_range)

Range is the range of cells that you want evaluated by criteria. Cells in each range must be numbers or names, arrays, or references that contain numbers. Blank and text values are ignored.

Criteria is the criteria in the form of a number, expression, or text that defines which cells will be added. For example, criteria can be expressed as 32, "32", ">32", or "apples".

Sum_range are the actual cells to add if their corresponding cells in range match criteria. If sum_range is omitted, the cells in range are both evaluated by criteria and added if they match criteria.

Now examine the formulas in cells E2:E6. Think about how the SUMIF formulas are working. It’s a bit awkward to

subtract out the previously recorded data (for example E3 the >30 to 60 day range needs to do the SUMIF then subtract

the $533.34 for the less than or equal to 30 days). Next consider the SUMIFS syntax:

SUMIFS(sum_range,criteria_range1,criteria1,criteria_range2,criteria2…)

Sum_range is one or more cells to sum, including numbers or names, arrays, or references that contain numbers. Blank and text values are ignored.

Criteria_range1, criteria_range2, … are 1 to 127 ranges in which to evaluate the associated criteria.

Criteria1, criteria2 … are 1 to 127 criteria in the form of a number, expression, cell reference, or text that define which cells will be added. For example, criteria can be expressed as 32, "32", ">32", "apples", or B4.

1

2

3

4

5

6

7

8

9

10

11

A B C D E F G H

Aged A/R: Dollars % of Total % of Total Order Value0 to 30 days 533.34$ > 30 day to 60 days 48.41$ > 60 days to 90 days 271.48$ > 90 days to 120 days 327.83$ > 120 days 234.03$

Total Total 1,415.09$

Obs # Order Value Order ID Customer Payment Due Date Report Date Payment Received Days AR1 32.38$ 10248 Wilman Kala July 4, 1996 November 29, 1996 YES2 11.61$ 10249 Tradição Hipermercados July 5, 1996 November 29, 1996 NO 147

Page 165: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

165 Question 7-2: Replacing the SUMIF with SUMIFS

SUMIFS allows you to create multiple criteria. This means that you should be able to replace the formulae in Column E with SUMIF alone (no nee to subtract out earlier entries). The task is to:

3. Make a copy of the worksheet: Aged and accept the default worksheet name.

4. Activate the worksheet copy. Edit the name of the new sheet to SUMIFS.

5. Delete the SUMIF functions from E2:E6.

6. Insert a set of SUMIFS in E2:E6 that calculates correctly as shown in Figure 7-9.

7. Then input formulae as follows:

a. Cell B7 that calculates the total Order Value when the list is filtered or unfiltered.

b. Cell E7 that calculates the total Aged A/R dollars.

c. Cells F2:F7 that calculate the % of the Total Aged A/R dollars.

d. Cells G2:G7 that calculate the % of the Total Order Value.

e. When you are finished compare to your results to Figure 7-9.

Figure 7-9: Results of using SUMIFS to calculate the Aged A/R.

Answer

8. If you have problems unhide the sheet Aged SUMIFS to examine formulae.

Since this is important information, we want to make sure that our calculations are correct. To do this, we will filter the

Days A/R column for Aged A/R days and compare the value in cell B7 with a corresponding value in cells E2:E6. If they

are the same, then we know that the Aged A/R values are correct.

9. Filter the Days A/R for the period 0 to 30 days and compare the results in cell B7 to cell E2.

Figure 7-10 shows the filter that would be applied to the Days A/R column and Figure 7-11 shows the results of applying

the filter. Note that the value in cell B7 agrees with the value in cell E2.

10. Apply a few more filters to satisfy yourself that the Aged A/R dollar values are calculating correctly (e.g., > 60

days to 90 days, > 120 days).

1

2

3

4

5

6

7

8

9

10

11

12

13

14

A B C D E F G H

Aged A/R: Dollars % of Total % of Total Order Value0 to 30 days 533.34$ 38% 7%> 30 day to 60 days 48.41$ 3% 1%> 60 days to 90 days 271.48$ 19% 4%> 90 days to 120 days 327.83$ 23% 4%> 120 days 234.03$ 17% 3%

Total 7,481.28$ Total 1,415.09$ 100% 19%

Obs # Order Value Order ID Customer Payment Due Date Report Date Payment Received Days A/R1 32.38$ 10248 Wilman Kala July 4, 1996 November 29, 1996 YES2 11.61$ 10249 Tradição Hipermercados July 5, 1996 November 29, 1996 NO 1473 65.83$ 10250 Hanari Carnes July 8, 1996 November 29, 1996 YES4 41.34$ 10251 Victuailles en stock July 8, 1996 November 29, 1996 YES5 51.30$ 10252 Suprêmes délices July 9, 1996 November 29, 1996 YES

Page 166: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

166 Figure 7-10: Days A/R filter for 0 to 30 days.

Figure 7-11: Results of applying the 0 to 30 days filter.

11. Save: TBV - 3 Solution.

7.1.3 AVERAGE and AVERAGEIFS

Suppose you have been asked to calculate the average Aged A/R dollar values. You guessed it; we could use the

AVERAGEIFS function (new to Excel 2007). Since we already know that SUMIFS lets us apply multiple criteria and saves

the “hassle” of keeping a running total in our formulas, we suspect that AVERAGEIFS does something similar and it does.

We could of used AVERAGEIF but we decide to use AVERAGEIFS since we can specify multiple criteria.

First, examine the syntax information for the AVERAGEIFS function (from Excel Help):

AVERAGEIFS(average_range,criteria_range1,criteria1,criteria_range2,criteria2…)

Average_range is one or more cells to average, including numbers or names, arrays, or references that contain

numbers.

Criteria_range1, criteria_range2, … are 1 to 127 ranges in which to evaluate the associated criteria.

Criteria1, criteria2, … are 1 to 127 criteria in the form of a number, expression, cell reference, or text that define which

cells will be averaged. For example, criteria can be expressed as 32, "32", ">32", "apples", or B4.

1

2

3

4

5

6

7

8

9

108

111

115

127

A B C D E F G H

Aged A/R: Dollars % of Total % of Total Order Value0 to 30 days 533.34$ 38% 7%> 30 day to 60 days 48.41$ 3% 1%> 60 days to 90 days 271.48$ 19% 4%> 90 days to 120 days 327.83$ 23% 4%> 120 days 234.03$ 17% 3%

Total 533.34$ Total 1,415.09$ 100% 19%

Obs # Order Value Order ID Customer Payment Due Date Report Date Payment Received Days A/R99 142.08$ 10346 Rattlesnake Canyon Grocery November 5, 1996 November 29, 1996 NO 24

102 8.63$ 10349 Split Rail Beer & Ale November 8, 1996 November 29, 1996 NO 21106 360.63$ 10353 Piccolo und mehr November 13, 1996 November 29, 1996 NO 16118 22.00$ 10365 Antonio Moreno Taquería November 27, 1996 November 29, 1996 NO 2

Page 167: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

167 Same idea as SUMIFS except AVERAGEIFS calculates the average.

1. Open the file: TBV - 3 Solution.

2. Unhide the make a copy of the sheet Aged SUMIFS. Hide rename the copy AVERAGEIFS.

3. Delete F1:G7 and edit the labels as indicated in Figure 7-12.

Figure 7-12: Setting up for AVERAGEIFS

Question 7-3: Replacing the SUMIFS with AVERAGEIFS.

Replace the formulas in E2:E7 with the correct AVERAGEIFS to generate Figure 7-13. Think about different ways to make

the replacement before you input the formulas. If you have problems or are wondering about shortcuts for input see the

answer below.

Figure 7-13: AVERAGEIFS results

1

2

3

4

5

6

7

8

9

D E F G

Aged A/R: Average Dollars0 to 30 days 533.34$ > 30 day to 60 days 48.41$ > 60 days to 90 days 271.48$ > 90 days to 120 days 327.83$ > 120 days 234.03$

Overall Average 1,415.09$

Customer Payment Due Date Report Date Payment Received

1

2

3

4

5

6

7

D E

Aged A/R: Average Dollars0 to 30 days $133.34> 30 day to 60 days $12.10> 60 days to 90 days $67.87> 90 days to 120 days $65.57> 120 days $78.01

Overall Average $70.75

Page 168: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

168 Answer

4. Quick input:

1. A fast way to create E2:E6 is Home | Replace input the Dialog box as follows and Replace All :

5. 6.

2. Then fill E6 down to E7 and edit “>120” to “>0”.

3. If you have problems unhide the worksheet: AVERAGEIFS Answer.

4. Save: TBV - 3 Solution.

7.1.4 COUNTIF and COUNTIFS

Your boss now thinks you are “on a roll”. He/she asks you if it would be possible to count how many invoices there are

for each Aged A/R period, the % of total Aged A/R invoices and the % of Total Invoices.

The COUNTIFS function can be used to make the calculation.

COUNTIFS(range1, criteria1,range2, criteria2…)

Range1, range2, … are 1 to 127 ranges in which to evaluate the associated criteria. Cells in each range must be

numbers or names, arrays, or references that contain numbers. Blank and text values are ignored.

Criteria1, criteria2, … are 1 to 127 criteria in the form of a number, expression, cell reference, or text that defines

which cells will be counted. For example, criteria can be expressed as 32, "32", ">32", "apples", or B4.

Question 7-4: Replacing the SUMIFS with AVERAGEIFS.

Unfortunately you cannot use the Replace method for COUNTIFS since it does not have the same number of arguments.

So:

1. Open the file: TBV - 3 Solution.

2. Unhide the worksheet: Aged COUNTIFS. Hide all other worksheets.

3. In B7 insert a formula that counts the total number of invoices whether or not the list has been filtered.

4. Create the results in Figure 7-14.

Page 169: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

169 Figure 7-14: Results of using the COUNTIFS function to calculate the number of Aged A/R invoices.

Answer

1. Unhide the worksheet: COUNTIFS Answer. Compare to your results and fix any errors.

2. Save: TBV - 3 Solution.

7.1.5 MIN, MAX and MODE

In Project Management, the Three-Time Estimate Method calculates an activity’s (or task’s) expected time and standard

deviation from duration estimates for that activity. The expected time and standard deviation are used to calculate

activity probabilities (e.g., there is a 50% probability that the activity will be completed in the expected time or less).

These calculations are used for R&D projects where there is risk associated with the activity durations. Typically, a

lengthy list of duration estimates is provided. The formulas for the expected time and standard deviation are as follows:

Equation 7-1: Expected Time.

Equation 7-2: Standard Deviation.

The Optimistic Duration is the shortest duration estimate, the Most Likely Duration is the most frequently occurring

duration estimate and the Pessimistic Duration is the longest duration estimate for an activity.

Figure 7-15 shows a duration estimate list for 10 activities.

1

2

3

4

5

6

7

8

9

10

11

12

13

14

A B C D E F G H

Aged A/R: # of Invoices % of Aged A/R Invoices % of Total Invoices0 to 30 days 4 20% 3%> 30 day to 60 days 4 20% 3%> 60 days to 90 days 4 20% 3%> 90 days to 120 days 5 25% 4%> 120 days 3 15% 2%

Count 121 Total 20 100% 17%

Obs # Order Value Order ID Customer Payment Due Date Report Date Payment Received Days A/R1 32.38$ 10248 Wilman Kala July 4, 1996 November 29, 1996 YES2 11.61$ 10249 Tradição Hipermercados July 5, 1996 November 29, 1996 NO 1473 65.83$ 10250 Hanari Carnes July 8, 1996 November 29, 1996 YES4 41.34$ 10251 Victuailles en stock July 8, 1996 November 29, 1996 YES5 51.30$ 10252 Suprêmes délices July 9, 1996 November 29, 1996 YES

Page 170: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

170 Figure 7-15: Duration estimates list.

From the above, it would be advantageous if Excel had built-in functions to help us calculate the Expected Time and

Standard Deviation. By visual inspection, we could determine the optimistic, most likely and pessimistic durations but if

Excel can do this for us, we can save some more time here as well.

As has been the theme throughout the manual: if the problem is common, it's likely a solution exists in Excel.

We can use the MIN function to determine the Optimistic Duration, the MODE function to determine the Most Likely

Duration, the MAX function to determine the Pessimistic Duration. With the results of the MIN, MODE and MAX

functions we can calculate the Expected Time and Standard Deviation. Now that we have thought about how we are

going to make the calculations, we can now enter formulas.

1. Open the file: TBV - 4 Activities.

2. Save as: TBV - 4 Solution.

3. In the 3 Time worksheet, input the formulas using the functions discussed above to determine the Optimistic,

Most Likely and Pessimistic Durations and calculate the Expected Time and Standard Deviation for each activity.

4. When you are finished, unhide the worksheet: 3 Time Answer. Compare to your results and fix any errors.

5. Save as: TBV - 4 Solution.

Figure 7-16 shows the results of the calculations.

Figure 7-16: Three Time Estimate Method calculation results.

123456789

101112

A B C D E F G H I J K L

Activity Optimistic Most Likely Pessimistic Expected Time Standard DeviationA 1.00 2.00 2.00 2.00 5.00 6.00B 1.50 3.00 3.00 3.00 7.50 9.00C 2.50 5.00 5.00 5.00 12.50 15.00D 0.50 1.00 1.00 1.00 2.50 3.00E 3.00 6.00 6.00 6.00 15.00 18.00F 2.25 4.50 4.50 4.50 11.25 13.50G 1.75 3.50 3.50 3.50 8.75 10.50H 1.13 2.25 2.25 2.25 5.63 6.75I 1.88 3.75 3.75 3.75 9.38 11.25J 0.38 0.75 0.75 0.75 1.88 2.25

Duration Estimates, days

Activity Optimistic Most Likely Pessimistic Expected Time Standard Deviation

A 1.00 2.00 2.00 2.00 5.00 6.00 1.00 2.00 6.00 2.50 0.69

B 1.50 3.00 3.00 3.00 7.50 9.00 1.50 3.00 9.00 3.75 1.56

C 2.50 5.00 5.00 5.00 12.50 15.00 2.50 5.00 15.00 6.25 4.34

D 0.50 1.00 1.00 1.00 2.50 3.00 0.50 1.00 3.00 1.25 0.17

E 3.00 6.00 6.00 6.00 15.00 18.00 3.00 6.00 18.00 7.50 6.25

F 2.25 4.50 4.50 4.50 11.25 13.50 2.25 4.50 13.50 5.63 3.52

G 1.75 3.50 3.50 3.50 8.75 10.50 1.75 3.50 10.50 4.38 2.13

H 1.13 2.25 2.25 2.25 5.63 6.75 1.13 2.25 6.75 2.81 0.88

I 1.88 3.75 3.75 3.75 9.38 11.25 1.88 3.75 11.25 4.69 2.44

J 0.38 0.75 0.75 0.75 1.88 2.25 0.38 0.75 2.25 0.94 0.10

Duration Estimates, days

Page 171: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

171 7.1.6 Beyond the Basics on IF and IFS

The Aged Receivables Model is a pretty standard layout and if you understand how to use the functions like SUMIF that’s

fine. Notice however that you have hardcoded criterion in these models. What if you want more flexible models that

allow you to change the criteria? This section provides advice on how to use cell references and concatenation to

achieve increased flexibility.

7.1.6.1 Using cell references rather than hard coding criteria

1. Open the TBV -3 Beyond the Basics.

2. Save as TBV -3 Solutions.

3. Activate Sales List.

4. Examine the formulas in B3:B4.

Excel accepts cell references in the compound IF functions but assume the logical operator is “equals”.

Question 7-5: SUMIF using cell references for criteria arguments.

5. Input the appropriate SUMIF in E3 and complete the remaining column E formulas.

Answer on next page.

Question 7-6: More SUMIF using cell references for criteria arguments.

6. Modify your formulas so that you generate the results in Error! Reference source not found..

7. Figure 7-17: Counting and summing orders around a critical value.

8.

Answer on next page.

2

3

4

5

A B C D E

Orders Made Value of Orders

<=440 186 <=440 42,666.06$

>440 613 >440 1,185,661.34$

799 1,228,327.40$

Page 172: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

172 Answer to Question 7-5.

Figure 7-18: SUMIF to calculate the value of orders by country.

Answer to Question 7-6.

Figure 7-19: Correct inputs for COUNTIF and SUMIF.

Note you could input the slightly more complex =SUMIF($E$10:$E$808,D3,$E$10:$E$808).

7.1.6.2 Using concatenation inside criteria

Now suppose you do not want the logical operators to appear in the cells. This might not be pleasing or easy to read in

some cases. You can use concatenate to produce some interesting results.

1. Unhide the sheet Concatenate COUNTIF.

2. Observe the formulae in column E (note the slight modification in cell E7).

Question 7-7: Concatenation and the criteria argument.

1. Unhide the sheet SUMIFS and using a parallel (to COUNTIFS) argument complete the proper set of formulae

column E.

Answer

2. Unhide the sheet SUMIFS Answer to check your work.

2

3

4

5

A B C D E

Orders Made Value of Orders

UK =COUNTIF($A$10:$A$809,A3) UK =SUMIF($A$10:$A$808,D3,$E$10:$E$808)

USA =COUNTIF($A$10:$A$809,A4) USA =SUMIF($A$10:$A$808,D4,$E$10:$E$808)

=SUM(B3:B4) =SUM(E3:E4)

2

3

4

5

A B C D E

Orders Made Value of Orders

<=440 =COUNTIF($E$10:$E$808,A3) <=440 =SUMIF($E$10:$E$808,D3)

>440 =COUNTIF($E$10:$E$808,A4) >440 =SUMIF($E$10:$E$808,D4)

=SUM(B3:B4) =SUM(E3:E4)

Page 173: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

173

3. Unhide the sheet Variations on SUMIF.

This layout is not standard (i.e. most business people want to talk about “30,60,90”) but it illustrates yet another way to

be quite flexible and avoid the need to calculate the “Days A/R” in column H).

4. Unhide the sheet Functions as criteria.

This sheet demonstrates that it is possible to use functions as criteria. This may come in handy in some situations. For

example suppose you want to break the orders down using the average value as the critical criteria. You could calculate

the average value in a cell then input this into the function or you can build average function into the criteria directly.

Two variations of this are shown in Figure 7-20 as illustrated.

Figure 7-20: Using Functions in criteria.

Inputting “>=AVERAGE($E$13:$E$811)” as the criteria in B6 will not work since Excel will look for a text string

AVERAGE($E$13:$E$811).

2

3

4

5

6

7

8

A B C D EAverage

order

value =AVERAGE($E$13:$E$811)

Orders Made Value of Orders

>= =COUNTIF($E$13:$E$811,A6&$B$2) >= =SUMIF($E$13:$E$811,D6&AVERAGE($E$13:$E$811))

< =COUNTIF($E$13:$E$811,A7&$B$2) < =SUMIF($E$13:$E$811,D7&AVERAGE($E$13:$E$811))

=SUM(B6:B7) =SUM(E6:E7)

Page 174: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

174 7.1.7 Descriptive Statistics using Data Analysis

Data analysis lies at the heart of Business Statistics. A few years ago, a Business Math Instructor’s gathered 1st year Sales

& Marketing student’s answers to a number of lifestyle questions. The survey consists of the student responses. The

following sections use Excel to prepare and convert the survey data descriptive statistics.

7.1.7.1 Inspecting the data

1. Open the file: TBV - 5 Descriptive Statistics.

2. Save as: TBV - 5 Solution.

3. Activate the worksheet: Survey.

The students were asked the following questions:

Figure 7-21: Survey questions.

74 students responded to the survey and partial results are shown in Figure 7-22:

1. What is your sex? Female (0) Male (1)

2. What is your age as of your last birthday?

3. What is your height to the nearest centimeter?

4. What is your weight to the nearest kilogram?

5. What was your average monthly salary (to the nearest $100 prior to enrolling at BCIT? (Enter 0 if not

employed full time)

6. What monthly salary (to the nearest $100) would you expect if you were to seek employment

immediately after obtaining your diploma?

7. After graduation, for which one of the following TYPES OF ORGANIZATIONS would you most

prefer to work?

Large corporation (1)

Small Private Co. (2)

Non-profit or government agency (3)

Other (4)

8. Do you live with your parents? No (0) Yes (1)

9. What are your monthly expenses for food and lodging?

10. What Mode of transportation do you use most often to get to and from BCIT?

Walk (1)

Public Transport (2)

Drive (3)

Carpool (4)

Other (5)

11. What is your cost per month for transportation to and from BCIT? ( to the nearest $10)

12. What is your cost per month for entertainment? (to the nearest $10)

13. Do you smoke? no(0) yes(1)

14. Do you drink? no (0) yes (1)

15. Estimate your percentage grade in this course __________________________.

Page 175: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

175 Figure 7-22: Partial survey results.

Before applying descriptive statistics, some preliminary assessment of the data is required.

a. Does the data contain outliers (unusually large or small values), and if so, what should be done with the outliers?

b. Is the data inputted in a form that can be processed or interpreted easily (a common concern is whether or not

to use a numeric code “0” or “1” or an alpha code like “no” or “yes”)?

7.1.8 Preparing the data

Before “mucking about” with the data, it is a good idea to add cell comments to keep the survey codes available (e.g.,

what does 0 mean in the “live with parents” column?) and add any explanatory notes so we do not flip back and forth

from Excel to the survey questions.

4. Mouse over a few of the comment cells to satisfy yourself that the required codes and explanatory notes are in

place.

Outliers (e.g., values that are too large or too small or absurdities such as pregnant males) are always an issue. A simple

method to spot outliers is to determine the upper/lower bounds and the next largest/smallest values for each column of

survey data. If this method fails to reveal all of the outliers, we can always filter the data and manually correct erroneous

survey inputs. For example, if we suspect an erroneous input has been made which is the result of an erroneous weight

conversion, we can filter for this and make a correction.

The MAX and MIN functions will be used to find the largest and smallest values. Then the LARGE and SMALL functions

will be employed to determine the 2nd largest and smallest values (see Excel Help about the LARGE and SMALL

functions). Note that if there are multiple instances of a large or small value, Excel will not skip to the next numerically

larger or smaller value, it will report the same value. For example, if the maximum value in a column of data is 10 and

the 2nd and 3rd largest values are 8 and 6 but there are two instances of 8, the LARGE function will report that the 2nd and

3rd largest values are both 8 NOT 8 and 6. The SMALL function does the same.

5. Unhide the worksheet Limits.

6. Examine the formulas used to calculate the upper/lower bounds and the 2nd largest/smallest values and the

method used to copy the formulas across (see Figure 7-23).

From the Upper/Lower Limits we note potential outliers in the Salary Grad and Weight columns. It is unlikely any of the

students in the survey weighed over 400 kg or expect that they will receive a $36,000 a month salary upon graduation.

The next step will be to filter these two columns to find any other outliers, determine if there was a calculation error

made and correct the data if there was. Judgment is involved in each case.

12345678910

A B C D E F G H I J K L M N

sex age height weight

Salary

Prev

Salary

Grad Organization

live with

parents

Food and

lodging

mode of

transport

Transport

cost

Entertainment

expenses Drink? Smoke?

0 25 165 60 2000 3000 4 0 1200 4 50 300 1 0

1 29 175 77 0 3500 2 0 900 3 20 100 1 0

0 24 154 40 1500 36000 1 1 0 2 60 0 0 0

0 24 157 52 1600 2500 2 1 800 2 60 30 0 0

0 23 168 50 1800 2500 1 1 600 3 300 200 1 1

1 27 188 396 1600 5000 1 1 0 3 400 500 1 0

1 19 170 86 1200 3000 1 0 720 3 420 50 1 1

0 23 152 54 2200 3900 0 750 3 220 100 0 0

1 22 180 70 1200 3800 1 0 500 3 280 280 1 1

Page 176: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

176 Figure 7-23: Upper/lower bound and largest/smallest calculations.

7. Unhide the Fix Data worksheet.

More than likely the male students that input 396 and 466 kg as their weight multiplied by 2.2 (the conversion factor)

rather than dividing by 2.2. If we divide 466 and 396 by 2.2 we obtain 212 and 180 pounds, respectively. Neither is an

unrealistic weight for an adult male.

Next, filter the weight column for values greater than 200 (440 pounds), determine if there are other unrealistic weight

inputs and correct them:

8. Filter the weight column for values > 200.

Figure 7-24: Results of the > 200 filter applied to the weight column.

To convert the erroneous inputs, we can use the CONVERT function, ROUND the conversions to 0 decimal places and

then Copy | Paste Special: Values into the cells containing the erroneous inputs.

Page 177: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

177 First, a few words about the CONVERT function: The syntax for the CONVERT function is (from Excel Help):

CONVERT(number,from_unit,to_unit)

Number is the value in from_units to convert.

From_unit is the units for number.

To_unit is the units for the result. CONVERT accepts the following text values (in quotation marks) for

from_unit and to_unit.

Table 7-2 Weight and mass from and to units for the CONVERT function.

Weight and mass From_unit or to_unit

Gram "g"

Slug "sg"

Pound mass (avoirdupois) "lbm"

U (atomic mass unit) "u"

Ounce mass (avoirdupois) "ozm"

9. At the bottom of the filtered list, convert the weights back to pounds, then to kilograms and finally round to 0

decimal places:

Figure 7-25: Conversion of erroneous weight inputs back to pounds, then to kilograms and rounded to 0 decimals.

10. Copy the cells with the correct weights, Copy | Paste Special: Values in cells E13 and E19, delete the conversion

cells (see Figure 7-26) and remove the filter when finished.

Page 178: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

178 Figure 7-26: Corrected weight inputs.

Next, filter the Salary Grad column for outliers.

11. Filter the Salary Grad column for values > 9,000:

Figure 7-27: Results of the > 9,000 filter applied to the Salary Grad column.

Look at the data in row 10. This is a 24 year old female student who previously made $1,500 per month. Perhaps the

student meant $36,000 per annum or $3,000 per month, double their previous salary:

Look at the data in rows 51 and 66. Expectations of approximately 5 times their previous salary seem excessive to an

Instructor. However, the data indicates that the students are both young and living at home. It’s not unusual for young

people to misperceive labor market rewards or to be optimistic, so these values are left untouched. Remember it is

student expectation, not instructor expectation!

12. Edit cell F4 from 36000 to 3000 and remove the filter when finished.

In addition to the above Salary Grad outlier, there is another subtle outlier: it is unlikely that a student expects a

graduating salary of $0 unless they really believe that they will be unemployed after receiving an education. In this case

“blank” seems more reasonable than $0.

13. Filter the Salary Grad column for values = 0.

14. Delete the cell contents (see Figure 7-28) and remove the filter when finished.

15. Save the file: TBV - 5 Solution.

Page 179: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

179 Figure 7-28: Results of the = 0 filter applied to the Salary Grad column.

This completes the search for outliers. In practice the search should consider all the fields. For example previous salary is

interesting because it contains zeroes. Should these be zeroes or should they be blanks?

7.1.9 Convert the data

The next step is to convert data entered as a numeric code into alpha codes (e.g., 0 Female, 1 Large Corp.). The

data is coded numeric but it might be hard to remember the codes. For descriptive statistics (and Pivot Tables) it may

make sense to replace some numeric codes by alpha codes. This is easy to accomplish using Home | Editing | Find &

Select | Replace… or Ctrl + H and the VLOOKUP function.

1. Open the file: TBV - 5 Solution. Unhide the Convert Data worksheet. Hide all other worksheets.

2. Examine the note and follow its instructions.

3. Examine the COUNT, AVERAGE, MAX and MIN calculations at the top of the worksheet.

In the Convert Data worksheet, we observe that in the survey:

43% of the students were Male.

64% of the students live with their parents.

80% of the students consume alcoholic beverages.

19% of the students smoke (tobacco).

4. Unhide Data Set 1 worksheet to view the results of numeric to alpha conversion.

•When using Descriptive Statistics zeroes impact the estimate of the mean but not the median while both fucntions ignore blanks. Similar issues arise with other functions like MIN, COUNT, etc.

•When using other statistical tools blanks may need editing or removal other wise processing cannot be completed (you cannot multiply by blank!)

Note

•Other Excel tools require the use of numeric rather than alpha inuts – regression for example will choke on "Female" and "Male" it uses the “dummy variables” 0 and 1 to process.

Note

Page 180: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

180 7.1.10 Generate Descriptive Statistics

Based on the above note, we will create a data set that only converts the sex numeric inputs to alpha inputs.

5. Unhide the Data Set 2 worksheet and examine the data and calculations.

6. Data |Analysis Group |Data Analysis |select Descriptive Statistics as in Figure 7-29.

Figure 7-29: The Data Analysis Tools.

7. Apply Descriptive Statistics to the height column in the Data Sets 2 worksheet using the inputs as shown in

Figure 7-30. Note that the Kth Largest and Smallest values were selected for no reason other than to generate

input.

Figure 7-30: Descriptive statistics inputs for the height column.

• If the Data Analysis command is not avaialble you need to use Office button|Excel options |Add ins and load the Analysis ToolPak.

Note

Page 181: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

181

8. Unhide the height answer worksheet to check results (see Figure 7-31).

Interpretation of the data is left to the “stats course”. You now know how to generate descriptive statistics using Excel.

Figure 7-31: Height column descriptive statistics results.

Column1

Mean 170.7428571Standard Error 1.232863608Median 170.5Mode 170Standard Deviation 10.31487699Sample Variance 106.3966874Kurtosis -0.617155487Skewness -0.217442672Range 44Minimum 146Maximum 190Sum 11952Count 70Largest(4) 188Smallest(6) 155Confidence Level(95.0%) 2.459495572

• The preceeding illustration generated descriptive statisitcs for one series "height". You can set Data Analysis to do many series at once.

• Excel has built infunctions to calculate the descriptive statistics above. To see these look at Formulas| Function Library | More Functions| Statisitcal.

Note

Page 182: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

182

7.2 Beyond the Basics: Pareto Charts.

Pareto analysis, often called the 80/20 Rule, is a common business rule of thumb. It suggests that 80% of an activity can

be associated with 20% of the possible causes. For example in marketing it is often the case that the bulk of firm’s sales

(80%) are created from about 20% of its customers. Pareto analysis is used frequently in operations management and

logistics problems:

“The Pareto principle has many applications in quality control. It is the basis for the Pareto chart, one of the key

tools used in total quality control and six sigma. The Pareto principle serves as a baseline for ABC-analysis and

XYZ-analysis, widely used in logistics and procurement for the purpose of optimizing stock of goods, as well as

costs of keeping and replenishing stock.”

Source Wikipedia, http://en.wikipedia.org/wiki/Pareto_Principle

Figure 7-32 presents a (boiled) down version of some quality control work done for a producer of salad dressings (and

other products) some years ago. A list of “common” problems was developed based on employee experience and a

spreadsheet set up to track the problems. After gathering data a Pareto chart, Figure 7-32 was produced summarizing

the situation.

Figure 7-32: The Pareto Chart.

The chart shows the frequency of problems “sorted” in descending order. It also plots the cumulative frequency for the

problems. From this we can “eye-ball” that almost 80% of the problems come from three sources (Spillage, Lids Loose,

and Bad packing). So attention should be devoted first and foremost to these issues.

0%

10%

20%

30%

40%

50%

60%

70%

80%

90%

100%

0

2

4

6

8

10

12

14

16

18

20

Spillage Lids Loose Bad packing QC Rejected Shipped Late Any Other

Nu

mb

er o

f Occ

urr

ence

s

Problems Encountered June 1 to July 31

Problem Type Cumulative %

Page 183: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

183

7.2.1 COUNTIF (and other formulas) to create Pareto output

The major advantages of this method for creating are twofold. First it forces the user to think about the problem

carefully while building the model. Secondly, unlike the Histogram method that follows, COUNTIF allows users to

summarize based labels (“alpha”)or values (“numeric”).

1. Open the file TBV – 6 Beyond the Basics Pareto Charts. Activate the sheet Data.

2. Save as TBV – 6 Solution.

Step 1: Summarize the Data with COUNTIF

Figure 7-33: The COUNTIF.

Inputs:

The data has been recorded using labels to indicate the errors. For example on Friday June 1st two problems arose

Spillage and some other error (a field not included allows for more detail on the problems). No problems were reported

on Monday June 10th.

Outputs:

The output area is based on a list of labels. Care must be taken to make sure the output labels are identical to the input

labels in order that the COUNTIF functions work properly.

•There are essentially two ways to generate Pareto output. You can use Excel functions and Charting to build the chart “manually”. Or access Data Analysis | Histogram to generate the Chart.

•One of the authors prefers the manual method but it’s mostly a matter of habit and taste. If you understand basic editing skills it’s easy to use either method then edit to taste. With this in mind, and to review a few Excel ideas we present both methods.

Note

1

2

3

4

5

6

7

8

9

10

A B C D E

Code Problem Count Frequency

Cumulative

Frequency

1 QC Rejected 7

2 Bad packing 10

3 Lids Loose 13

4 Shipped Late 5

5 Spillage 18

6 Any Other 5

Total

Output

Page 184: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

184 Question 7-8: COUNTIF to summarize the problems.

1. Create a COUNTIF to generate the output in Figure 7-33.

Answer

Figure 7-34: The COUNTIF formulas.

Step 2: Sort the Problems in Descending order.

2. The Pareto chart requires descending order so select A3:C9 then sort the results as illustrated in Figure 7-35.

Figure 7-35: Sorted Results.

3

4

5

6

7

8

9

B C

Problem Count

QC Rejected =COUNTIF($C$14:$C$71,B4)

Bad packing =COUNTIF($C$14:$C$71,B5)

Lids Loose =COUNTIF($C$14:$C$71,B6)

Shipped Late =COUNTIF($C$14:$C$71,B7)

Spillage =COUNTIF($C$14:$C$71,B8)

Any Other =COUNTIF($C$14:$C$71,B9)

Page 185: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

185 Step 3: Add the Frequency information.

Question 7-9: Create the frequency formulas.

3. Input formulas to create Figure 7-36. The answer is provided below.

Figure 7-36: Frequency of Problems.

Answer

Figure 7-37: Formulas.

There are alternative ways to input the column E formulas.

1

2

3

4

5

6

7

8

9

10

A B C D E

Code Problem Count Frequency

Cumulative

Frequency

5 Spillage 18 31.0% 31.0%

3 Lids Loose 13 22.4% 53.4%

2 Bad packing 10 17.2% 70.7%

1 QC Rejected 7 12.1% 82.8%

4 Shipped Late 5 8.6% 91.4%

6 Any Other 5 8.6% 100.0%

Total 58 100.0%

Output

1

2

3

4

5

6

7

8

9

10

A B C D E

Code Problem Count Frequency Cumulative Frequency

5 Spillage =COUNTIF($C$14:$C$71,B4) =C4/$C$10 =SUM($D$4:D4)

3 Lids Loose =COUNTIF($C$14:$C$71,B5)

2 Bad packing =COUNTIF($C$14:$C$71,B6)

1 QC Rejected =COUNTIF($C$14:$C$71,B7)

4 Shipped Late =COUNTIF($C$14:$C$71,B8)

6 Any Other =COUNTIF($C$14:$C$71,B9)

Total =SUM(C4:C9) =SUM(D4:D9)

Output

Page 186: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

186 Step 4: Insert the Pareto Chart

Question 7-10: Charting.

You are should be familiar with charting from Module I. So see if you can generate Figure 7-38 on your own. If you can

then move the chart to its own sheet and format to taste (your results should be similar to Figure 7-32).

Hint: Start with a column chart then select the Cumulative Frequency series and use Right Mouse to change the Series

Chart Type and Format Series to a Secondary axis.

If you have problems the answer is outlined below.

Answer

1. Select B3: C9 and E3:E9 then Insert| Column |2D Clustered Column yielding Figure 7-38.

Figure 7-38: The Basic Chart.

2. Select the Cumulative Frequency data points.

3. Right Mouse Change Series Chart Type select Line then OK.

4. Right Mouse Format Data Series | Series Options | Secondary Axis. This yields

0

2

4

6

8

10

12

14

16

18

20

Count

Cumulative Frequency

Page 187: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

187

5. Figure 7-39.

Page 188: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

188 Figure 7-39: Cumulative Frequency as a Line.

Step 5: Edit the Chart to make it presentable.

6. Move the chart to its own sheet and format to taste (your results should be similar to Figure 7-32).

7.2.2 Data Analysis | Histogram to create the Pareto output

Excel allows users to create Pareto Charts quickly using the Data Analysis tool. The tool works best when the inputs are

numerical. In our sample labels were used to code problems so we start by converting to numerical codes.

Step 1 Convert the labels to numerical codes

1. Open the file TBV – 6 Solution.

2. Unhide the sheet Alternative Data.

3. Activate D14 and input =VLOOKUP(C14,$C$4:$D$9,2,FALSE). The optional argument FALSE to creates an “exact”

lookup which will return NA# if there are typos in the labels. After completing this activity it’s probably wise to

check results using filters match between labels and codes.

4. Select D14:D71 Copy then Right Mouse Paste Special |Values to replace the formulas.

0.0%

20.0%

40.0%

60.0%

80.0%

100.0%

120.0%

0

2

4

6

8

10

12

14

16

18

20

Count

Cumulative Frequency

Page 189: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

189 Step 2: Data | Data Analysis | Histogram to generate output

The Pareto chart is built into the Histogram tool (essentially as special case where the Histogram is sorted).

5. Select Data | Data Analysis | Histogram to bring up the dialog box. Make the settings below then OK. Figure

7-40: Cumulative Frequency as a Line.

Note: Check Labels if you want to include Bin Range column heading in the output and make sure you include those cells

in the range.

6. Examine the output.

Figure 7-41: Cumulative Frequency as a Line.

7. Observe that:

a. D1:F8 report the sorted Pareto results used to generate the Chart.

b. A1:C8 report unsorted results – delete columns A through C.

c. Row 8 is extra (Excel says there are no values >6) – delete row 8.

Page 190: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

190 Step 3: Editing the Category Axis.

In many cases numerical codes are fine but for this problem the labels are probably better so it’s useful to edit the

Category axis. This can be done manually or via a lookup.

8. Activate Alternative Data.

9. Select C3:D9 then Copy.

10. Activate Alternative Analysis select A11 then Paste.

11. Copy A16 and Paste it in A5

12. Repeat the Process to complete the Category axis yielding:

Figure 7-42: Editing the Category Axis.

Note: An alternative method that requires a bit more work is to create a lookup then edit the category axis. The

advantage of this is that both the codes and labels are on display together.

Step 4: Edit the chart to make it presentable.

13. Move the chart to its own sheet and format to taste (your results should be similar to Figure 7-32).

14. Save the file.

Page 191: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

191

8 PivotTables & PivotCharts

Pivot Tables offer a fast flexible way to summarize data. As usual the key ideas can be expressed in terms of Figure 8-1.

Figure 8-1: Basic Computer Algorithm.

Inputs for Pivot Tables are usually large data lists (often imported from databases like ACCESS). For example the invoice

list in Figure 8-2 consists of 15 columns (fields) by 830 rows (records) is part of the ACCESS Northwinds database.

Figure 8-2: An Invoice database as Input.

Pivot Tables are created from the Insert tab as shown in Figure 8-2. After a Table is inserted worksheet tools (primarily

the Field List) and the context sensitive Pivot Table Tools are revealed as shown in Figure 8-3.

Figure 8-3: Various Process Tools.

Input Process Output

Page 192: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

192 These Tools allow you to quickly summarize data to answer your questions. For example three of the fields (headers) are

Employee (Salesperson), Order Amount, and Customer Country. Now think for a minute, what question(s) pop into your

head when you think about these three fields?

Many of us think, “What was the value of sales to each country?” or “Which employees sold the most to the United

States?” These questions are the Output we seek.

The great thing about the Pivot Table is that it allows you to create answers that vary from the simple to the complex. So

before you insert a table take some time to write down your questions very carefully then double check to see if you

have the inputs required to answer your questions. Then build the Table.

Question 8-1: Interpreting output from the Pivot Table

a. Figure 8-4 below presents three Pivot Tables. In each Table cell B9 contains a value. Take a piece of paper and

write down carefully the interpretation of the value in B9. This tells you what question(s) each Table is

answering.

b. Each Table also contains Grand Totals. Interpret these values as well.

Answers are provided on the page after Figure 8-4.

Figure 8-4: Output Variations based on Salesperson, Order Amount, Customer Country and Order Date.

The simplest Layout (several rows by one column) A Common Layout (several rows by several columns):

Page 193: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

193 A More Complex Layout (Hierarchical Rows by several columns)

Answer

The Simplest Table:

B9: King’s total sales (over the time period) amounted to $124,338.

Grand Total: Total sales (over the time period) amounted to $1,272,139.

The Common Table:

B9: Fuller’s sales to Canadian customers (over the time period) amounted to $9,035.

Grand Total: Total sales to Canadian customers (over the time period) amounted to $49,478.

The Hierarchical Table:

B9: Buchanan’s sales to Finnish customers in 1996 amounted to $1,393.

Grand Total: Buchanan’s sales (over the time period) amounted to $68,792.

In the next section we introduce Pivot Tables by developing and modifying the three tables above. Subsequent sections

explore key PivotTable features in depth. The reason for taking a more in depth approach is that modern day e-Business

software (e.g., Accounting & Financial, Enterprise Resource Planning, Supply Chain Management, Customer Relationship

Management) contains Business Analytics (a.k.a. Business Intelligence, OLAP). At the core of a Business Analytics is the

PivotTable. Managers use Business Analytics to summarize and compare large amounts of data extracted from a

database(s) and make decisions from this. Decisions that used to take days or weeks of data gathering are now made

in minutes using Business Analytics (a powerful tool) – this why Business Analytics is so popular.

For the curious, see the BC Ferries case at Cognos, an OLAP software vendor (as of November 2007):

http://www.cognos.com/news/releases/2001/1009.html

or the Business Objects overview of their OLAP software – note the images in the file are PivotTables (as of November

2007):

http://www.businessobjects.com/pdf/products/queryanalysis/olap_intelligence.pdf

Page 194: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

194

8.1 Creating tables This section creates three basic table layouts. We also look at basic tools (Filtering, Grouping, and the Expand/collapse

buttons) that help keep pertinent material on display. Finally we look briefly at adjusting the Field Settings to change the

look of the summary data.

8.1.1.1 Three common layouts

The first task is to create the simple table illustrated in Figure 8-5. This Table requires two fields:

a. Employee names for the rows.

b. Order Amounts that that will be summed as values.

Figure 8-5: The Simple Table.

With this in mind:

1. Open the file PTV – 1 Pivot Tables.

2. Save as PTV – 1 Solutions.

3. Activate any cell on the list say A2.

4. Insert | Pivot Table.

5. Accept the defaults in Figure 8-6 to create the table on a new worksheet.

Figure 8-6: Insert |Table Dialog box.

Page 195: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

195

6. Drag Employee (field) onto the Row Labels area.

7. Drag Order Amount to the Σ values area. The table is created as shown in Figure 8-7.

Figure 8-7: Initial PivotTable view.

8. Name the table Employee Totals as illustrated in the Figure 8-8 (see the Pivot Table name box).

9. Select B4:B13 and select Right Mouse |Number Format |Number |Accounting zero decimals and no $.

Note If the Field List is NOT on view point over the Table and click or Right Mouse | Show Field List.

Next enhance the Table by displaying the % of sales made by each employee. Here’s how:

10. Drag a second copy of Order Amount to the Σ values.

11. Click on cell C4 then Right Mouse | Value Field Settings | Show values as % of Column | OK.

12. Edit the labels and use Pivot Table Tools | Options | Sort to sort descending to get Figure 8-8.

Figure 8-8: The Completed Table.

Page 196: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

196

13. Rename the worksheet Employee Sales and Save the file.

Question 8-2: The common table layout.

Activate the sheet List. Then use Figure 8-9 as a guide and create a second table for NAFTA by filtering the Customer

Country entries:

Figure 8-9: The NAFTA Pivot Table.

14. Edit your labels to taste and use Home |Styles |Format as a Table as you please.

15. Rename the sheet NAFTA Table and Save the file.

Answer If you had problems unhide the sheet NAFTA Answer.

Page 197: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

197 Question 8-3: A common Table layout

16. Now reorganize the Table to generate the figure below. Note if you “lose sight” of the field list click on the table.

Figure 8-10: Reorganizing the Pivot Table

17. Select Employee as Buchanan:

Figure 8-11: Buchanan’s sales by country (for all years).

Page 198: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

198 To get more detail on Buchanan’s German sales

18. Select B8 then double click. A new sheet Figure 8-12 is inserted:

Figure 8-12: Details on Buchanan’s German sales.

From Figure 8-12 we determine that the Buchanan’s German sales of $8.048.54, is comprised of four separate orders

from German customers.

Question 8-4: The Hierarchical Table

We can push the analysis further and create a more complex table by adding more fields to the table.

Insert a new Table as illustrated in Figure 8-13 and determine when Buchanan’s German sales took place.

Figure 8-13: Display Employee Sales by country for Each Year.

If your dates do not come in grouped as years (1996,1997 ,1998) select one of the column labels (i.e. one of the cells

containing a date) then Options | Group | Group Field since Excel recognizes dates and set the Dialog box. Excel

Page 199: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

199 recognized the field as a date so Group Field works. The more generic choice (which works for even more cases) is Group

Selection.

Answer

All of Buchanan’s $8,049 of Sales to Germany came in 1997. In total Buchanan sold $30,716 in 1997.

19. Save the file.

8.1.1.2 Show/Hide & Active Field

You may have noticed an icon with a minus indicator next to the Employee PivotTable above (the indicator to the left of

the Employee name Buchanan or Callahan see Figure 8-49). This indicator is known as a: Expand/collapse button. The

button allows you to compress or expand the data in a PivotTable. This feature activates automatically when there are

multiple Row or Column Labels (fields).

1. Open the file: PTV - 1 Solution.

2. Unhide the Expand_Collapse worksheet.

3. Activate any Employee name in the PivotTable.

4. Activate Options |Active Field| click on the Expand Entire Field button:

Figure 8-14: Expand Entire Field button.

The Pivot Table now displays Employee sales by Country and Customer for all three years. The table displays some 640

rows. This is far too many rows to display easily (although they could all be printed easily). So let’s rethink a bit.

5. Activate a Customer name, say Maison Dewey in A7 and collapse the field.

6. Activate an Employee, say Buchanan in A5 and collapse the field. This brings you back to Figure 8-14.

Page 200: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

200 We can operate at a micro level by using the Expand/collapse buttons next to the field names.

7. Click on the + button to the left of Buchanan. This displays Buchanan’s sales by country.

8. Click on the + button to the left of Switzerland to display the Swiss sales by customer as in Figure 8-15.

Figure 8-15: Buchanan’s Swiss Sales by Customer.

9. Hide the worksheet Expand_Collapse.

10. Save the file: PTV - 1 Solution.

•The ability to summarize and compare data in many ways is the strength and the danger of Pivot Tables. Playing with the Table can become a game (a version of what is sometimes called “analysis by paralysis”).

•In addition, and equally dangerous, PivotTables can almost always be manipulated enough ways to convince the user a pattern exits and the pattern is likely to be consistent with user bias. PivotTables are great tools but they must be supported by common sense, experience, and if need be, inferential statistics.

Critical Idea

Page 201: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

201 8.1.2 Review and extensions of the basics.

In the previous section we built and manipulated three tables. This section reviews the key ideas and looks a more

closely at the use of the Pivot Table Tools.

8.1.2.1 An alternative method to add fields to a Table

To build our table we dragged and dropped filed headings onto the various areas. There are two other ways to carryout

the same process:

Check a field check box in the Field List (the field is placed in a default area of the layout section, but you can

rearrange the fields using the drag and drop or right mouse methods which follow), or

Right mouse the field in the Field List and select the appropriate Report area.

To illustrate:

1. Activate List.

2. Insert |Pivot Table.

3. Check Employee. This field is added as a Row Label.

4. Check Order Amount. Excel recognizes this should go as the Σ values (Excel thinks we want to summarize values)

This gives us Figure 8-16.

Figure 8-16: Selecting using the check box.

Now what happens if you select Customer Country by the check box? Excel assumes you want to add is as a row label

(below) Employee. So instead of the check box:

5. Point over Customer Country then Right Mouse | select Add to Column Labels as illustrated below:

Page 202: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

202 Figure 8-17: Right Mouse to select the area.

6. Hide the worksheet.

7. Save the file.

The authors rely on drag and drop for the most part but you may use any method you desire to build your tables.

8.1.2.2 Move the Task Pane & “Pivot” the PivotTable

1. Open the file: PTV - 1 Solution.

2. Unhide the Orders by Country worksheet.

3. Right Mouse | Show Field List if it is not on display.

4. On the Pivot Table Field List click to open the Task Pane Options drop-down menu and select Move:

Figure 8-18: PivotTable Field List Task Pane options.

5. Move your mouse cursor so the task pane is positioned to the right of the PivotTable and click once – this “lets

go” of the task pane and “floats” it. Left mouse its title bar and drag to move it. You can re-dock the task pane

by selecting Move and moving your mouse cursor to the far right of the worksheet until the task pane self-

docks.

Page 203: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

203

6. Widen the PivotTable Field List so the report area field names are in plain view.

Figure 8-19: Floating and widened task pane.

7. Move the Customer Country field from the Row Labels report area to the Column Labels report area.

Reposition the task pane to view the PivotTable:

Figure 8-20: Customer Country field “pivoted” from the Row Label report area to the Column Label report area.

8. Undo or press Ctrl + Z.

9. Save the file: PTV - 1 Solution.

The illustration above is what is meant by “pivoting”. Often times all of the data from a field(s) cannot be viewed in

the Column Labels report area (data is off the worksheet to the right and out of view). When this happens, it is

better to pivot the field(s) to the Row Labels report area where more of the data can be viewed (e.g., in Figure 8-20:

10 columns vs. 24 rows).

Page 204: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

204 8.1.2.3 Double click on values to get details

1. Open the file: PTV - 1 Solution.

2. Activate the Orders by Country worksheet.

3. Select cell B17 (Sum or Oder Amount for Poland) and double click the cell. This creates a details worksheet.

4. Rename the worksheet: Poland Orders. This represents the data summarized by cell B17.

5. Save the file: PTV - 1 Solution.

Figure 8-21: Detail for the Sum of the Order Amount from Poland.

Two points on the details summarized in a PivotTable Values cell:

a. To find the details for any Values cell in a PivotTable simply double click on it. Excel will automatically create a

details worksheet.

b. Only one level of “drill down” detail is allowed. To drill down to further levels of detail, an OLAP representation

of the data list is required.

Page 205: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

205 8.1.2.4 Sort & Filter a PivotTable

The same Sort & Filter methods that were used with Excel Tables apply to PivotTables.

First, filter the PivotTable.

1. Open the file: PTV - 1 Solution. Hide the Poland Orders worksheet.

2. Activate the Orders by Country worksheet.

3. In the PivotTable Report Filter, check the Select Multiple Items checkbox, uncheck the All checkbox (this

deselects all of the Employee field names) and check the King field name. Activate any cell in the PivotTable.

Figure 8-22 Employee Report Filter: King.

You can also filter any Row Labels and/or Column Labels.

4. Apply a Top 10 Items Filter to the Row Labels

5. Activate B4 then Pivot Table Tools |Options |Sort the Sum of Order Amount from largest to smallest.

Figure 8-23: Filtering and Sorting

6. Undo the Sort and clear the filter.

Page 206: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

206

7. Apply the Label Filter | Begins with | letter A:

Figure 8-24: Filtering for Countries stating with A:

8. Clear the Filter.

9. Hide the Orders by Country worksheet .

10. Save the file: PTV - 1 Solution.

8.1.2.5 Group Fields

Row and Column Labels can be grouped to isolate a subset of items for further analysis or to further summarize the data

at a higher level. Numeric, date, time, or a selection of specific items can be grouped (using either Pivot Tools | Options

ribbon or Right Mouse).

1. Open the file: PTV - 1 Solution.

2. Activate the sheet Date Group. The problem is there are far too many columns. The data needs to be grouped.

3. Activate cell B4 (or any cell with a date in it) and group to Years and Quarters as in Figure 8-25.

Figure 8-25: Grouping by Quarters and Years

4. Activate cell B4 and click on the Ungroup button.

5. Group the data by Years only.

6. Hide the worksheet: Date Group.

7. Save the file: PTV - 1 Solution.

Page 207: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

207 Question 8-5: Practice grouping.

8. Unhide the sheet Order Group. Use grouping on the columns and rows to create Figure 8-26.

Figure 8-26: Grouping Rows and Columns

Answer

Group the columns and row as as indicated in Figure 8-27.

Figure 8-27: Setting the Dialog boxes to group.

Column groups Row Groups

9. Hide the sheet Order Group.

Page 208: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

208 8.1.2.6 Formatting a PivotTable

PivotTable labels and values can be formatted like any other worksheet cells. The default label style is MS Sans Serif and

the default value style is General. The PivotTable appearance may be formatted using a PivotTable style similar to cell

and Table styles. The default PivotTable style is Pivot Style Light 16.

1. Open the file: PTV - 1 Solution.

2. Unhide the worksheet Shipping.

Now format the values and labels in the PivotTable.

3. Right mouse Sum of Freight |Number Format select a 0 decimal place Accounting format with the $ Symbol

and click OK. If you want to format a specific cell or range of cells, select them and then apply a number format.

4. Select the cell range: B5:E7 and remove the $ Symbol format. Your worksheet should now appear as follows:

Figure 8-28 Accounting format applied to the value cells of the Format PivotTable.

5. Apply the Options |Select |Entire PivotTable command and change the font to Calibri, Regular, 10 pt (e.g., right

mouse the PivotTable and select Format Cells…):

Figure 8-29 Calibri font applied to the labels and values of the Format PivotTable.

Page 209: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

209 Finally, apply a different PivotTable style with banded rows.

6. Activate A5 then Options |Active Field | Expand Entire Field.

7. Options |Select |Entire PivotTable.

8. Design |PivotTable Style Options| check the Banded Rows checkbox.

9. Design |PivotTable Style| Pivot Style |Medium 9.

10. Deselect the entire PivotTable (click in any cell of the PivotTable). Reformat as required to get Figure 8-30.

11. Save the file: PTV - 1 Solution.

Figure 8-30: Banded rows and the Pivot Style Medium 9 applied to the Format PivotTable.

8.1.2.7 Design |Layout to customize the layout of a Table.

In earlier sections we used the ribbons (and/or Right Mouse) to create some basic formats and apply some Table Styles.

To further enhance the look of your Tables the Design Tab offers four built-in layout tools. These allow you to customize

change the location of Subtotals or Grand Totals, customize the Report Layout and add Blank Rows to make tables

easier to read.

1. Unhide Shipping(2) then make a copy of the sheet Accept the default Shipping(3).

2. Hide the sheet Shipping(2).

3. PivotTable Tools |Design.

4. Activate C6.

Question 8-6: Design |Layout to alter the look of Shipping

Make one change to each of the four tools (Subtotals, Grand Totals, Report Layout and Blank Rows) to alter the layout of

the table on Shipping(2) to Figure 8-31.

Page 210: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

210 Figure 8-31: Using Design | Layout to alter the look of Shipping

Answer

The new look was achieved by:

a. Subtotals at the bottom;

b. Grand Totals on for Columns only;

c. Report Layout in Tabular form;

d. Blank rows inserted after each item.

e. Formatting the subtotals to accounting zero decimals and no symbol.

8.1.2.8 Options for displaying and printing

PivotTables can be displayed, printed and exported as any other worksheet so you can apply your printing and inserting

knowledge directly to Tables. However, Excel has a few options that are more specific to Tables. These are found on the

PivotTable Tools |Display ribbon and under Right Mouse |Pivot Table Tools.

After your Table has been built and formatted you may want to hide some of the tools from the Display.

1. Activate Shipping(3).

2. Activate the table.

3. Right Mouse |Pivot Table Options |Show Hide then Hide the buttons and Field headers.

Page 211: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

211 Figure 8-32: Show/Hide to alter the display

An alternative method for Showing/Hiding is to use Right Mouse | Pivot Table Options. This is actually a broader range

of tools taken from other areas (like Page Layout/Print Titles) that allow you to customize your table for printing or

exporting. Figure 8-33 shows the PivotTable Options Dialog box.

Figure 8-33: PivotTable Options dialog box: Printing tab.

The following are the key features as explained in Excel Help:

Page 212: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

212

Print expand/collapse buttons when displayed on PivotTable Select or clear to display or hide expand and

collapse buttons when you print a PivotTable report. This check box is not available if the Show drill buttons

check box is cleared in the Display tab of this dialog box.

Repeat row labels on each printed page Select or clear to repeat the current item labels of the row label area on

each page of a printed PivotTable report.

Set print titles Select or clear to enable or disable the repeating of row and column field headers and column

item labels on each printed page of a PivotTable report.

Note To actually print the labels, you must still enter values in the Rows to repeat at the top or Columns to

repeat at left boxes under the Print titles section in the Sheet tab of the Page Setup dialog box (On the Page

Layout tab, in the Page Setup group, click Print Titles.

8.1.3 Summary Functions, Calculated fields, and Subtotals

This section looks more deeply into the Pivot Table’s ability to summarize data (Field Settings |Show As and adding

Subtotals) and then explore create some calculated fields (Options |Tools |Formulas).

8.1.3.1 Summary Functions.

Up until now, for the most part, the SUM summary function has been as the Σ Values area of the PivotTable. Excel

allows us to change the way the data is summarized with a few quick keystrokes.

1. Open the file: PTV - 2 Pivot Tables. Save as PTV – 2 Solutions.

2. Activate the Employee worksheet.

This table shows the number of customers each salesperson dealt with in each year. For example in 1997 Buchanan

dealt with 18 different customers (you could check this by double clicking on cell C5). Since Customer ID is “alpha” (i.e.

text) Σ Values defaults to Count the (unique) labels as illustrated in Panel 1 of Figure 8-34.

Page 213: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

213 Now try a little experiment:

1. Drag Customer ID off the Σ Values.

2. Drag Order Amount onto the Σ Values.

This generates Panel 2. Sensibly Excel defaults to Sum of Order Amount since orders are values ($).

Figure 8-34: Default Σ for Values and Labels.

Panel 1: Count of Labels Panel 2: Sum of Values

Remember these are only the default Field Settings. Excel offers many ways to summarize data by altering the Field

settings.

Make sure you have the Table as shown in Figure 8-35 on the next page.

Figure 8-35: The Current Pivot Table.

Page 214: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

214 Now to change the Field Settings:

3. To make the data easier to read format the cells to display comma (,) and two decimals.

4. Use Options | Field Settings or Right Mouse | Value Field Settings to bring up the Dialog box.

5. Set to display Average Order Amount yielding Figure 8-36 (note that clicking on B8 tells us that Dodsworth’s

average order size for 1996 was $1,978.90).

Figure 8-36: Average Order Amount

Question 8-7: Maximum orders

a. Adjust Field Settings to display each salespersons maximum order?

b. Re-label your Pivot Table where necessary.

Answer on the next page.

Answer

Figure 8-37: Maximum Orders.

3

4

5

6

7

8

9

10

11

12

13

14

A B C D E

Maxiumum Orders By Year:

Salesperson 1996 1997 1998

Overall Max.

Order

Buchanan 9,210.90 6,475.40 4,581.00 9,210.90

Callahan 3,741.30 4,825.00 4,813.50 4,825.00

Davolio 5,398.72 6,635.27 15,810.00 15,810.00

Dodsworth 5,275.71 4,960.90 11,380.00 11,380.00

Fuller 3,354.00 10,164.80 16,387.50 16,387.50

King 8,593.28 9,194.56 12,615.05 12,615.05

Leverling 2,222.40 10,495.60 10,952.84 10,952.84

Peacock 7,390.20 11,188.40 8,446.45 11,188.40

Suyama 2,645.00 4,707.54 2,393.50 4,707.54

Overall Max. Order 9,210.90 11,188.40 16,387.50 16,387.50

Page 215: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

215 It’s important to alter the “Grand total” labels appropriately. For example cell E6 tells us the highest value order made

by Callahan was $4,825.00 (it was taken in 1997).

Question 8-8: Count orders

a. Alter the Table to display the number of orders taken by each employee. Alter your labels appropriately.

b. You should have Figure 8-38 below. If you do not have the Figure re-do the field settings.

Figure 8-38: Counting orders taken.

The right mouse offers a quick way to select a commonly used summary functions:

6. Right mouse the Sum of Order Amount in the PivotTable and select Summarize Data By, then Sum from the list

of summary functions:

Figure 8-39: The Summarize Data By method for quickly changing the summary function.

After some label edits the result is:

3

4

5

6

7

8

9

10

11

12

13

14

A B C D E

Count By Year:

Salesperson 1996 1997 1998 Total Orders

Buchanan 11 18 13 42

Callahan 19 54 31 104

Davolio 26 55 42 123

Dodsworth 5 19 19 43

Fuller 16 41 39 96

King 11 36 25 72

Leverling 18 71 38 127

Peacock 31 81 44 156

Suyama 15 33 19 67

Total Orders 152 408 270 830

Page 216: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

216 Figure 8-40: Sum of orders

Question 8-9: Show as % of column

Modify the Table to show both the number of orders taken (COUNT) and the value (SUM) of orders made for each

salesperson for each year. Try yourself before looking at the answer

Answer

Figure 8-41: Creating multiple Σ Value Fields

As the Figure shows you drag a second copy of Order Amount onto Σ Values then change the display to Count. After

some formatting we get Figure 8-42.

3

4

5

6

7

8

9

10

11

12

13

14

A B C D E

Sum of orders By Year:

Salesperson 1996 1997 1998 Grand Total

Buchanan 18,384 30,716 19,692 68,792

Callahan 22,240 56,033 51,055 129,327

Davolio 35,765 93,148 60,838 189,750

Dodsworth 9,895 26,310 46,007 82,212

Fuller 21,757 70,444 74,337 166,538

King 15,232 60,471 48,634 124,338

Leverling 18,224 108,026 76,814 203,064

Peacock 49,945 128,810 54,669 233,423

Suyama 16,643 43,126 14,925 74,694

Grand Total 208,084 617,085 446,970 1,272,139

Page 217: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

217 Figure 8-42: Summarizing both Sales ($) and number of Orders taken.

7. Hide the worksheet: Employee.

8. Save the file

8.1.3.2 Show Fields As

You can also change how the Values are represented in the PivotTable by using the Show Values As feature in the Value

Field Settings dialog box.

Question 8-10: Show as % of column

a. Activate the sheet Show As. And compare cell B5 on the worksheet to B5 in Figure 8-43 below.

b. How do you interpret the 8.83%?

c. How do you interpret Suyama’s Grand Total entry of 5.87%?

Figure 8-43: Showing Sum of Orders as % of column

Answer

a. Use Figure 1-31 as a guide to create the Table.

b. Buchanan’s $18,383.92 represents 8.83% of the total value of sales ($208,038.95) made in 1996.

c. Suyama’s total sales represent 5.47% of all the sales made over this time period.

1996 1997 1998

T ota l Sa les

($)

T ota l Orders

T aken

Sa les ($)

Orders

T aken Sa les ($)

Orders

T aken Sa les ($)

Orders

T aken

Buchanan 18,384 11 30,716 18 19,692 13 68,792 42

Callahan 22,240 19 56,033 54 51,055 31 129,327 104

Davolio 35,765 26 93,148 55 60,838 42 189,750 123

Dodsworth 9,895 5 26,310 19 46,007 19 82,212 43

Fuller 21,757 16 70,444 41 74,337 39 166,538 96

King 15,232 11 60,471 36 48,634 25 124,338 72

Leverling 18,224 18 108,026 71 76,814 38 203,064 127

Peacock 49,945 31 128,810 81 54,669 44 233,423 156

Suyama 16,643 15 43,126 33 14,925 19 74,694 67

Grand T ota l 208,084 152 617,085 408 446,970 270 1,272,139 830

Page 218: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

218 Question 8-11: Thinking about the summary

a. Examine the labels and calculations in Figure 8-44 very carefully.

b. How do you interpret the 7.24% in B5?

c. How do you interpret the Grand Total entry 8.07% in E13?

Figure 8-44: An Alternative Table

Answer

The key is to examine the field settings:

a. The data is summarized by Count

b. The table is displaying as % of column.

So:

Buchanan took 7.24% of the all orders in 1996.

Suyama took 8.07% of all orders over the period 1996-98..

Question 8-12: Thinking about the summary

Suppose you want to answer the question:

“What percentage of each salespersons total sales ($) was made in each time period?”

a. Activate Show As.

b. Make the required Field Setting.

Answer

Page 219: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

219 Figure 8-45: Percentage of Sales Each time Period

So Buchanan made 26.72% of his total value of sales in 1996.

Looking at % of row or column are the most frequently used Show As options. However Excel can do more sophisticated

displays as indicated by Table 8-1.

Table 8-1: Custom Calculation Functions (Excel Help).

Function Result

Difference From Displays values as the difference from the value of the Base item in the Base field.

% Of Displays values as a percentage of the value of the Base item in the Base field.

% Difference From Displays values as the percentage difference from the value of the Base item in the Base field.

Running Total in Displays the value for successive items in the Base field as a running total.

% Of Row Displays the value in each row or category as a percentage of the total for the row or category.

% Of Column Displays all of the values in each column or series as a percentage of the total for the column or series.

% Of Total Displays values as a percentage of the grand total of all of the values or data points in the report.

Index Calculates values as follows:

((value in cell) x (Grand Total of Grand Totals)) / ((Grand Row Total) x (Grand Column Total))

8.1.3.3 Subtotals

PivotTable subtotals use the same concept as the Outline: Subtotal feature; however, the method for creating a

PivotTable subtotal is different.

1. Open the file: PTV - 2 Solution. Unhide the sheet Subtotal.

Your worksheet should appear as shown in Figure 8-46. Note that Excel has automatically added a subtotal Order

Amount for each Employee (e.g., Buchanan sales were $68,792.25).

2. Activate the table then Pivot Table Tools |Design | Subtotals: Show all Subtotals at Bottom.

Page 220: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

220 Figure 8-46: Sum of Order Amount by Employee and Customer Country.

3. Activate cell A3 (Buchanan) thus making Employee the Active Field.

4. Select Options |Field Settings… for the Employee field. This opens the Field Settings dialog box as shown below.

Figure 8-47: Sum of Order Amount by Employee and Customer Country.

5. Field Setting |Subtotals & Filters tab, enable the Custom radio button, select the SUM and AVERAGE summary

functions and click OK (see Figure 8-48).

Page 221: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

221 Figure 8-48: Field Settings dialog box for Subtotals & Filters.

6. This adds the SUM and AVERAGE Order Amount to each Employee group. See Figure 8-49.

Figure 8-49: SUM and AVERAGE subtotals for each Employee group.

7. Hide the Subtotal worksheet. Save the file: PTV - 2Solution.

•Field Setting can also be accessed via Right Mouse or by clicking on Employee in the Row Labels of the Field List. As usual you may uaese any method you want to select the Field Setting.

Note

Page 222: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

222 8.1.3.4 Calculated Fields

In this section you will create two calculated fields building formulas to calculate a 5% sales commission and a 4% freight

rebate for when freight charges exceed (>) $500 per year.

1. Open the file: PTV - 2 Solution. Unhide the sheet Commission.

2. Select Options |Formulas: Calculated Field… (see Figure 8-50).

3. Type: Commission in the Name field of the Insert Calculated Field dialog box.

4. Select the entire Formula field to overwrite it, type: =, select Order Amount from the Fields list, click the Insert

Field button, type: *0.05 and click OK (see Figure 8-51).

Figure 8-50: Calculated Field command.

Figure 8-51: Insert Calculated Field dialog box: Commission.

5. Check the Commission checkbox in the Field List. This will add the field to the Values report area.

6. Remove the Order Amount field from the Values report area (see Figure 8-52).

Page 223: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

223 Figure 8-52: PivotTable task pane with the calculated field: Commission added to the Values report area.

7. Unhide the worksheet: Commission@5%, compare to your results and fix any errors.

8. Hide the worksheets Commission and Commission@5%.

Next, we would like to calculate a 4% rebate on freight charges > $500 per year per customer.

9. Unhide the sheet Freight.

10. Create a calculated field named: Rebate and input an IF function in the Formula field that calculates a 4% rebate

if the Freight > $500; otherwise, return a $0 rebate. Examine the PivotTable to ensure the Rebate field is

calculating correctly. Remove the Freight field from the Values report area.

11. In PivotTable Tools | Design | Layout, select Grand Totals: On for Rows Only.

Your worksheet should now appear as follows:

Figure 8-53: PivotTable task pane with the calculated field: Rebate added to the Values report area.

Page 224: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

224

12. Unhide the worksheet Freight@4%, compare to your results and fix any errors.

13. Hide the worksheets: Freight and Freight@4%.

14. Save the file: PTV - 2 Solution.

When the Formulas | List Formulas feature is selected, Excel creates a new worksheet and provide a list of calculated

field formulas in the workbook:

Figure 8-54: Calculated field formulas.

This feature saves time if you want to view all of the calculated fields and their formulas – the alternative is to open the

Insert Calculated Field dialog box and view each formula one at a time – very time consuming.

8.1.3.5 Delete/Clear or Move a PivotTable

You may want to delete or clear the contents of a PivotTable for a variety of reasons (e.g., the results make no sense,

you want to reuse the blank PivotTable for other purposes) or you may want to move the PivotTable to another location

in your workbook.

In Excel, there is a distinction between deleting a PivotTable and clearing a PivotTable.

1. Open the file: PTV - 2 Solution. Unhide the sheet Country.

2. Copy the Country worksheet, rename it: Delete.

3. Activate the PivotTable.

4. Select PivotTable Tools | Options | Actions | Select: Entire PivotTable.

5. Press the Delete key. Undo Delete.

Note that the PivotTable was deleted without any messages from Excel. Let’s try clearing the PivotTable:

Page 225: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

225

6. Activate the PivotTable and select Clear | Clear All.

Figure 8-55: Clear All command.

Excel will now respond with the message:

Figure 8-56: Clear PivotTable message.

Since this PivotTable is a copy of other PivotTables, Excel is warning the user that the information contained in the other

PivotTables (see the list in the message box) will also be cleared.

7. Click the Clear PivotTable button (DO NOT SAVE THE FILE). Peruse the other worksheets to understand the

types of information that have been cleared. When you are finished Undo Clear PivotTable.

8. To move a PivotTable to another worksheet click the Move PivotTable button and select an existing worksheet

Location to move the PivotTable to (Cancel out of the Move PivotTable dialog box):

Figure 8-57: Move PivotTable dialog box.

9. Save the file: PTV - 2 Solution.

Page 226: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

226

8.2 PivotCharts A PivotChart is a graphical representation a PivotTable. A PivotChart is always based on and linked directly to a

PivotTable – you cannot create a PivotChart without first creating a PivotTable. This means that a change in the

PivotTable changes the look of the PivotChart AND a change to a PivotChart changes the layout of the PivotTable.

Some advice before we proceed to create a PivotChart:

The sections that follow assume the user is familiar with charting so the emphasis is on exploring the close tie between a

PivotTable and the associated PivotChart.

8.2.1 Creating PivotCharts

1. Open the file: PTV - 3 Pivot Charts.

2. Save as: PTV - 3 Solution.

3. Activate the Product Sales 1997 worksheet and examine the fields and data.

4. Activate the List worksheet and examine the fields and data.

The List and Product Sales 1997 worksheets are similar to the data lists you have been working with in the PivotTables

section. The approach taken in the following sections is to use an existing PivotTable and concentrate on plotting the 4

fundamental types of data using common chart types:

Change vs. Time using a column and area PivotChart.

Comparisons using a bar PivotChart.

Proportions using a pie PivotChart.

Trends using a line PivotChart with trend lines, equations and R2 values.

The PivotTables have been designed to address common questions and tasks that management might ask/do using the

List and Product Sales 1997 data.

8.2.1.1 Change vs. Time

1. Activate the Sales worksheet and examine the PivotTable report area fields and values.

This PivotTable answers the question: What are the total sales from 1996 to 1998 by year and month?

Since Sales worksheet PivotTable is summarizing the change in sales over time a column or area chart might be

appropriate to chart such data. Note that the Order Date has been grouped by Year and Month. For our first PivotChart,

we will use a column chart to plot the change in sales from 1996 to 1998.

2. To create a PivotChart, activate a cell in the PivotTable and select Options |Tools |PivotChart.

•New users should be very careful with Pivot Charts. Design the output on paper then generate an appropriate PivotTable – PivotChart combination. Madly pivoting Tables and Charts around often leaves users in a state of confusion rather than enlightenment.

Critical Idea

Page 227: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

227 Figure 8-58: PivotChart command.

3. Select Clustered Column from the Insert Chart dialog box and click OK:

Your worksheet should now appear as follows:

Figure 8-59: Clustered column chart for the change in sales from 1996 to 1998.

As can be seen in Figure 8-59, the PivotChart has been placed on the worksheet and our worksheet is “cluttered” with

task panes. Since we have no plans to filter the PivotChart, we will close the PivotChart Filter Pane to gain some “real

estate” so we can get a better view of our PivotChart:

4. Close the PivotChart Filter Pane by selecting Close from the task pane drop-down menu or clicking the Close

button to the right of the drop-down menu:

Page 228: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

228 Figure 8-60: PivotChart Filter Pane drop-down menu Close command.

The first point to take note of is that: creating a PivotChart from a PivotTable is “insanely easy”. Since we have already

defined the data we want to plot using a PivotTable, we do not have to go through the whole process of defining the

chart data range and its series and category data or switching the row and column data.

The second point to take note of is that if we try to change the PivotChart data source, Excel will not let us do this.

5. Activate the PivotChart and click on the Select Data button in the Data group of the Options ribbon. Try

activating the chart data range, legend entries (series) or horizontal (category) axis labels areas or the Switch

Row/Column button of the dialog box. Click Cancel when you are finished.

Figure 8-61: PivotChart Select Data Source dialog box.

Note that in Figure 8-61 all of the command areas of the dialog box have been disabled and are grayed out to indicate

you cannot change any of these features.

The third point to note is that the PivotTable Field List is the only way we can change the PivotChart in lieu of using the

Select Data Source dialog box. This point is also important because the PivotTable AND PivotChart are BOTH based on

the PivotTable Field List and ANY change to the Field List will change BOTH the PivotTable and the PivotChart.

6. Remove the Years field from the Row Labels report area of the PivotTable Field List.

Page 229: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

229 Figure 8-62: Years field removed from the Row Labels report area.

As shown in Figure 8-62 both the PivotTable and PivotChart changed as a result of removing the Years field from the

PivotTable Field List.

7. Undo the previous Step.

The fourth point to take note of is that deleting a PivotChart is easy.

8. Activate the PivotChart and press the Delete key.

9. Undo the previous Step.

All that remains to be done to our PivotChart is to add an appropriate title, axis labels, remove the legend since we are

plotting a single data series, relocate the chart to its own worksheet and to make the chart “pretty”.

10. Activate the Chart. Observe that the familiar charting menus Design, Layout and Format are available as is a

new menu Analyze as illustrated in Fig.

Figure 8-63: The Pivot Chart Tools.

11. Move the PivotChart to its own worksheet accept the default sheet name.

12. Use the Pivot Chart Tools to add title, axis labels, remove the legend and other wise make it presentable.

Page 230: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

230

13. Unhide the Sales Chart worksheet. Compare to your results and make any necessary changes (e.g., if you used

a different but appropriate chart title, it is not necessary to change your chart to match the Sales Chart).

Question 8-13: Show as % of column

From the above PivotChart we note that sales increased until January 1997, remained relatively flat throughout the rest

of 1997 and rose sharply in early 1998. We also note that the May 1998 sales are low in comparison to the other 1998

sales data. The good thing is that the PivotChart is making us ask the question: What happened to the May 1998 sales?

Perhaps you need to get some details on May to explain things. Can You?

Answer

1. Activate the Sales Sheet.

2. Activate cell B29 (May 1998 sales) and double click for details.

Aha! We only have data for the first 6 days of May 1998 which would account for the low May 1998 sales observed in

the PivotChart.

3. Delete the details sheet.

When the PivotChart has been moved to its own worksheet, you can still activate the PivotTable Field List to make any

changes. To do this, activate the PivotChart and the Field List will come into view. If you need to filter the PivotChart

(i.e., you need the PivotChart Filter Pane in view), select the Analyze ribbon and click on the PivotChart Filter button in

the Show/Hide group as shown in Figure 8-64. Note: you can show/hide the Field List in the same manner.

Figure 8-64: Sales Chart worksheet and the PivotChart Filter command.

4. Use Analyze |Filter on Years so that only the data from 1997 displays. Your chart should look like Figure 8-65 (after

editing the title –so choose titles carefully to avoid editing if you plan to play filter games!)

Page 231: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

231 Figure 8-65: Filter (and edited) for 1997 sales.

5. Activate the Sales sheet and observe the change in the Pivot table. Got the idea?

6. Hide the Sales Chart worksheet (and your version).

7. Save PTV - 3 Solution.

A second chart type used to plot change vs. time data is the area chart.

8. Open PTV - 3 Solution.

9. Activate the Region Sales worksheet.

This PivotTable answers the question: What are the 1997 monthly sales by region?

This PivotTable is similar to the Sales worksheet PivotTable. The Region Sales PivotTable adds the Region field to the

Column Labels report area and applies a manual 1997 filter to the Years field.

10. Create a Stacked Area PivotChart from the Region Sales worksheet PivotTable, move it to its own worksheet

and label and format it accordingly (make it pretty as well).

11. Unhide the Region Sales Chart worksheet, compare to your results and make any necessary changes:

$0

$10

$20

$30

$40

$50

$60

$70

$80

Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec

1997

Sale

s in

00

0's

Date

Monthly Sales

Page 232: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

232 Figure 8-66: Area PivotChart: change in 1997 monthly sales by region.

From the above PivotChart we note that the bulk of 1997 sales came from Europe and they appear to be seasonal (i.e.,

there are “peaks” in December-January, April-May and September-October and “valleys” in March, July and November).

North American and South American sales seem to go “up and down” from a few sales to many (e.g., compare the June

1997 South American sales to the August 1997 sales, compare the May 1997 North American sales to the July and

October 1997 sales). We also note that during some months of the year, the North and South American sales (Americas

sales) appear to be counter-cyclical to the European sales (e.g., in May the European sales are high and the Americas

sales are low by comparison, in July the European sales are low and the Americas sales are high by comparison, in

December the European sales are high and the Americas sales are low by comparison).

As mentioned in Module I: “a picture is worth a thousand words” – this remains true with PivotCharts as well.

One of the charting features used in Module I was the ability to switch row and column data Note that in the Data group

of the Design ribbon this feature has been grayed out (i.e., disabled). So the question becomes: “How do we switch row

and columns around in a PivotChart?” if this feature has been disabled by Excel.

To do this for a PivotChart is almost as easy as it is for a normal chart:

1. Activate your version of the Region Sales PivotChart.

2. Analyze |Field List then drag and drop the Axis Fields (the Years and Order Date fields) to the Legend Fields

report area and drag and drop the Legend Fields (the Region field) to the Axis Field report area (yes, it looks

messy – we will fix this soon enough). Your worksheet should now appear as follows:

$0

$10,000

$20,000

$30,000

$40,000

$50,000

$60,000

$70,000

$80,000

Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec

1997

Sale

s

Date

Sales by Region

Europe North America South America

Page 233: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

233 Figure 8-67: Area PivotChart: row and columns switched.

12. Undo the previous Step.

13. Hide the Region Sales Chart worksheet (and your version).

14. Save PTV - 3 Solution.

8.2.1.2 Comparisons

1. Open PTV - 3 Solution.

2. Activate the Empl worksheet and examine the PivotTable report area fields and values.

This PivotTable answers the question: What were the total sales for each salesperson?

From Module I you should recognize that the Empl worksheet PivotTable is comparing sales for each salesperson and

that a bar chart would be appropriate to chart such data. We will use a bar chart to plot the sales comparison.

3. Create a Clustered Bar PivotChart from the Empl worksheet PivotTable, move it to its own worksheet and label

and format it accordingly (make it pretty as well).

4. Unhide the Empl Chart worksheet, compare to your results and make any necessary changes:

Page 234: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

234 Figure 8-68: Bar PivotChart: salesperson sales comparison.

The first thing that we note in the above chart is that certain salespersons have extraordinarily higher sales than others,

in some cases almost 4 times the sales (e.g., Peacock, Leverling and Davolio vs. Suyama, Dodsworth and Buchanan). This

anomaly in the data should prompt the following regional sales hypothesis: Since we know that European sales are

much higher than those in the Americas, it may be that some salespersons are located in Europe and others in the

Americas.

In this case, it is easy to determine if the hypothesis makes any sense by adding the Region field to the Column Labels

report area of the PivotTable (we could prove the hypothesis using inferential statistics).

5. Activate the Empl worksheet and move the Region field to the Column Labels report area.

From the PivotTable in Figure 8-69 we note that all salespersons have sales in both Europe and the Americas – from this

we determine that our hypothesis is most likely wrong – no one salesperson has sales from only one region.

It may well be that some salespeople are just better at their jobs than others.

$0 $50,000 $100,000 $150,000 $200,000 $250,000

Buchanan, Steven

Callahan, Laura

Davolio, Nancy

Dodsworth, Anne

Fuller, Andrew

King, Robert

Leverling, Janet

Peacock, Margaret

Suyama, Michael

Sales

Sale

spe

rso

n

Employee Sales

Page 235: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

235 Figure 8-69: Salesperson regional sales.

Note what has happened to the PivotChart:

Figure 8-70: Bar Salesperson sales comparison by region.

The Region field has also been added to the PivotChart in the Legend Fields report area. Since we are pretty sure that

our regional sales hypothesis is wrong, we need to remove the Region field from the PivotChart.

6. Undo the previous Step. This returns the PivotChart to its previous layout.

7. Hide the Empl Chart worksheet (and your version) and the List, Sales, Region Sales and Empl worksheets.

8. Save PTV - 3 Solution.

Sum of Sales Column Labels

Row Labels Europe North America South America Grand Total

Buchanan, Steven $33,055 $16,421 $19,316 $68,792

Callahan, Laura $75,070 $28,023 $23,769 $126,862

Davolio, Nancy $94,999 $57,710 $39,398 $192,108

Dodsworth, Anne $55,884 $18,192 $3,233 $77,308

Fuller, Andrew $119,830 $33,280 $13,429 $166,538

King, Robert $71,863 $37,793 $14,912 $124,568

Leverling, Janet $133,257 $48,798 $20,758 $202,813

Peacock, Margaret $147,764 $57,917 $27,210 $232,891

Suyama, Michael $42,852 $21,230 $9,831 $73,913

Grand Total $774,574 $319,363 $171,856 $1,265,793

$0 $20,000 $40,000 $60,000 $80,000 $100,000 $120,000 $140,000 $160,000

Buchanan, Steven

Callahan, Laura

Davolio, Nancy

Dodsworth, Anne

Fuller, Andrew

King, Robert

Leverling, Janet

Peacock, Margaret

Suyama, Michael

Sales

Sale

spe

rso

n

Employee Sales

Page 236: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

236 8.2.1.3 Proportions

1. Open PTV - 3 Solution.

2. Activate the Cat Sales worksheet and examine the PivotTable report area fields and values.

This PivotTable answers the question: What were the total sales and % of total sales by product category?

From Module I you should recognize that the Cat Sales worksheet PivotTable is comparing the proportion of sales by

product category and that a pie chart would be appropriate to chart such data. We will use a pie chart to plot the

proportion of sales.

3. Create a Pie in 3-D PivotChart from the Cat Sales worksheet PivotTable, move it to its own worksheet and label

and format it accordingly (add data labels to the pie chart and make it pretty as well).

4. Unhide the Cat Sales Chart worksheet, compare to your results and make any necessary changes:

Figure 8-71: Proportion of sales by product category.

From the above PivotChart we note that a large portion of sales come from the Dairy Products category closely followed

by the Beverages category. The other product categories account for about the same proportion of sales, plus or minus a

few percent.

Based on the above, we would like to highlight the Dairy Products slice by exploding its slice in the PivotChart.

5. Click on the 3-D Pie to activate it, click on the Dairy Products slice and drag it down and away from the rest of

the 3-D pie slices.

6. Reformat the font size of the 3-D Pie data labels (select the data labels using the Chart Elements drop-down

menu in the Current Selection group of the Layout ribbon and right mouse apply a smaller font size or apply a

smaller font size from the Font group of the Home ribbon).

Beverages$102,074

17%

Condiments$55,278

9%

Confections$80,894

13%

Dairy Products$114,750

19%

Grains/Cereals$55,949

9%

Meat/Poultry$81,338

13%

Produce$53,020

9%

Seafood$65,544

11%

1997 Category Sales

Page 237: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

237 Your PivotChart should now appear as follows:

Figure 8-72: Exploding the Diary Products slice.

7. Hide the Cat Sales Chart worksheet (and your version).

8. Save PTV - 3 Solution.

8.2.1.4 Print or Export a PivotChart

Printing or exporting a PivotChart is no different than for a normal chart. See the Module I – Printing Charts section.

The best viewing/printing results are obtained by copying the PivotChart as a Picture from Excel and pasting into

another application, such as Microsoft Word, as a Picture (Enhanced Metafile).

If you believe that you may need to make changes to the chart, e.g., from within Microsoft Word, then it is better to

copy (NOT copy as picture) the PivotChart from Excel and Paste Special as a Microsoft Office Excel Chart Object which

creates an OLE object (specify Paste to embed the PivotChart but not link it to the original Excel file, yet modify the

PivotChart from within Microsoft Word using the Excel interface or Paste Link to link the PivotChart to the original Excel

file, modifications to the PivotChart from within Microsoft Word, using the Excel interface, will also be made in the

original Excel file – the same applies for Microsoft PowerPoint)

8.2.1.5 A few caveats about Pivot Charts

Most of Excel’s charting features, as discussed Module I, apply equally to Pivot Charts but a few caveats need to be

noted.

a. The XY (Scatter), Bubble, Stock charts and other combination charts are not available for creating a PivotChart

from PivotTable data.

b. You cannot change the data source from a PivotChart (see Figure 8-73). You must change the data source by

rearranging the report area fields as indicated in Figure 8-74 (this is why you cannot create a combination chart).

Note that in Figure 8-73 the chart data range and the series and category axis cell addresses and labels are

grayed out – this means you cannot change them from the Select Data Source dialog box.

Beverages$102,074

17%

Condiments$55,278

9%

Confections$80,894

13%

Dairy Products$114,750

19%

Grains/Cereals$55,949

9%

Meat/Poultry$81,338

13%

Produce$53,020

9%

Seafood$65,544

11%

1997 Category Sales

Page 238: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

238

c. Changes are made directly from either the PivotChart Filter task pane (you can only make sort and filter changes

to the chart) or from the PivotTable Field List task pane. This maintains the link between Table and Chart and is

the reason why a PivotChart change will also change the PivotTable - both the PivotChart and PivotTable use the

SAME Field List task pane.

Figure 8-73: Design: Select Data Source dialog box.

Figure 8-74: PivotChart interface.

d. The Design, Layout and Format charting ribbons are the same as for a normal chart (see Figure 8-75). In addition

to these ribbons, a PivotChart features an Analyze ribbon (this ribbon is not present in normal charting):

Figure 8-75: PivotChart Analyze ribbon.

Data range, series and category axes

inputs are grayed out – these changes

cannot be made using the Select Data

Source dialog box.

The PivotChart filter pane is used to

change/clear sort & filter criteria

from the PivotChart.

The PivotTable Field List is used to

select/change the PivotChart data

source and also sort & filter criteria.

Page 239: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

239

8.3 Beyond the Basics Various other Tools and Features

This section covers a variety of tools and features that enhance your understanding of the Basics

8.3.1.1 Move as an alternative to drag and drop to re-organize tables

We have been using the drag and drop method (see Figure 8-76) or the checkbox method to arrange fields in the report

area. The drag and drop method is also useful in ordering more than one field in a report area (e.g., Employee field

above the Customer Country field). During drag and drop, the cursor changes to the field name, a pointer and a

PivotTable icon highlighting the report area where the field will appear (see Figure 8-76).

Figure 8-76: Drag and drop cursor highlighting (Salesperson = Employee).

To reorder fields in a report area using the drag and drop method, simply left mouse and drag and drop a field above or

below another field.

1. Open the file: PTV - 4 Beyond the Basics. Save as PT – 4 Solution.

2. Activate the Subtotal worksheet.

3. In the Row Labels report area, left mouse the Customer Country field and drag and drop it above the Employee

field (a horizontal line will indicate where the field will be positioned):

The cursor changes to a drag and drop icon

with the field name, a pointer and an icon of

the PivotTable which highlights the report

area where the field will appear.

Page 240: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

240 Figure 8-77: Results of drag and drop (Customer Country moved above Employee in the Row Labels report area).

While drag and drop seems to be the most popular method for rearranging material you may find Move a useful

alternative at times.

Figure 8-78: Move submenu shown highlighted (for the Customer Country field, Argentina data item or record).

Study the Move submenu in Figure 8-78 carefully. There are different types of move operations available. You can move

within an area (Up/Down, Left/Right etc.) or you can move material to a different part of the Table (Move a Row to

become a column). Let’s apply the above 3 types of move operations to the PivotTable in the Subtotal worksheet.

4. Activate a Customer Country record (e.g., Argentina, Austria, Belgium), right mouse select Move: Move

“Customer Country” to Columns (see Figure 8-79). This pivots the table. Undo the move operation.

A horizontal line will appear,

during a dag and drop, to

indicate the reordered field

position.

Page 241: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

241 Figure 8-79: Moving the Row Label to Column Label report area.

5. Activate a Customer Country record (e.g., Argentina, Austria, Belgium), right mouse select Move: Move

“Customer Country” to Right. The results of the move operation are shown in Figure 8-80.

Figure 8-80: Move the Customer Country to the right (after Salesperson in the row labels).

6. Activate Belgium in any Customer Country field (e.g., under Buchanan, Davolio, Dodsworth) of the PivotTable,

right mouse select Move: Move “Belgium” Down. This moves Belgium after Brazil (see Figure 8-81). Note that

ALL the Customer Country data fields are changed (e.g., under Davolio, Dodsworth etc. Belgium appears after

Brazil). Undo the move operation.

The Customer Country field appears to the right of the

Employee field in the PivotTable and below in the

PivotTable Field List task pane.

Page 242: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

242 Figure 8-81: Move the Customer Country Belgium so that it appears after Brazil.

7. Save the file: PTV - 4 Solution.

8.3.1.2 Refresh & Change Data Source

Pivot Tables do not automatically update when material is edited or new records are added. However updating Tables

after such changes is relatively easy.

1. Open the file PT -4 Solution.

2. Unhide the sheet Shipping.

The Pivot Table has an odd entry in rows 5 and 6. It shows “blanks” for dates “<7/10/1996”. The problem has to do with

the Ship Date Field. To see the problem:

3. Activate List.

4. Data |Filter |Ship Date for blanks and Filter |Shipped Via Company to Federal Shipping.

You should have Figure 8-82 (except for the SUBTOTAL function). Recall that this set of data “ends” in May 1998. So

the blanks mean Federal Shipping has accepted the order but not yet shipped it.

Belgium now appears below

Brazil in ALL the Customer

Country data fields.

Page 243: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

243 Figure 8-82: The List worksheet filtered by blank Shipped Date and Ship Via Company.

For example, if we add a SUBTOTAL formula to a cell below the freight charges column, as shown in Figure 8-82, we

calculate $149.41 in total freight charges for Federal Shipping which is the same as the value in cell B6 of the PivotTable.

(If we filtered the list for the other 2 shipping companies and then all 3 shipping companies, we arrive at the same values

shown in the “(blank)” row of the PivotTable.

This establishes that in all cases, the order dates are in April or May of 1998 and could not have been shipped

“<7/10/1996”, i.e., the orders cannot be shipped in the past.

What has Excel done?

In the absence of Shipped Date inputs, Excel has assumed the Shipped Date values occurred before the earliest ship date

which was July 10, 1996 – an honest mistake on Excel’s part (i.e., it could have assumed the ship dates were after the

latest ship date input of May 7, 1998 or “>5/7/1998”).

Regardless, we have to fix the error. We have 2 choices to fix the error (well actually 3 choices, where the 3rd choice

would be to do nothing – which obviously, we shall ignore):

1. Filter the list to remove the “<7/10/1996” Years and “(blank)” Quarters labels.

2. Add temporary inputs to the Shipped Date column equal to the corresponding Required Date,

The first choice simply “hides” the blanks and may be reasonable since we know these have not been shipped. This is the

obvious choice (i.e., at some point after 5/7/1998, the orders will be shipped and entered into the data list after which

we can do a Refresh of the PivotTable to update it with the new information).

The 2nd choice would be, in practice, adding erroneous inputs to the data list - we will only do this to illustrate the

Refresh and Change Data Source features of a PivotTable.

Page 244: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

244 Let’s use the 2nd choice fix: add temporary inputs to the Shipped Date column equal to the corresponding Required Date

and practice the Refresh feature for a PivotTable.

1. Activate the List worksheet.

2. If you already filtered the List Shipped Via Company |Clear filter otherwise apply a Blanks filter to the Shipped

Date.

Figure 8-83: Blanks filter applied to the Shipped Data column.

Now, for illustration only we assume the Shipped Date for all orders is June 15/98. So

3. Activate G272 input 15/6/98.

4. Fill down to G831 to generate Figure 8-84.

Page 245: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

245 Figure 8-84: Adding the test date 15/6/98.

5. Activate the Shipping worksheet.

6. Right mouse in the PivotTable and select Refresh or alternatively, select Options |Data |Refresh.

7. Regroup the Shipped Date Row Label by Years and Quarters. Yielding:

Figure 8-85: The Format PivotTable refreshed to show the new Shipped Date inputs.

Note that the Format PivotTable refreshed with the new inputs that were added to the existing records (rows). This

means we do not have to create a new PivotTable every time the data list it is updated – a very useful feature.

If new records (rows) are added to the PivotTable, we can select Change Data Source… under the Options ribbon in the

Data group and redefine the data list cell range. The PivotTable will then update automatically to show any new records

added to the data list. This means we do not have to create a new PivotTable every time the data list it is expanded –

yet again, a very useful feature.

3

4

5

6

7

8

9

10

11

12

13

14

15

16

A B C D E

Sum of Freight Column Labels

Row Labels Federal Shipping Speedy Express United Package Grand Total

1996

Qtr3 1,176.21 874.89 1,125.56 3,176.66

Qtr4 2,491.31 1,177.86 2,623.11 6,292.28

1997

Qtr1 2,441.99 1,558.26 2,173.86 6,174.11

Qtr2 3,088.47 1,703.77 3,519.03 8,311.27

Qtr3 2,480.90 2,504.83 3,015.62 8,001.35

Qtr4 3,558.19 3,052.26 3,066.94 9,677.39

1998

Qtr1 3,095.51 3,678.01 6,990.83 13,764.35

Qtr2 2,179.93 1,635.45 5,729.90 9,545.28

Grand Total 20,512.51$ 16,185.33$ 28,244.85$ 64,942.69$

Page 246: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

246 8.3.1.3 Conditional Formatting

Conditional formatting can be applied to a PivotTable in much the same way we applied it to worksheets in general.

In this section we will use conditional formatting to highlight above average freight charges in a modified version of the

Format PivotTable (same idea as shown in Error! Reference source not found.).

1. Open the file: PTV - 4 Solution. Unhide the sheet Cond Format.

2. Turn all Subtotals and Grand Totals off for rows and columns (one method uses Design |Layout).

3. Apply the Above Average conditional format to the Sum of Freight values as shown in Figure 8-86.

4. Save the file: PTV - 4 Solution (this will remove the persistent Formatting Options icon and its drop-down list).

The results of the Above Average conditional format are shown in Figure 8-86.

Figure 8-86: Quarters with above average freight charges.

Figure 8-86 indicates that most of the United Package freight charges are above average. Maybe some further

investigation is warranted –are the charges above average because United charges more (on a comparable basis than

Federal or Speedy) or is United simply doing more of the shipping (e.g., United Package may be the only service used to

ship orders to international customers)?

Question 8-14: Above average freight charges.

Is there a quick method to determine if the above average freight charges have anything to do with a higher frequency

of shipments?

Page 247: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

247 Answer

Change the Freight summary function to Count. As can be seen in the Figure 8-87, United’s above average freight

charges seem to coincide with its higher frequency of shipments – to verify whether this hypothesis is correct,

inferential statistics could be used to break down costs further.

Figure 8-87: Count of Freight summary function results.

5. Save the file: PTV - 4 Solution.

8.3.1.4 Referencing PivotTable Cells in a worksheet

At times you may need to reference comparison and summary information in a PivotTable in another part of a

worksheet or workbook. Summary data is retrieved from a PivotTable, provided the summary data is visible in the

report, using the GETPIVOTDATA function. The GETPIVOTDATA function syntax (Excel Help):

1. Open the file: PTV - 4 Solution. Unhide the GetPivotData worksheet.

2. Activate cell G1, input the formula =C6 and press Enter (see Figure 8-88). Excel inputs the GETPIVOTDATA

function in G1 and returns 3,093.30 (after formatting).

Figure 8-88: Extracting Buchanan’s 1997 sales to Belgium.

3. Now collapse the material for Buchannan (change the button “- “ to “+” next to Buchanan). G1 displays “#REF!”

signaling the information is not on display as in Figure 8-89below.

Page 248: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

248 Figure 8-89: Collapsing the detail.

Optional for the curious:

The syntax looks complex

=GETPIVOTDATA("Order Amount",$A$3,"Employee","Buchanan","Order Date",1997,"Customer

Country","Belgium")

But at heart it’s simple. The list of arguments supplies information to allow Excel to locate the data.

Argument Comment Item Arguments Comment

Data_field Order Amount The table summarizes dollars of sales

Pivot_table $A$3 The table starts in cell $A$3

Field 1 Employee Item 1:Buchanan Looking at Employee Buchanan

Field 2 Order Date Item 2: 1997 Looking at orders for 1997

Field 3 Customer Country Item 3: Belgium Looking for Belgium

To see why this is useful:

4. Expand Buchanan so the function displays 3,093.30.

5. Pivot your table by switching the row and column entries as shown in Figure 8-90. The required value is now in

cell B29. The function in G1 still reports the result correctly.

Page 249: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

249 Figure 8-90: Pivoting the Table.

Page 250: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

250 8.3.2 More Beyond the Basics: Practice Exercises

The following practice exercises use the skills you have learned thus far to compare and summarize data lists using a

PivotTable. Each section contains two questions with varying degrees of difficulty. Answers are provided.

8.3.2.1 Sales List Questions

The list shows USA and UK sales by salesperson and order date, sorted by order number.

1. Open the file: PTV - 4 Solution.

2. Unhide the Sales List worksheet. Hide all other sheets.

Question 8-15: Degree of difficulty: Easy to Moderate

The Table (Name the sheet SL1):

a. Create the PivotTable in Figure 8-91 below.

Formatting Issues:

b. Apply a Percentage 1 decimal place.

c. Apply a Pivot Style Dark 2 to the PivotTable.

Figure 8-91: UK Sales by Salesperson.

Answer

3. Unhide the Answer SL1 worksheet.

Question 8-16: Degree of difficulty: Moderate

The Table (Name the sheet SL2):

a. Create a PivotTable that shows salespersons results for each quarter. The table should show their sales in dollars

and as percent of total. Allow country choices via the report area.

b. Hide the subtotal sales. Filter the PivotTable report for the USA.

Formatting Issues:

c. Apply a Currency 0 decimal places number format with the $ symbol to all dollar values.

Page 251: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

251

d. Rename the “Sum of Order Amount” column: “Sales” and right align the label and rename the percent column

“% of total” (right align the label)

e. Apply an Accounting $ and two decimals and percentage one decimal to the columns

f. Hide the plus and minus drill down indicators. Hide the “Row Labels” field caption and drop-down arrow.

Answer

1. Unhide the Answer SL2 worksheet.

2. Save the file: PTV - 4 Solution.

Question 8-17: Degree of difficulty: Advanced.

Modify the Table (do everything on the sheet SL2)

a. Activate the SL2 worksheet.

b. Input in cell H1 a function to calculate the average value of sales.

c. Insert a calculated field, to the right of the % of Total field, named: “Bonus %” (right align the label) that returns

the 10% if the quarterly sales value is below average or 20% if the quarterly sales value is average or above

average.

d. Insert a calculated field, to the right of the “Bonus %” column that calculates the bonus amount rounded to the

nearest $10 (label the column Bonus).

e. Highlight, using a Green Fill with Dark Green Text, quarterly sales for each salesperson that are above average.

Formatting Issues:

f. Apply a Currency 0 decimal places number format with the $ symbol to all dollar values in the Bonus field.

g. Apply a Calibri 9 pt font format to all values and labels.

h. Apply a Pivot Style Light 16 to the PivotTable. Name the PivotTable: “USA Sales”.

Answer

1. Unhide the Answer SL3 worksheet.

2. Save the file: PTV - 4 Solution.

8.3.2.2 Product List Questions

The list shows total product sales over 4 quarters, sorted by product category.

1. Open the file: PTV - 4 Solution. Unhide the Products List worksheet.

2. Hide all other sheets.

Question 8-18: Degree of difficulty: Easy to Moderate.

The Table (Name the sheet PL1):

a. Create a PivotTable that shows the quarterly sales for each category its products.

b. Collapse all categories except Beverages.

c. Show row and column grand totals.

Formatting Issues:

d. Insert Blank Rows between entries.

Page 252: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

252

e. Hide display field captions and their drop-down arrows.

f. Rename the Values report area title: “Product Category Sales by Quarter”.

g. Format the labels, values and PivotTable style accordingly.

Answer

3. Unhide the Answer PL1 worksheet.

Question 8-19: Degree of difficulty: Moderate.

Modify the Table (do everything on the sheet PL2)

a. Copy the Answer PL1 worksheet and name it: PL2.

b. Modify the PivotTable to show only the Beverages category for quarters 1 and 2.

c. Show the sum, average, maximum and minimum quarterly subtotals.

d. Turn off all the Grand totals.

e. Hide display field captions and their drop-down arrows.

Formatting Issues:

f. Rename the Values report area title: “Quarter 1 & 2 Beverage Sales”.

g. Format the labels, values and PivotTable style accordingly.

Answer

4. Unhide the Answer PL2 worksheet.

5. Save the file: PTV - 4 Solution.

8.3.2.3 Orders List Questions

The table, sorted by product, shows product orders with unit and extended prices and any applied discounts.

1. Open the file: PTV - 4 Solution.

2. Unhide the Orders Table worksheet. Hide all other sheets.

Question 8-20: Degree of difficulty: Moderate.

The Table (Name the sheet OL1):

a. Create a PivotTable that shows, by Order ID, the products purchased, unit price, discount and extended price.

b. Manually filter the Order ID for orders: 10250, 10256, 10258 and 10262.

c. Hide all subtotals and grand totals.

d. Add a cell formula in an adjacent column, named: “Check Ext. Price”, that calculates the extended price for

Order ID 10250 using data from the PivotTable.

Formatting Issues:

e. Rename the Qty field to: “Quantity”, the Unt Price field to: “Unit Price”, the Disc field to “Discount” and the Ext

Price field to “Extended Price”.

f. Format the labels, values and PivotTable style accordingly.

Answer

Page 253: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

253

3. Unhide the Answer OL1 worksheet.

Question 8-21 Degree of difficulty: Difficult.

The Table (Name the sheet OL2):

a. Create a PivotTable that shows, for each product sorted from A to Z, the maximum, minimum and average unit

price; the quantity sold and the extended price.

b. Create a calculated field Avg Extended Price that calculates the extended price ÷ quantity and put this field to

the right of the extended price field.

c. Hide display field captions and their drop-down arrows.

d. Find details for the Chocolade average extended unit price. Format the Chocolade details worksheet accordingly.

Formatting Issues:

e. Add Freeze Panes the PivotTable so that it may be scrolled with the field titles in view.

f. Rename all of the Values labels with appropriate names and wrap text where appropriate.

g. Format the labels, values and PivotTable style accordingly.

Answer

4. Unhide the Answer OL2 and Chocolade worksheets.

5. Hide all worksheets for the exception of the List worksheet.

6. Save the file: PTV - 41 Solution.

8.3.2.4 Customer List Questions

The list shows product sales by customer and quarter, sorted by product.

1. Open the file: PTV - 4 Solution.

2. Unhide the Customer List worksheet. Hide all other sheets.

Question 8-22: Degree of difficulty: Easy to Moderate

The Table (Name the new sheet CL1):

a. Create a PivotTable to summarize the 1st quarter sales by customer and the products purchased by the

customers.

b. Set the table to display the results for the top customer only.

Formatting Issues:

c. Do not show any Grand Totals, show only a subtotal at the bottom of the group.

d. Apply a Currency 0 decimal places number format with the $ symbol to all dollar values.

e. Apply a Calibri 10 pt font format to all values and labels.

f. Accept the default PivotTable style.

Answer

1. Unhide the Answer CL1 worksheet and compare to your solution.

Page 254: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

254

2. Hide CL1 and Answer CL1.

3. Save the file: PTV - 4 Solution.

Question 8-23: Degree of difficulty: Very Complex

The Table (Name the sheet CL2):

a. Create a PivotTable that shows for each customer the products purchased and the value of sales for each

product for all 4 quarters.

b. Create a calculated field named Total that sums all four quarters of sales.

c. Provide a subtotal of sales by quarter for each customer at the bottom of each customer group

d. Collapse the list except for the first the 1st customer (i.e., the 1st customer data should show the products

purchased and their sales by quarter). Show a row and column grand total.

e. Provide a check calculation to show that the row grand total, for all customers, is calculating correctly whether

the list is collapsed or not (use the column grand totals for the check calculation).

Formatting Issues:

f. Apply an Accounting, 2 decimal places labels.

g. Make the PivotTable easier to navigate from top to bottom.

h. Highlight the top 10% quarterly subtotal sales for any customer using a Green Fill with Dark Green Text.

i. Apply an appropriate PivotTable style that will not obscure the top 10% highlighted cells. Set the worksheet to

an appropriate zoom level.

Answer

4. Unhide the Answer CL2 worksheet.

Save the file.

Page 255: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

255

9 Term Project: Receipts & Disbursements Cash Flow Statement

9.1 Overview – the importance of cash “Cash is King” so the saying goes.

No matter how altruistic business owners and their managers may be, businesses must generate cash. Ratios such as

Return on Sales (ROS), Return on Investment (ROI) etc. are “all fine and dandy” as financial indicators of a businesses

health, but at the end of the day banks take cash on deposit, not ratios. Workers and suppliers get paid in cash, not

financial indicators. Investors invest in a business on the expectation of making more cash than they invested. This is

why “Cash is King”.

When cash outflows exceed cash inflows, for a long enough period of time, a business will go bankrupt – owners and

investors will lose all or a portion of their investment, workers and suppliers will not be paid in full, if at all, and even

lenders such as banks may not receive their money back in full.

See Canadian business bankruptcy statistics and consider the following:

“I would estimate that more businesses fail because they have lost sight of their cash flow problem or have lost the faith

of their lenders than for any other single cause. Many of these failures are unnecessary. To stay on top of the cash flow

problem, many business people have acquired personal computers and spreadsheet programs. With a good spreadsheet

program it is relatively simple to consider every conceivable cash flow outcome. Armed with this information, every

worthy business should be able to acquire funds to meet its cash flow needs.”3

“If financial projections are so frequently off-target, entrepreneurs might ask, then why bother with them? After all,

they wonder, how can anyone be expected to say what’s going to happen three to five years into the future, particularly

regarding something as volatile as a new or very young company.

One entrepreneur who was undergoing intense questioning about his company’s projections by panelists [Venture

Capitalists+ finally said, in exasperation, “I really don’t take our projections or any projections more than a year out all

that seriously. After all, I don’t really know how much business it’s reasonable to expect three, four, and five years into

the future.”

A panelist’s *Venture Capitalist’s+ response was swift and certain. “We know you can’t say for sure what’s going to

happen,” the panelist observed. “But you must go through the process. You must consider best case and worst case

scenarios. You must demonstrate that you can quantify marketing, production, and other testing and research you’ve

done. We might not agree with your projections, but we want to see that you’ve thought about where your company

might be in five years and quantified your thinking.

Indeed, a company’s financial projections are the result of its strategy and planning.”4

So cash flow forecasts or projections (a.k.a. Pro-Forma Cash Flow Statement) are of upmost importance to a business.

3 H.D. Platt, Why Companies Fail, Lexington books, 1985, p. 28.

4 S.R. Rich and D.E. Gumpert, Business plans that Win $$$: Lessons From the MIT Enterprise Forum, Harper & Row, 1984, p 147.

Page 256: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

256 Elements of a Cash Flow Forecast (parts of this material adapted from B.C. government pamphlets)

A cash flow projection begins with a set of assumptions (inputs), such as:

The forecasting period.

Actual cash balance at the start of the forecasting period.

A forecast of sales received in cash.

A forecast of Accounts Receivable (A/R) received in cash.

A forecast of costs paid in cash.

A forecast of fixed asset purchases paid in cash.

A negative cash balance funding strategy.

A positive cash balance investing strategy.

Note that the list above is only concerned with cash inflows and outflows. Many people believe that Income Statement

(a.k.a. a Profit and Loss Statement or P/L Statement) Net Income indicates the cash a company makes at the end of a

reporting period (e.g., a month, a year). This is only true if all Revenues are received in cash and all Expenditures are paid

in cash during the reporting period – this is rarely the case.

In most cases, a portion of the Revenues have not been received in cash – non-cash Revenues are reported as A/R on a

Balance Sheet Statement. Similarly a portion of the Expenditures will not have been paid in cash (e.g., invoices from

suppliers for raw materials delivered and consumed by the business, wages to workers, taxes to Government, a monthly

payment to a lender) – these are reported in various liability accounts on a Balance Sheet such as: Accounts Payable

(A/P), deferred taxes, Current Portion of Long-Term Debt etc.

Furthermore in an Income Statement or Profit and Loss (P/L) Statement depreciation is shown as an expense item. It

represents a “wear and tear” expense for Fixed Assets such as machinery, computers and buildings Depreciation is a

non-cash expense since the company does not disburse any money; therefore, depreciation is not included in a cash

flow statement since it is a non-cash expense.

The end result of a Pro-Forma Cash Flow Statement is the Closing Cash Balance. This is usually done at intervals

throughout the forecasting period. For example, if the forecasting period is a year, then the cash balance will be

calculated at the end of each month – in some cases, the cash balance may even be calculated on a weekly basis

depending upon the cash position of a business.

Other important uses of a Pro-Forma Cash Flow Statement are as part of a Business Plan for a new business start-up

(would be Entrepreneurs take heed); a Merger, an Acquisition or Divestiture Plan etc. In the case of a Business Plan for a

new business start-up, an investor or lender is primarily interested in knowing if and when the new business will

generate enough cash to repay their investment with a profit.

The first step in creating a cash flow statement is gathering the required information

For existing operations, sales revenues from the same month in the previous year makes a good base for forecasting

sales for that month in the succeeding year. For example, if the trend readers in the economy and the industry predict a

general growth of 4% for the next year, it will be entirely acceptable for you to show each month's projected sales at 4%

higher than your actual sales the previous year. Include notes to explain any unusual variations from previous years'

numbers.

Page 257: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

257 If you sell products on credit terms or with installment payments, you must be careful to enter only the part of each sale

that is collectible in cash in the specific month you are considering (realized accounts receivable). Any amount collected

after 30 days will be termed Collections on Accounts Receivable (or Collected A/R 30, or similar words) and will be

shown in the month in which the A/R will be collected.

It is critical to the credibility of your plan that any sales made should only be entered once the cash is received in

payment. This is a critical test principle of cash flow and should be applied whenever you are in doubt as to what

amount to enter and when.

Project each of the various cost categories beginning with a summary for each month of the cash payments to trade

suppliers (A/P) etc. Again, follow the principle that there should not be any averaging or allocating of inventory

purchases. Each month must show only the cash you expect to pay out that month to your trade suppliers. For example,

if you plan to pay your supplier invoices in 30 days, the cash payouts for January's purchases will be shown in February.

If you can obtain trade credit for longer terms, then cash outlays will appear two or even three months after the

purchase has been received and invoiced.

An example of a different type of cost is insurance. Your commercial insurance premium may be $2,400 annually.

Normally, this would be treated as a $200 monthly expense. But cash flow will not see it this way. The cash flow wants

to know exactly how and when it will be paid. If it is to be paid in two installments, $1,200 in January and $1,200 in July,

then that is how it must be entered in the cash flow statement. The same principle applies to all cash flow

disbursements.

It is important to separate cash inflows from operations and non-operating sources. If for example you receive a loan or

a cash injection from an investor (a non-operating source of cash), this should be reported separately from operating

sources of cash. The reason for this is to determine whether the business is self-funding.

Once total cash collections, total cash payments on goods purchased, and any other expected costs have been estimated

for each individual period of operation, it is necessary to link the cash flow status of each period to the cash flow status

and activity of the preceding and succeeding periods (i.e., the reconciliation).

The reconciliation section of the cash flow worksheet begins by showing the balance carried over from the previous

period’s operations. To this it will add the total of the current period's receipts and subtract the total of the current

period’s disbursement. This adjusted balance will be carried forward to the first line of the reconciliation portion of the

next period to become the base to which the next period's cash flow activity will be added and/or subtracted.

Cash flow plans are living entities and must constantly be modified as you learn new things about your business and

your paying customers. Since you will use this cash flow forecast to regularly compare each period's projected figures

with each period's actual performance figures, it will be useful to have a second column for the actual performance

figures right alongside each of the planned columns in the cash flow statement. As the true strengths and weaknesses of

your business unfold before your eyes, actual patterns of cash movement emerge. Look for significant discrepancies

between the “planned” and “actual” figures.

For example, if the business' actual figures are failing to meet your cash flow projections for three periods running, this

is an unmistakable signal that it is time to revise the year's projections. It may be necessary to delay the raw materials

replenishment plan, or apply to the bank to increase the upper limit of your revolving line of credit. Approaching the

bank to increase an operating loan should be done well in advance of the date when the additional funds are required.

Do not leave cash inflow to chance.

Page 258: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

258 The second step in creating a cash flow statement is to design the worksheet layout.

There are a variety of ways a cash flow forecast can be structured. To gain the optimum benefit, it is recommended that

it be structured to show cash inflows and outflows from operations separate from non-operating cash inflows and

outflows such as proceeds from the sale of a company asset (e.g., old equipment) or cash loan to an employee.

Your general format should allow a double width column along the left side of the page for the account headings, then

two side by side vertical columns for each month of the year, beginning from the month you plan to open (e.g., the first

dual column might be labeled April Planned and April Actual etc.).

From there, the cash flow worksheet breaks into three distinctive sections. The first section (at the top left portion of

the worksheet, starting below and to the left of the month names) is titled Cash Receipts (or Cash In). The second

section, just below it, is titled Cash Disbursements (or Cash Out). The final section, below that, is titled Reconciliation of

Cash Flow.

Figure 9-1 Simple cash flow statement showing planned and actual data.

The following are typical cash receipt line items:

Cash Sales from main product lines

Cash Sales from auxiliary product lines

Cash from Services Provided

Collection from Accounts Receivable

Proceeds from the Sale of Fixed Assets

Other Operations Cash Revenues

Non-Operating Cash Receipts

April April May May

ITEM Planned Actual Planned Actual

Cash Receipts

Total Cash Receipts 40$ 10$ 75$ 35$

Cash Disbursements

Total Cash Disbursements 50$ 60$ 60$ 70$

Reconci l iation of Cash Flow

Opening Cash Balance -$ -$ (10)$ (50)$

Add: Total Cash Receipts 40 10 75 35

Deduct: Total Cash Disbursements 50 60 60 70

Clos ing Cash Balance (10)$ (50)$ 5$ (85)$

Page 259: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

259 The following are typical cash disbursement line items:

Cash Payments to Trade Suppliers of main

product lines

Cash Payments to Trade Suppliers of auxiliary

product lines

Management Draws

Full-time Salaries and Wages

Part-time and Casual Salaries and Wages

Sales Commissions and/or Royalties Paid

Cash Dividends Paid

Advertising and Promotion Expense Paid

Professional Fees Paid (legal, audit, courses and

consulting)

Business Licenses Registrations and Permits

Paid

Patents, Trademarks and Distribution

Agreement Fees Paid

Rental of Premises Payments

Rental (or lease) Payments for Equipment and

Furnishings

Other Rental Payments (including vehicles)

Motor Vehicle Expenses Paid

Insurance Premiums Paid (premises,

equipment, vehicles)

Repair and Maintenance Expenses Paid

(premises, equipment, vehicles)

Utilities (electric, gas, and water) Payments

Communications (telephones, data line and fax)

Payments

Postal (mail, courier, telegrams, etc.) Expense

Payments

Cash Payments on Store/Office Supplies

Other Business Expenses (not elsewhere listed)

Interest (and Principal) Payments on Term

Loans/Mortgages

Interest Payments on Operating Line

Federal Tax Payments (duties, tariffs, income,

etc.)

Provincial Tax Payments (income etc.)

Municipal Tax Payments (property etc.).

Page 260: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

260

The following are typical reconciliation of cash flow line items:

Opening Cash Balance

Add: Total Cash Revenues

Deduct: Total Cash Disbursements

Surplus or Deficit on this Month's Operations

The Term Project

The final step in creating a cash flow statement is to take the information and worksheet design and input this into

Excel. The Alpha Products and Beta Products are receipts and disbursements cash flow models that have the same

general layout but the results from each model are different. The first step in both models, using “paper and pencil”, is

to gather the information and design the worksheet including a sample calculation for the first month’s cash flow

projection. The last step in both models, using a “template”, is to create the cash flow projection in Excel. The following

sections provide the information for each model and Project instructions.

9.1.1 Alpha Products Model

9.1.1.1 Background

-Products is holding its quarterly planning session to examine recent performance and review the prospects for 1997.

As part of this review the firm needs to produce a cash flow projection for the fiscal period January 1997 through

December 1997.

The last few years have been not been good as illustrated by the data in Figure 9-2 below.

•In the final step described above, pertinent model information is "strewn about" in the instructions that follow and in the template file - this has been done deliberately since in the "Real World" you are seldom provided with all the information in one "handy location".

Note

Page 261: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

261 Figure 9-2 -Products Sales 1993 – 1996.

The Sam Slick, Marketing Department, forecasts sales for the next two years based on a time series projection of past

sales using a technique called “classical decomposition”.5 This forecast, shown in Figure 9-3, is a projection of past trends

and seasonality. It shows a continued decrease in sales which may mean cash problems for the firm.

Figure 9-3 -Products Sales Forecast 1997 – 1998.

Sam agrees that rising consumer confidence, favorable weather, or other factors might cause Marketing to revise the

sales figures upward but, based on the evidence available, Sam feels that Figure 9-3 represents a realistic, if somewhat

5 Recall the time series trend line feature. Look at the -Products data and draw a mental graph with a line through the data. Do you

see that it will not forecast very well. To deal with this issue a series of time series techniques have been developed by statisticians and operations researchers. Any textbook on Management Science or Quantitative Methods will explain several of these methods.

Month 1993 1994 1995 1996 Averages

Jan 124,000$ 119,000$ 111,000$ 108,000$ 4.0%

Feb 154,000$ 147,000$ 139,000$ 136,000$ 5.0%

Mar 185,000$ 177,000$ 165,000$ 162,000$ 6.0%

Apr 278,000$ 265,000$ 250,000$ 243,000$ 9.0%

May 309,000$ 294,000$ 278,000$ 270,000$ 10.0%

Jun 338,000$ 322,000$ 305,000$ 297,000$ 11.0%

Jul 216,000$ 201,000$ 194,000$ 191,000$ 7.0%

Aug 172,000$ 162,000$ 153,000$ 148,000$ 5.5%

Sep 201,000$ 191,000$ 180,000$ 175,000$ 6.5%

Oct 433,000$ 412,000$ 389,000$ 375,000$ 14.0%

Nov 355,000$ 338,000$ 319,000$ 312,000$ 11.5%

Dec 324,000$ 309,000$ 291,000$ 281,000$ 10.5%

Total 3,089,000$ 2,937,000$ 2,774,000$ 2,698,000$ 100.0%

Note: Averages refer to the (average) percent sales for each month over the period. The data

reveals substantial seasonality with sales peaking just before summer and again near

Christmas.

Year

Month 1997 1998

Jan 102,000$ 97,000$

Feb 128,000 121,000

Mar 152,000 144,000

Apr 229,000 217,000

May 255,000 241,000

Jun 280,000 265,000

Jul 177,000 167,000

Aug 140,000 133,000

Sep 165,000 156,000

Oct 355,000 336,000

Nov 291,000 275,000

Dec 266,000 252,000

Annual 2,540,000$ 2,404,000$

Estimates by: Sam Slick, Marketing

Page 262: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

262 depressing, forecast. He notes that the worksheet model should allow for the ability to adjust the annual sales forecast

upward or downward by 5% but that changing the fraction of sales made in each month is not important. These

percentages have been very consistent over the years.

Rick, from Accounting, figures the breakdown of sales will continue to be about 25% cash sales and 75% as accounts

receivable. Furthermore both Sam and he feel that any reduction in revenues is more likely to result from the loss of

formerly reliable customers rather than uncollected sales. As a result, no easing of credit is planned and nobody is

suggesting that bad debt will be a big issue.

Next Rick points out that accounts receivable (or receivables) are collected over a three-month period. Of the 75% of

sales made on credit some 40% are received in the first 30 days, another 40% in the next thirty days, and the remaining

20% come in by the ninetieth day after sales.

Rick suggests that before you sit down in Excel you do a little test and calculate the pattern of cash inflows for January

1997. He says you should get higher cash inflows in April and then mutters something about the problems of confusing

revenue and cash.

Fred Taylor is responsible for the day to day operations and purchasing at Alpha. He has five critical pieces of

information:

Rent is unchanged as the (triple net) lease has two years to run. The current figure of $20,000 per month is a

reasonable estimate of the rent, utilities, and other facility related costs.

A Gross Margin of 30% is expected to be maintained (thank goodness Rick told you Gross Margin is (Net) Sales

Revenue minus cost of goods sold).

The current policy of receiving and paying for cost of goods sold (or purchases) one month in advance of

forecasted sales, in cash, is to be maintained.

Fred has seen the sales forecast and, given the nature of the business and the forecast, he produced Figure 9-4,

the estimated wages and salaries. Taylor does not think these estimates would change significantly unless there

is a radical change in sales outside the ± 5% mentioned by Marketing.

Finally, Fred notes that he has commitments from upper management to carryout computer upgrades that will

require cash payments of $10,000 in June and $40,000 in November.

Figure 9-4 Wage and Salaries Forecast 1997.

Month Estimate

Jan 40,000$

Feb 40,000

Mar 50,000

Apr 50,000

May 50,000

Jun 40,000

Jul 40,000

Aug 50,000

Sep 60,000

Oct 60,000

Nov 40,000

Dec 35,000

Annual 555,000$

Source: F. Taylor, Operations

Page 263: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

263 As a parting comment Taylor suggests that you might as well assume that there would not be any change in inventories

over the coming year. Accounting flashes through your head again. Cost of goods sold is equal to net cost of purchases

plus changes in inventory. So you can assume that cost of goods sold is roughly equal to purchases.6

Sue Smythe, the CEO, has concerns about debt and cash strategy. At present the firm has no outstanding debt of any

consequence (the line of credit has been paid down to $0) and management is confident of a Closing Cash Balance of

$100,000 as of December 31, 1996. Given the decline in sales it is unlikely that any major investment in fixed assets will

be undertaken, other than the computer upgrades.

However, Smythe is concerned that the continued decline in sales might result in the need to get a commitment from

investors to fund any temporary cash shortages with equity infusions throughout 1997. In her opinion the minimum

cash on hand needs to be $50,000. That is to say if the closing cash balance for January were $15,000, investors would

write cheques for the $10,000 shortfall. Naturally the firm does not deal in “nickels and dimes” so the cheques will be

written to the nearest thousand dollars. In short she is worried that the firm might begin to experience rising financing

needs in the face of a weak product mix.

She also hopes to use the cash flow to help her negotiate with the bank to ensure sufficient liquidity to implement her

plans to arrest the decline in sales and turn -Products around. Thus it is imperative that the firm develop a projected

Pro-Forma Receipts and Disbursements Cash Flow Statement for 1997.

9.1.1.2 Instructions

The Project consists of a hard-copy memo (a printed copy) and a completed Receipts and Disbursement Cash Flow

Statement model in Excel. Project instructions follow:

Memo (40% of the Project Grade)

1. You are to form teams of 4 or 5 students from your Set.

2. You need to first read the -Products Background section and about Receipts and Disbursement Cash Flow

Statements before proceeding to Point 3 below.

3. Your team will submit a 3 page Memo, addressed to your Lecturer and Lab Instructor, which addresses the following

key points:

3.1. Page 1 Cover Letter: As a part of your cover letter, you need to be able to explain why Rick, the accountant,

could say: “We made a profit in the P/L Statement” while Sue, the CEO, announces: “We could be toast”.

3.2. Page 2:

3.2.1. List all the crucial inputs and outputs and key assumptions in the model (e.g., we assume cash sales

are 25% of monthly sales) – you could use a T-layout towards this end (e.g., Inputs in the upper left

quadrant of the page and Outputs in the lower right quadrant of the page).

3.2.2. Identify in the outputs section the major calculations to be carried out and use appropriate headings

(e.g., Cash Receipts). Do not make any calculations on this page.

3.3. Page 3: Calculate the January 1997 Closing Cash Balance using a layout similar to that shown in Figure 9-1.

Yours will have more line items (e.g., Cash Sales, Purchases) but no “Actual” columns of data. It would be a

very good idea to label your calculations using appropriate headings (e.g., Reconciliation of Cash Flow), under

6 The complicating factor here is “net” since net cost of purchases reflects purchasing costs including things like transportation costs,

allowances and discounts.

Page 264: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

264

each heading list appropriate line items (e.g., Cash Sales), show the formula that you would use to make the

calculation for a line item followed by the numerical calculation and result. You may use names in your

formulas (e.g., = Jan 97 Sales Forecast * % Cash Sales, if this was your formula for Cash Sales). You may not

submit a printout from Excel of formulas or calculations towards this end.

4. Use a proper Business Memo Cover Letter format with all team member names and Set in the From: salutation at

the top of the Cover Letter. In the body of the Cover Letter, provide an overview of the ensuing pages and an answer

to Point 3.1. above.

5. Use common sense.

6. Use precise and legible English where required.

7. Approach the Memo as a Manager, not a Bookkeeper; therefore, do not get bogged down looking for too much

detail (i.e., we are projecting the future not recording the past; hence, a Cash Sales calculation reported to the

nearest cent is unrealistic).

8. Your team’s memo is to be submitted to your Lecturer at the start of the appointed lecture (see you Course Outline

for details). It would be a very good idea if your Set Rep gathers the memo’s for his/her Set and hands them in to the

Lecturer – this is to avoid a “stampede” to the Lecturer’s podium.

Excel Model (60% of the Project Grade)

1. Points 1 and 2 of the above Memo section apply to Excel Model as well.

2. Your team will submit a completed Receipts and Disbursement Cash Flow Statement model in Excel.

3. Use the Excel workbook provided by your Lab Instructor – named “Alpha Template”.

4. Read the information carefully and review the directions on the Instructions worksheet.

5. Fill out the required team information in the Assumptions worksheet.

6. Examine and read carefully the information contained in the Sales Data, Wages Other and Formats for Cash Flow

worksheets.

7. Take advantage of Excel’s ability to assign names (e.g., cell B13 on the Assumptions worksheet should be named

“Cash”) when constructing your formulae.

8. Add cell comments, documenting on the Sales Data worksheet, indicating who is responsible for the Sales forecast

(i.e., per the Background information provided).

9. Add cell comments, documenting on the Assumptions worksheet, indicating who is responsible for the cash sales

assumption and the gross margin assumption (i.e., per the Background information provided).

10. The model should be formatted appropriately (e.g., cell B13 on the Assumptions worksheet should be formatted as

%, 0 decimals).

11. The Cash Flow worksheet should be set-up to print:

11.1. Centered horizontally, landscape, on one page (accept the default header and footer settings, specify left and

right margin widths of 0.25 inch or 6 mm).

11.2. No gridlines and row and column headings should appear on the page.

11.3. Add a custom footer showing:

11.3.1. The file name in the left section (add an appropriate label before the file name, e.g., File Name:).

11.3.2. The current date (i.e., today’s date) in the right section (add an appropriate label before the date, e.g.,

Date:).

11.4. A custom header, in the left section, showing: all team member names.

11.5. Use a 10 pt. Calibri font in all header and footer sections.

12. Spell check the whole document.

13. The model should be protected except for the Inputs cells in the Assumptions worksheet.

Page 265: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

265 14. Additional marks will not be given for making a “prettier worksheet” – so do not waste your time doing this.

15. Your team’s workbook is to be submitted to your Lab Instructor at the start of the appointed lab (see you Course

Outline for details). Use the file naming convention provided in the Course Outline – failure to do so, will result in a

marks deduction as will files with a missing file extension, files that are 0 KB in size or are shortcuts to the workbook

file etc.

9.1.2 Beta Products Model

9.1.2.1 Background

-Products is holding its quarterly planning session to examine recent performance and review the prospects for 2004.

As part of this review the firm needs to produce a cash flow projection for the fiscal period January 2004 through

December 2004.

The last few years have been okay as illustrated by the data in Figure 9-5 below.

Figure 9-5 -Products Sales 2000 – 2003.

Sam Slick of the Marketing Department forecasts sales for the next two years based on a time series projection of past

sales using a technique called “classical decomposition”.7 This forecast, shown in Figure 9-6, is a projection of past trends

and seasonality. It shows a continued increase in sales which may mean cash problems for the firm.

7 Recall the time series trend line feature. Look at the -Products data and draw a mental graph with a line through the data. Do you

see that it will not forecast very well. To deal with this issue a series of time series techniques have been developed by statisticians and operations researchers. Any textbook on Management Science or Quantitative Methods will explain several of these methods.

Month 2000 2001 2002 2003 Averages

Jan 97,000$ 102,000$ 108,000$ 112,000$ 4.0%

Feb 121,000$ 128,000$ 136,000$ 139,000$ 5.0%

Mar 144,000$ 152,000$ 162,000$ 165,000$ 6.0%

Apr 217,000$ 229,000$ 243,000$ 250,000$ 9.0%

May 241,000$ 255,000$ 270,000$ 278,000$ 10.0%

Jun 265,000$ 280,000$ 297,000$ 306,000$ 11.0%

Jul 167,000$ 177,000$ 191,000$ 195,000$ 7.0%

Aug 133,000$ 140,000$ 149,000$ 153,000$ 5.5%

Sep 156,000$ 165,000$ 176,000$ 181,000$ 6.5%

Oct 336,000$ 355,000$ 376,000$ 389,000$ 14.0%

Nov 275,000$ 291,000$ 313,000$ 320,000$ 11.5%

Dec 252,000$ 266,000$ 282,000$ 292,000$ 10.5%

Total 2,404,000$ 2,540,000$ 2,703,000$ 2,780,000$ 100.0%

Note: Averages refer to the (average) percent sales for each month over the period. The data

reveals substantial seasonality with sales peaking just before summer and again near

Christmas.

Year

Page 266: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

266 Figure 9-6 -Products Sales Forecast 2004 – 2005.

Sam agrees that rising consumer confidence, favorable weather, or other factors might cause Marketing to revise the

sales figures upward but, based on the evidence available, Sam feels that Figure 9-6 represents a realistic forecast. He

notes that the worksheet model should allow for the ability to adjust the annual sales forecast upward or downward by

5% but that changing the fraction of sales made in each month is not important. These percentages have been very

consistent over the years.

Rick, from Accounting, figures the breakdown of sales will continue to be about 35% cash sales and 65% as accounts

receivable. Furthermore both Sam and he feel that any change in revenues is more likely to result from the new

customers. No easing of credit is planned and nobody is suggesting that bad debt will be a big issue.

Next Rick points out that accounts receivable (or receivables) are collected over a three-month period. Of the 65% of

sales made on credit some 40% are received in the first 30 days, another 40% in the next thirty days, and the remaining

20% come in by the ninetieth day after sales.

Rick suggests that before you sit down in Excel you do a little test and calculate the pattern of cash inflows for January

2004. He says you should get higher cash inflows in April and then mutters something about the problems of confusing

revenue and cash.

Fred Taylor is responsible for the day to day operations and purchasing at Beta. He has five critical pieces of information:

Rent is unchanged as the (triple net) lease has two years to run. The current figure of $20,000 per month is a

reasonable estimate of the rent, utilities, and other facility related costs.

A Gross Margin of 40% is expected to be maintained (thank goodness Rick told you Gross Margin is (Net) Sales

Revenue minus cost of goods sold).

The current policy of receiving and paying for cost of goods sold ( or purchases) one month in advance of

forecasted sales, in cash, is to be maintained.

Fred has seen the sales forecast and, given the nature of the business and the forecast, he produced Figure 9-7,

the estimated wages and salaries. Taylor does not think these estimates would change significantly unless there

is a radical change in sales outside the ± 5% mentioned by Marketing.

Month 2004 2005

Jan 119,000$ 124,000$

Feb 148,000 155,000

Mar 177,000 186,000

Apr 265,000 279,000

May 295,000 309,000

Jun 322,000 338,000

Jul 201,000 217,000

Aug 162,000 172,000

Sep 192,000 201,000

Oct 412,000 433,000

Nov 339,000 356,000

Dec 309,000 325,000

Annual 2,941,000$ 3,095,000$

Estimates by: Sam Slick, Marketing

Page 267: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

267

Finally, Fred notes that he has commitments from upper management to carryout computer upgrades that will

require cash payments of $20,000 in July and $40,000 in August.

Figure 9-7 Wage and Salaries Forecast 2004.

As a parting comment Taylor suggests that you might as well assume that there would not be any change in inventories

over the coming year. Accounting flashes through your head again. Cost of goods sold is equal to net cost of purchases

plus changes in inventory. So you can assume that cost of goods sold is roughly equal to purchases.8

Sue Smythe, the CEO, has concerns about debt and cash strategy. At present the firm has no outstanding debt of any

consequence (the line of credit has been paid down to $0) and management is confident of a Closing Cash Balance of

$40,000 as of December 31, 2003.

However, Smythe is concerned that the continued variability in sales might result in the need to get a commitment from

investors to fund any temporary cash shortages with equity infusions throughout 2004. In her opinion the minimum

cash on hand needs to be $25,000. That is to say if the closing cash balance for January were $15,000 investors would

write cheques for the $10,000 shortfall. Naturally the firm does not deal in “nickels and dimes” so the cheques will be

written to the nearest thousand dollars. In short she is worried that the firm might begin to experience rising financing

needs in the face of a weak product mix.

She also hopes to use the cash flow to help her negotiate with the bank to ensure sufficient liquidity to implement her

plans to launch a new product line and further grow -Products sales. Thus it is imperative that the firm develop a

projected Pro-forma Receipts and Disbursements Cash Flow Statement for 2004.

9.1.2.2 Instructions

The Project consists of a hard-copy memo (a printed copy) and a completed Receipts and Disbursement Cash Flow

Statement model in Excel. Project instructions follow:

Memo (40% of the Project Grade)

8 The complicating factor here is “net” since net cost of purchases reflects purchasing costs including things like transportation costs,

allowances and discounts.

Month Estimate

Jan 35,000$

Feb 40,000

Mar 55,000

Apr 70,000

May 85,000

Jun 90,000

Jul 60,000

Aug 45,000

Sep 55,000

Oct 90,000

Nov 90,000

Dec 85,000

Annual 800,000$

Source: F. Taylor, Operations

Page 268: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

268 1. You are to form teams of 4 or 5 students from your Set.

2. You need to first read the -Products Background section and about Receipts and Disbursement Cash Flow

Statements before proceeding to Point 3 below.

3. Your team will submit a 3 page Memo, addressed to your Lecturer and Lab Instructor, which addresses the following

key points:

3.1. Page 1 Cover Letter: As a part of your cover letter, you need to be able to explain why Rick, the accountant,

could say: “We made a profit in the P/L Statement” while Sue, the CEO, announces: “We could be toast”.

3.2. Page 2:

3.2.1. List all the crucial inputs and outputs and key assumptions in the model (e.g., we assume cash sales

are 35% of monthly sales) – you could use a T-layout towards this end (e.g., Inputs in the upper left

quadrant of the page and Outputs in the lower right quadrant of the page).

3.2.2. Identify in the outputs section the major calculations to be carried out and use appropriate headings

(e.g., Cash Receipts). Do not make any calculations on this page.

3.3. Page 3: Calculate the January 2004 Closing Cash Balance using a layout similar to that shown in Figure 9-1.

Yours will have more line items (e.g., Cash Sales, Purchases) but no “Actual” columns of data. It would be a

very good idea to label your calculations using appropriate headings (e.g., Reconciliation of Cash Flow), under

each heading list appropriate line items (e.g., Cash Sales), show the formula that you would use to make the

calculation for a line item followed by the numerical calculation and result. You may use names in your

formulas (e.g., = Jan 04 Sales Forecast * % Cash Sales, if this was your formula for Cash Sales). You may not

submit a printout from Excel of formulas or calculations towards this end.

4. Use a proper Business Memo Cover Letter format with all team member names and Set in the From: salutation at

the top of the Cover Letter. In the body of the Cover Letter, provide an overview of the ensuing pages and an answer

to Point 3.1. above.

5. Use common sense.

6. Use precise and legible English where required.

7. Approach the Memo as a Manager, not a Bookkeeper; therefore, do not get bogged down looking for too much

detail (i.e., we are projecting the future not recording the past; hence, a Cash Sales calculation reported to the

nearest cent is unrealistic).

8. Your team’s memo is to be submitted to your Lecturer at the start of the appointed lecture (see you Course Outline

for details). It would be a very good idea if your Set Rep gathers the memo’s for his/her Set and hands them in to the

Lecturer – this is to avoid a “stampede” to the Lecturer’s podium.

Excel Model (60% of the Project Grade)

1. Points 1 and 2 of the above Memo section apply to Excel Model as well.

2. Your team will submit a completed Receipts and Disbursement Cash Flow Statement model in Excel.

3. Use the Excel workbook provided by your Lab Instructor – named “Beta Template”.

4. Read the information carefully and review the directions on the Instructions worksheet.

5. Fill out the required team information in the Assumptions worksheet.

6. Examine and read carefully the information contained in the Sales Data, Wages Other and Formats for Cash Flow

worksheets.

7. Take advantage of Excel’s ability to assign names (e.g., cell B13 on the Assumptions worksheet should be named

“Cash”) when constructing your formulae.

8. Add cell comments, documenting on the Sales Data worksheet, indicating who is responsible for the Sales forecast

(i.e., per the Background information provided).

Page 269: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

269 9. Add cell comments, documenting on the Assumptions worksheet, indicating who is responsible for the cash sales

assumption and the gross margin assumption (i.e., per the Background information provided).

10. The model should be formatted appropriately (e.g., cell B13 on the Assumptions worksheet should be formatted as

%, 0 decimals).

11. The Cash Flow worksheet should be set-up to print:

11.1. Centered horizontally, landscape, on one page (accept the default header and footer settings, specify left and

right margin widths of 0.25 inch or 6 mm).

11.2. No gridlines and row and column headings should appear on the page.

11.3. Add a custom footer showing:

11.3.1. The file name in the left section (add an appropriate label before the file name, e.g., File Name:).

11.3.2. The current date (i.e., today’s date) in the right section (add an appropriate label before the date, e.g.,

Date:).

11.4. A custom header, in the left section, showing: all team member names.

11.5. Use a 10 pt. Calibri font in all header and footer sections.

12. Spell check the whole document.

13. The model should be protected except for the Inputs cells in the Assumptions worksheet.

14. Additional marks will not be given for making a “prettier worksheet” – so do not waste your time doing this.

15. Your team’s workbook is to be submitted to your Lab Instructor at the start of the appointed lab (see you Course

Outline for details). Use the file naming convention provided in the Course Outline – failure to do so, will result in a

marks deduction as will files with a missing file extension, files that are 0 KB in size or are shortcuts to the workbook

file etc.

10 Term Project: Income, Balance Sheet and Cash Flow Statements

10.1 Overview – Statement of Changes In Financial Position The Alpha and Beta Products projects are based on a Receipts and Disbursements cash flow statement. Another

commonly used cash flow statement is found in an Annual Report and is officially known as the “Statement of Changes

in Financial Position” or a Cash Flow Statement, as we shall call it in this module.

An Annual Report also contains Income and Balance Sheet Statements. These two statements are used to construct the

Cash Flow Statement. The Cash Flow Statement in an Annual Report is calculated by adding up the Sources of Cash and

the Uses of Cash and netting them. The increase/decrease in cash flow leads to the increase/decrease in the Balance

Sheet Cash account.

Sources and uses of cash are calculated by taking Income Statement line items (e.g., Revenue, Expenses) and converting

them to a cash basis by adding/subtracting the related Balance Sheet account that has increased/decreased over the

year. Also, other sources/uses of cash are added/subtracted in the calculations (e.g., cash inflows from a bank loan, cash

outflows as a loan to an employee or cash outflows to purchase new equipment).

For example, if the Balance Sheet account Accounts Receivable increased over the year, then the increase is subtracted

from revenues to convert them to a cash basis. The idea here is that if receivables increase over the year, this portion of

revenues has not been collected as cash; therefore, if we subtract the increase in receivables, we are removing the non-

cash component from revenues and thus converting them to a cash basis. The converse is also true, where a decrease in

A/R is added to revenues to convert them to a cash basis (means we collected the decrease in receivables).

Page 270: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

270 Similarly, if the Balance Sheet account Accounts Payable (payables or A/P) increased over the year, then the increase is

subtracted from Expenses to convert them to a cash basis. The idea here is that if accounts payable increase over the

year this portion of expenses have not been paid in cash; therefore, if we subtract the increase in payables, we are

removing the non-cash component from expenses and thus converting them to a cash basis. A decrease in A/P is added

to expenses to convert them to a cash basis (means we paid the decrease in cash).

Since all three statements are interrelated – this makes for a complicated model. However, if we “stick to our guns” and

apply the Input Process Outputs What-If? Mind set and skills that learned thus far, we should not encounter too

many problems in creating this type of model.

Annual Reports are used widely in industry to report to shareholders and investors the status of a company after a year

of operations has transpired. The results of an Annual Report (or Quarterly Report) can trigger a host of outcomes such

as an increase in the share price of a firm if the results are favorable, the “dumping” of shares and a lowering of the

share price if the results are unfavorable etc. Also, many lenders/investors will insist that Pro-Forma Income, Balance

Sheet and Cash Flow Statements be included in a Business Plan for a new business start-up.

The ability to create this type of model in Excel is greatly valued by financial institutions, investors and is widely used

industry – precisely what the Omega and Pi Catering projects are about.

10.1.1 Omega and Pi Catering Models Background

The purpose of the project is as follows:

1. Permit you the opportunity to “pull together” most of what you have learned to date about modeling from

Module I and thus far in Module II.

2. Keep your modeling skills “up to snuff” since the last half of Module II deals with Data List (Table) manipulation

and reporting – the projects are typically assigned concurrent to lectures and lab exercises that deal with Data

Lists (Tables).

3. Create Pro-Forma Financials as would be used in an Annual Report. For more information about how these

reports are used, visit the SEC’s EDGAR web site and read about how to use EDGAR and 10-K (Annual Report)

and 10-Q (Quarterly Report) filings (e.g., peruse a Microsoft 10-Q for the Quarterly Period Ended September 30,

2007).

The Omega and Pi Catering models are comprised of pro-forma financial calculations, from a fictitious business plan

developed by a group of entrepreneurial students, for a campus pizza business in BC (a small business start-up). The

students will also become the investors. Their Minimum Acceptable Rate of Return (MARR) is 12%. The MARR is to be

used as the cost of capital.

The Omega and Pi Catering models project the following over a 3 year time span:

Income, Balance Sheet and Cash Flow Statements.

A simple Capital Budgeting model (ATNCF, NPV, IRR, MIRR and Payback Period)9.

Financial Performance Measures and Indicators (EBITDA, ROS, ROI, Debt/Equity Ratio, Current Ratio).

9 A simplifying assumption that has been made in the Omega or Pi Catering models is that depreciation is equal to the CCA. This

avoids the issue of reporting the offsetting difference in calculating net income on an accounting basis (using depreciation) or a tax basis (using CCA) on the Balance Sheet as Deferred Taxes.

Page 271: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

271

Break-Even units and revenue.

Loan Amortization and CCA for an equipment purchase.

The following scenarios were developed by the students to test the sensitivity of their business plan financials:

1. Operations baseline: normal economy (Most Likely Operations).

2. A recessionary economy (Pessimistic Operations).

3. High growth rate economy (Optimistic Operations).

4. Capital baseline: normal economy (Most Likely Capital),

5. High interest rates, low contributed capital and high long term debt (Pessimistic Capital).

6. Low interest rates, high contributed capital and low long term debt (Optimistic Capital).

Use the above scenario descriptions in the Scenario Manager Comments field (not including the bracketed text).

Before proceeding with the sections that follow and as a minimum, it is recommended that you review Section 0 about

scenarios, Section 4.5.13 about model documentation and data validation and Section 5.2.2 and its model about capital

budgeting, WACC, ATNCF and CCA.

The following is a list of 6 that you and your team will practice in the Omega and Pi Catering models:

1. Input formulae so that at an input change will change the Income Statement, Balance Sheet and Cash Flow

Statements and subsidiary calculations such as the CCA, Loan Amortization and Capital Budgeting tables.

2. Relate the Income Statement, Balance Sheet and Cash Flow Statements to each other.

3. Create formulae for specific performance measures (e.g., ROI, ROS, Break Even number of pizzas) that change

with each scenario, flag good or bad results and in a Comments column, recommend a course of action or draw

a conclusion (e.g., Debt/Equity ratio is within acceptable limits).

4. Ensure that Notes section of the Income Statement changes with the various scenarios.

5. Add and record all 6 model scenarios and create a Scenario Summary worksheet.

6. Protect the appropriate worksheets so that users may only make input changes where appropriate and ensure

that certain key user inputs fall within acceptable parameters.

Sections 10.1.1.3 to 10.1.7 provide instructions about how to address the above 6 challenges in your model.

The Omega Catering and Pi Catering “template” files provide financial statement numbers which represent the Most

Likely Operations scenario results – without any formulas. It would be a good idea to make a copy of the template file,

for which ever Project has been assigned, and use this to enter your formulas and scenarios. As you create your

formulas for the Most Likely Operations scenario, you will be able to determine if your results are correct by comparing

them to the template file (to compare the files side by side, use the New Window feature – if you have forgotten how to

do this read: Section 3.12.2 Freeze Panes, Split & New Window in Module I).

Once the model and performance measure formulas are calculating correctly and the Statements are properly related,

proceed to add the remaining information to the models (i.e., conditional formatting, comments, Income Statement

notes, data validation, worksheet protection).

Basic instructions:

1. You are to form teams of 4 or 5 students from your Set.

2. Fill out the required team information in the Student Set and Names worksheet.

Page 272: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

272

3. Rename the file as instructed per the worksheet in (2) above.

4. Take advantage of Excel’s ability to assign names when constructing your formulae.

5. Additional marks will not be given for making a “prettier workbook” – so do not waste your time doing this.

6. Your team’s workbook is to be submitted to your Lab Instructor at the start of the appointed lab (see your

Course Outline for details). Use the file naming convention provided in the Course Outline – failure to do so, will

result in a marks deduction as will files with a missing file extension, files that are 0 KB in size or are shortcuts to

the workbook file etc.

The following sections provide the scenario sensitivity variables for the Omega and Pi Catering models followed by

instructions about how to input formulae, relate statements etc.

10.1.1.1 Omega Catering Model

1. Open the file: Omega Catering Template (in the Project Files folder of the Module II Excel Lab Files).The inputs

for the scenarios are listed in Figure 10-1.

Figure 10-1: Omega Catering Scenario Inputs.

Sensitivity Variables

Most Likely

Operations

Optimistic

Operations

Pessimistic

Operations

Most Likely

Capital

Optimistic

Capital

Pessimistic

Capital

Days Receivables 1.1 approx. 0.5 15 1.1 approx. 1.1 approx. 1.1 approx.

Days Payable 8.1 approx. 30 5 8.1 approx. 8.1 approx. 8.1 approx.

Days Inventory 5.0 approx. 2 8 5.0 approx. 5.0 approx. 5.0 approx.

Unit Sa les Growth Rate 5.0% 7.5% 2.5% 5.0% 5.0% 5.0%

Deferred Revenue Growth Rate 5.0% 12.0% 2.5% 5.0% 5.0% 5.0%

Expenses Growth Rate 5.0% 4.0% 8.0% 5.0% 5.0% 5.0%

Bank Loan (10 yr Amort.) $4,000 $4,000 $4,000 $3,200 $2,000 $17,000

Bank Loan Interest Rate 8.0% 8.0% 8.0% 8.0% 5.0% 10.0%

Bank Depos it Account Rate 3.5% 3.5% 3.5% 3.5% 5.0% 2.5%

Contributed Capita l $2,400 $2,400 $2,400 $3,200 $4,000 $2,000

Equipment Purchases $6,000 $6,000 $6,000 $6,000 $4,000 $17,000

Income Tax Rate 16.5% 16.5% 16.5% 16.5% 16.5% 16.5%

MARR 12.0% 12.0% 12.0% 12.0% 12.0% 12.0%

Pizzas Sold/Day 26 40 15 26 26 26

Deferred Revenue Estimate $200 $200 $200 $200 $200 $200

Wages Estimate $24,000 $30,000 $15,000 $24,000 $24,000 $24,000

Rentals Estimate $10,800 $10,800 $10,800 $10,800 $10,800 $10,800

Uti l i ties Estimate $4,400 $6,000 $3,000 $4,400 $4,400 $4,400

G&A Estimate $2,000 $3,000 $1,500 $2,000 $2,000 $2,000

Employee Loan $1,000 $1,000 $1,000 $1,000 $1,000 $1,000

Average Pizza Sel l ing Price $10.15 $12.00 $9.00 $10.15 $10.15 $10.15

Average Ingredients Cost $4.89 $4.50 $5.00 $4.89 $4.89 $4.89

Sales Days per Year 365 365 365 365 365 365

EBITDA Multipl ier 10 10 10 10 10 10

Scenario Name

Page 273: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

273 10.1.1.2 Pi Catering Model

1. Open the file: Pi Catering Template (in the Project Files folder of the Module II Excel Lab Files).

The inputs for the scenarios are listed in Figure 10-2.

Figure 10-2: Pi Catering Scenario Inputs.

Sensitivity Variables

Most Likely

Operations

Optimistic

Operations

Pessimistic

Operations

Most Likely

Capital

Optimistic

Capital

Pessimistic

Capital

Days Receivables 1.1 approx. 0.5 15 1.1 approx. 1.1 approx. 1.1 approx.

Days Payable 8.1 approx. 30 5 8.1 approx. 8.1 approx. 8.1 approx.

Days Inventory 5.0 approx. 2 8 5.0 approx. 5.0 approx. 5.0 approx.

Unit Sa les Growth Rate 5.0% 10.0% 1.0% 5.0% 5.0% 5.0%

Deferred Revenue Growth Rate 5.0% 10.0% 1.0% 5.0% 5.0% 5.0%

Expenses Growth Rate 5.0% 5.0% 10.0% 5.0% 5.0% 5.0%

Bank Loan (10 yr Amort.) $4,000 $4,000 $4,000 $3,200 $1,000 $15,000

Bank Loan Interest Rate 8.0% 8.0% 8.0% 8.0% 6.0% 10.0%

Bank Depos it Account Rate 3.5% 3.5% 3.5% 3.5% 4.5% 2.5%

Contributed Capita l $2,400 $2,400 $2,400 $3,200 $6,000 $2,000

Equipment Purchases $6,000 $6,000 $6,000 $6,000 $4,000 $17,000

Income Tax Rate 16.5% 16.5% 16.5% 16.5% 16.5% 16.5%

MARR 12.0% 12.0% 12.0% 12.0% 12.0% 12.0%

Pizzas Sold/Day 26 30 22 26 26 26

Deferred Revenue Estimate $200 $200 $200 $200 $200 $200

Wages Estimate $24,000 $24,000 $24,000 $24,000 $24,000 $24,000

Rentals Estimate $10,800 $10,800 $10,800 $10,800 $10,800 $10,800

Uti l i ties Estimate $4,400 $4,400 $4,400 $4,400 $4,400 $4,400

G&A Estimate $2,000 $2,000 $2,000 $2,000 $2,000 $2,000

Employee Loan $1,000 $1,000 $1,000 $1,000 $1,000 $1,000

Average Pizza Sel l ing Price $10.15 $11.00 $9.00 $10.15 $10.15 $10.15

Average Ingredients Cost $4.89 $4.50 $5.00 $4.89 $4.89 $4.89

Sales Days per Year 365 365 365 365 365 365

EBITDA Multipl ier 10 10 10 10 10 10

Scenario Name

Page 274: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

274 10.1.1.3 Statement Formulae

The first challenge is to input formulae so that an input change will change the Income Statement, Balance Sheet and

Cash Flow Statements and subsidiary calculations such as the CCA, Loan Amortization and Capital Budgeting tables.

Here we are also concerned about making the inputs “manager friendly”. For example, managers always look to extend

days payables and decrease days receivables and days inventory as this increases cash flow. For example, rather than

making a monetary input for accounts receivables we would create a days receivables input instead, which is how a

manager would think to test the impact of such a change – this makes our inputs more relevant to a manager (e.g., a

Manager will want to see the impact of a decrease in “x” Days of Inventory on cash flow NOT a decrease of $5,254 in

Inventory).

This may be accomplished as follows (all examples refer to the Most Likely Operations Scenario):

1. The Days Receivables formula = Accounts Receivable ÷ (Revenue/365) can be rearranged so that: Accounts

Receivable = Days Receivables x (Revenue/365); therefore, the end of year Accounts Receivable number on the

balance sheet can be calculated using the latter equation that uses the Days Receivables input and the Revenue

number from the income statement. Note, that to avoid a key stroking error, one of the Inputs “Sales Days per

Year” = 365 is an input – use this in the denominator of the latter equation. The initial input of approximately

1.1 days will result in an Accounts Receivable number of $290 at the end of Year 1. You will have to determine a

method that results in an Accounts Receivable number of exactly $300 at the end of Year 1 (Hint: manual

iteration or manually “plugging” in a number for Days Receivables until you get very close to the $300 Accounts

Receivable number IS NOT the answer – there is a simpler, by far faster and more elegant method in Excel to do

this).

2. The Days Payables formula = Accounts Payable ÷ (Pretax Cash Expenses/365) can be rearranged so that:

Accounts Payable = Days Payables x (Pretax Cash Expenses/365); therefore, the end of year Accounts Payable

number on the balance sheet can be calculated using the latter equation that uses the Days Payable input and

the Pretax Cash Expenses number (a reasonable estimate of Pretax Cash Expenses is equal to the income

statement expenses except for depreciation and income tax). The initial input of approximately 8.1 days will

result in an Accounts Payable number of $1951 at the end of Year 1. You will have to determine a method that

results in an Accounts Payable number of exactly $1954 at the end of Year 1.

3. The Days Inventory formula = Inventory ÷ (Cost of Sales/365) can be rearranged so that: Inventory = Days

Inventory x (Cost of Sales/365); therefore, the end of year Inventory number on the balance sheet can be

calculated using the latter equation that uses the Days Inventory sensitivity variable and the Cost of Sales

number (in this case, equal to the income statement Total Expenses for ease of calculation purposes). The initial

input of approximately 5 days will result in an Inventory number of $1,254.88 at the end of Year 1. You will have

to determine a method that results in an Inventory number of exactly $1,255 at the end of Year 1.

4. The Revenue numbers on the income statement for Year 2 and Year 3 are calculated by multiplying the Year 1

baseline number by the Unit Sales Growth Rate input initially set equal to 5%. You will have to determine a

formula from the inputs provided to calculate the Year 1 baseline number (think unit sales per year and selling

price).

5. The Deferred Revenue numbers on the end of year balance sheets for Year 2 and Year 3 are calculated by

multiplying the baseline number of $200 (Year 1 Deferred Revenue Estimate input) by the Deferred Revenue

Growth Rate input initially set equal to 5%.

6. The Expenses numbers on the income statement for Year 2 and Year 3 (wages, rentals, utilities and general and

administrative expense or G&A for short) are calculated by multiplying their respective baseline number Year 1

inputs by the Expenses Growth Rate input, initially set equal to 5%. You will have to determine a formula from

Page 275: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

275

the inputs provided to calculate the Year 1 baseline number for the ingredients expense. Year 2 and Year 3

ingredients expense are calculated by multiplying the prior year number by the Expenses Growth Rate input

initially set equal to 5%.

7. The cash flow statement Year 1 Bank Loan number is equal to the Bank Loan (10 yr Amort.) input.

8. The Year 1 Interest number on the income statement and the Year 1 Accrued Interest number on the balance

sheet are equal to the Year 1 Interest as calculated in the Bank Loan Amortization Table (use an Excel function

to calculate the annual payment). The interest rate is equal to the Bank Loan Interest Rate input and the

amount borrowed is equal to the Bank Loan (10 yr Amort.) input. The amortization period is equal to a fixed 10

years. Subsequent year Interest and Accrued Interest numbers also come from this table (use an Excel function

to quickly “look up” these numbers).

9. The Long term debt number for the end of year balance sheets is equal to the Bank Loan Amortization Table

Balance EOP number (e.g., the 31-Dec balance sheet long term debt number = Year 1 Balance EOP number).

The Current portion of long term debt numbers on the cash flow statement are equal to the Bank Loan

Amortization Table Principle Repayment (e.g., the 31-Dec balance sheet current portion of long term debt

number = Year 1 Principle Repayment number).

10. Since the Bank Loan is a long term loan (i.e., > 1 year and ≤ 10 years), the interest payments are tax deductible.

This means the Bank Loan Amortization Table tax interest savings will have to be deducted from the income

statement Income tax expense. The Income tax expense = Net Income b/tax x Income Tax Rate input – tax

interest savings (use an Excel function to quickly “look up” the tax interest savings numbers).

11. There is an outstanding Year 1 balance sheet Notes Receivable of $1,000 in the form of a loan to one of the

student shareholders (equal to the Year 1 Employee Loan input). The student has undertaken in the Note to pay

this off by the end of Year 2. These two transactions appear in the Year 1 and Year 2 cash flow statement Loan

to employee line item, respectively. Normally, the loan repayment would be reported as a Source of Cash, but

to make things easier, we report the repayment as a negative use of cash.

12. The Cash and Contributed capital numbers in the start of Year 1 balance sheet are equal to the Contributed

Capital input.

13. The Equipment at cost number in the end of Year 1 balance sheet and the Acquisition of equipment number in

the Year 1 cash flow statement are equal to the Equipment Purchases input.

14. The students want to know the overall risk and return for each of the scenarios (see the following point about

this). To do this they will need to calculate an After-tax net cash flow, as noted in the income statement,

determine the investment and finally calculate NPV, IRR and MIRR. The After-tax net cash flow formula requires

that the Capital Cost Allowance (CCA) be calculated. Rather than using straight line depreciation, the students

plan to use the CCA for the equipment purchases in lieu. This is a good idea; otherwise, if straight line

depreciation were used this would create a balance sheet income tax liability (i.e., the difference between the

CCA, calculated using a double declining balance methodology, and straight line depreciation results in a

different income tax number being calculated: one for the Government and one for the owners – the difference

is reported as the balance sheet the income tax liability: Deferred Taxes). The income statement Depreciation

numbers are equal to the Equipment Capital Cost Allowance Table CCA (e.g., Year 1 Depreciation = Year 1 CCA).

The balance sheet Accumulated depreciation for Year 1 is equal to the Year 1 Equipment Capital Cost Allowance

Table CCA. Subsequent year Accumulated depreciation is equal to the prior year Accumulated depreciation plus

the current year CCA (e.g., Year 2 Accumulated Depreciation = Year 1 CCA + Year 2 CCA). The CCA rate for

purchased equipment is equal to a fixed 20%. Note than in Year 1, only half of the CCA may be deducted (called

the “Half Year Rule”). The Equipment First Cost is equal to the Equipment Purchases input.

15. As mentioned in the above point, the students wish to calculate the return and risk for their project for each

scenario. To do this, they have constructed a Capital Budgeting Table where the Discount Rate (or cost of

Page 276: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

276

capital) is equal to the MARR input and the Year 0 number (= the investment) is equal to the sum of the

Equipment First Cost (= Equipment Purchases input) and the Contributed Capital input (the bank loan is ignored

in the investment since the discount rate accounts for any financing charges). The Year 1 to 3 numbers are

equal to the After-tax net cash flow numbers from the income statement. The students calculate the “financial”

NPV and IRR numbers to determine the returns for the “project”. Also, since IRR assumes that the Year 2 and

Year 3 cash flows are reinvested at the same rate, the students will use the MIRR Excel function to calculate a

modified IRR where the Year 2 and Year 3 cash flows are discounted at the going reinvestment rate (= Bank

Deposit Account Rate input). The students believe that this represents a more realistic rate of return for the

project. The students have also wisely decided to calculate the Payback Period which is a measure of project

risk. Ensure any errors that occur in the IRR calculation return the label: N/A (you do not have to bold face the

label). If the Payback Period exceeds 3 years, ensure that the calculation returns the label: > 3 years (you do not

have to bold face the label).

16. Ensure that the Most Likely Operations scenario inputs (on the “Inputs Outputs” worksheet) result in the exact

same financial statement numbers as initially presented in the template files for Omega and Pi Catering.

10.1.2 Relating the Statements and Subsidiary Calculations

To properly relate the Income Statement and Balance Sheet statements to each other, you will have to rely on your first

semester accounting and finance course knowledge to do this. To calculate the Cash Flow Statement, you would do the

following:

1. Income statement Revenue reports sales for which cash has not been received (e.g., accounts receivable) and

must be adjusted to convert it to a cash basis. To adjust revenue to a cash basis, an increase in accounts

receivable over the period is deducted from revenue and a decrease is added.

2. Sales related cash inflows such as deferred revenue (e.g., advance payments, down payments) are also cash

adjustments to revenue. An increase in deferred revenue over a period is added to revenues and a decrease is

subtracted.

3. Income statement expense items report expenses, for which cash has not been disbursed (e.g., depreciation,

accounts payable) and must be adjusted to convert them to a cash basis. To adjust expenses to a cash basis, an

increase in inventories over a period is added to expenses and a decrease is subtracted; an increase in accounts

payable is subtracted and a decrease is added and an increase in accrued interest is subtracted and a decrease

is added. Depreciation represents a non-cash disbursement, so it is always subtracted to convert expenses to a

cash basis.

4. The next step is to determine the amount of cash that was generated from non-operating sources (i.e., “From

other sources”) for the business (e.g., bank loans, share issues). If a bank loan or a share issue resulted in cash

inflows to the business, they are added. If bank loans are paid out early (earlier than shown in a term loan

amortization schedule) or the company purchases shares from its shareholders, they are subtracted.

5. Uses of cash generally fall into two categories: loan items and capital spending items. In our example, a loan

was made to an employee, cash was used to pay down the bank loan for the period (Current portion of long

term debt) and equipment was purchased in the period. These would represent uses of cash.

6. Subtract the uses of cash from the sources of cash to obtain an increase or decrease in cash. This calculation is

equal to the amount that the balance sheet Cash account increased or decreased over the period (e.g., if the 1-

Jan Year 1 balance sheet had a cash balance of $2,400 and since the Year 1 cash flow statement shows a $3,088

increase in cash flow, this results in a 31-Dec Year 1 balance sheet cash balance of $5,488 = $2,400 + $3,088).

The balance sheet Retained Earnings line item is equal to the cumulative income statement Net Income (e.g., the 31-Dec

Year 1 Retained Earnings = 1-Jan Year 1 Retained Earnings + Year 1 income statement Net Income). If dividends are paid

Page 277: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

277 to shareholders (not the case in the Omega and Pi Catering models), they would be subtracted from Net Income and the

remaining amount would be added to Retained Earnings.

10.1.3 Performance Measurement Formulae

The performance measures (a.k.a. outputs or results) that the students selected are:

1. EBITDA Valuation (= earnings before interest, taxes, depreciation and amortization x multiplier). EBITDA is

often used to assess the market value of the firm (e.g., most manufacturing firms are worth 10 - 15 times their

EBITDA and during the “.com heydays” of the late 1990’s and early 2000’s, new IT start-ups were often worth

100 to 150 times their EBITDA; thus, accounting for their bloated stock values – they never generated the cash

flows investors were expecting; hence, why the “.com bubble burst”). Use the EBITDA Multiplier input in your

calculation for the “multiplier”.

2. Current Ratio = Current Assets/Current Liabilities.

3. Debt/Equity Ratio = Noncurrent Liabilities/Shareholders’ Equity.

4. ROI (Return on Investment) = [Net Income + Interest(1 – Tax Rate)]/[Noncurrent Liabilities + Shareholders’

Equity], in %.

5. ROS (Return on Sales) = Net Income/Revenue, in %.

6. Gross Margin = (Revenue – Materials – Labour – Overhead)/Revenue, in %.

7. Cash Flow Incr. (Decr.) = cash flow statement net increase/decrease in cash.

8. Break Even No. of Pizzas: refer to your Lab Exercises in Module I to calculate this (Hint: involves the use of fixed

cost, variable cost and selling price – see the Break-Even model).

9. Revenue = income statement revenue.

10. Break Even Revenue: once you have the Break Even No. of Pizzas number in (8) above, you can calculate this

number.

11. NPV, IRR, MIRR and Payback Period: taken from the Capital Budgeting Table calculations.

Calculate the above performance measures in the “Inputs Outputs” worksheet.

10.1.4 Outputs (Results) Conditional Formatting, Comments and Notes

In the Year 1 to Year 3 Results columns use the following Conditional Formatting:

1. If any of the results are negative (for the exception of ROS, IRR and the Payback Period), apply the Conditional

Format: Light Red Fill with Dark Red Text.

2. Conversely to (1) above, apply the Conditional Format (for the exception of ROS, IRR and the Payback Period):

Green Fill with Dark Green Text.

3. Debt/Equity Ratio: if any of the Year 1 to Year 3 percentages are > 0.7, apply the Conditional Format: Light Red

Fill with Dark Red Text.

4. ROI: if any of the Year 1 to Year 3 results are less than the MARR, apply the Conditional Format: Light Red Fill

with Dark Red Text.

5. ROS: if any of the Year 1 to Year 3 percentages are < 4%, apply the Conditional Format: Light Red Fill with Dark

Red Text. If the percentages are ≥ 4%, apply the Conditional Format: Green Fill with Dark Green Text. The Green

Fill color settings are: Red = 198, Green = 239 and Blue = 206 and the Dark Green Text color settings are: Red =

0, Green = 97 and Blue = 0.

6. Break Even No. of Pizzas: if any of the Year 1 to Year 3 values are < Number of Pizzas sold in the corresponding

year, apply the Conditional Format: Light Red Fill with Dark Red Text.

Page 278: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

278

7. Break Even Revenue: if any of the Year 1 to Year 3 percentages are < Revenue in the corresponding year, apply

the Conditional Format: Light Red Fill with Dark Red Text.

8. IRR: if any result returns the text: “N/A”, apply the Conditional Format: Light Red Fill with Dark Red Text. If any

result is less than the MARR, apply the Conditional Format: Light Red Fill with Dark Red Text. If the results do

not return the text: “N/A”, apply the Conditional Format: Green Fill with Dark Green Text – use the same fill and

font color settings as in (5) above.

9. MIRR: if any results is less than the MARR, apply the Conditional Format: Light Red Fill with Dark Red Text.

10. Payback Period: if any result return the text: “> 3 years”, apply the Conditional Format: Light Red Fill with Dark

Red Text. If the results do not return the text: “> 3 years”, apply the Conditional Format: Green Fill with Dark

Green Text – use the same fill and font color settings as in (5) above.

In the Comments column, return the following text (here you will make use of the IF, AND and OR functions and

Conditional Formatting):

1. EBITDA Valuation: if any of the Year 1 to Year 3 values are negative, return the text: “Negative values are N/A.”

otherwise return blank.

2. Current Ratio: if any of the Year 1 to Year 3 results are < 1, return the text: “Must be ≥ 1.0 to ensure enough

short-term liquidity.” or "Good short-term liquidity.".

3. Debt/Equity Ratio: if any of the Year 1 to Year 3 ratios are > 0.7, return the text: “Must be < than 70% or the

bank may call-in the loan!”; if any of the Year 1 to Year 3 ratios are negative, return the text: “Negative values

are N/A.” otherwise return the text: “Debt/Equity ratio is within acceptable limits.”.

4. ROI, IRR and MIRR: if any of the results are less than the MARR, return the text: “Must be greater than a MARR

of: ” then add to that the MARR value and finish with the text: “%.” otherwise return the label “An acceptable

rate of return.” For the IRR and the MIRR, add the additional criteria that if any of the Year 1 to Year 3 values

are negative, return the text: “Negative values are N/A.”.

5. ROS: if any of the Year 1 to Year 3 percentages are < 4%, return the text: “ROS must be ≥ 4%.” or “An

acceptable ROS ≥ 4%.”. If any of the Year 1 to Year 3 values are negative, return the text: “Negative values are

N/A.”.

6. Gross Margin: same as ROS except the trigger value is 5% and use “GM” instead of the text “Gross Margin” in

your formula.

7. Cash Flow Incr. (Decr.): if any of the Year 1 to Year 3 numbers are < 0, apply the Conditional Format: bold Red

Text and return the text: “DO NOT INVEST.” otherwise return blank.

8. Number of Pizzas sold: blank.

9. Break Even No. of Pizzas: if any of the Year 1 to Year 3 numbers are < Number of Pizzas sold, respectively in the

corresponding year, return the label: “This scenario is better than break-even.”, if any of the Year 1 to Year 3

values are negative, return the text: “Negative values are N/A.” otherwise return the text: “This scenario does

not break-even.”

10. Revenue: blank.

11. Break Even Revenue: if any of the Year 1 to Year 3 numbers are < Revenue in the corresponding year, return the

label: “This scenario is better than break-even.”, if any of the Year 1 to Year 3 values are negative, return the

text: “Negative values are N/A.” otherwise return the text: “This scenario does not break-even.”

12. NPV: same as Cash Flow Incr. (Decr.).

13. Payback Period: if any of the results are > 3 years, apply the Conditional Format: bold Red Text and return the

text: “DO NOT INVEST – HIGH RISK.” otherwise return “An acceptable Payback Period ≤ 3 years.”.

Page 279: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

279 The values contained in the Notes section of the Income Statement should update with each scenario change. Here you

will make use of the DOLLAR (see Excel Help about this function) and TEXT functions and Concatenate.

10.1.5 Scenarios

Create 6 scenarios, in the Inputs Outputs worksheet, using the sensitivity variables provided in the “Omega Catering

Model Instructions” or “Pi Catering Model Instructions” sections. Add a descriptive comment to each scenario. Ensure

that cell B1, in the Inputs Outputs worksheet, updates with the correct scenario title. Create a Scenario Summary

worksheet containing all 6 scenarios and ensure that the Changing Cells and Results Cells labels are “user friendly” to

interpret (e.g., “EBITDA Valuation” rather than its absolute cell reference). Use the Year 3 Results values for the Results

Cells. Wrap text to narrow the width of the Scenario Summary table and realign any cells where appropriate. When

finished, hide the “Current Values:” column and apply a Zoom Level of 90%.

10.1.6 Data Validation and Worksheet Protection

The last challenge in both models is to protect the appropriate worksheets so that users may only make input changes

and ensure that certain key user inputs fall within acceptable parameters.

1. Validate all numeric scenario inputs (non percentage inputs) so that they are ≥ 0 and if they are not, return a

Stop Style Error Alert with the Title: Input Error and the Error Message: “Please input a number greater than or

equal to 0.”

2. Validate all percentage scenario inputs, for the exception of the Income Tax Rate, so that they are ≥ 0% and if

they are not, return a Stop Style Error Alert with the Title: Input Error and the Error Message: “Please input a

percent greater than or equal to 0%.”

3. Validate the Income Tax Rate scenario variable input so that it must equal 16.5% and if not, return a Stop Style

Error Alert with the Title: Input Error and the Error Message: “The income tax rate should remain at a fixed rate

of 16.5% (combined Federal and Provincial Small Business Tax Rate, Taxable Income < $400,000).” Also, add the

Input Message with the title: Fixed Income Tax Rate and the Input Message: “The income tax rate should

remain at a fixed rate of 16.5% (combined Federal and Provincial Small Business Tax Rate, Taxable Income <

$400,000)”. For the curious, visit the CRA web page: Corporation Tax Rates for the Federal and Provincial Small

Business Tax Rates (as of September 2007).

4. Protect ALL of the worksheets for the exception of the sensitivity variable inputs (do not password protect the

worksheets – if you do so, you will receive a mark of 0% for the project).

10.1.7 Watch Window & Scenario Drop-Down List

There is a lot going on in the Omega and Pi Catering Models. As an alternative to using the New Window feature, use the

Watch Window to ensure that the Balance Sheet does indeed balance (i.e., Total Assets = Total Liabilities & Equities) as

you input formulas and change scenarios – this usually means you have created the correct formulas and relationships

between the three statements (see Figure 10-3). To quickly change between scenarios, add the Scenario drop-down list

to the QAT (see Section 4.5.12.2 if you forgot how to do this).

Page 280: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

280 Figure 10-3 Watch Window monitoring the Balance Sheet line items: Total Assets and Total Liabilities & Equities for Years 1 to 3.

11 Advanced

This section provides you with some examples of advanced features in Excel 2007.

The files associated with this section (found in the Advanced folder of the Module II Excel Lab Files folder) are provided

for demonstration purposes only, in essence, the files are for you “to play with”.

It is not the purpose of this section to explain the theory behind the files or how the files were created – to do this would

take another textbook the size of Module II.

11.1 Arrays & Project Scheduling Creating a project schedule, with Early and Late Dates, can be done manually using the Critical Path Method (used in

Project Management theory), with scheduling software (like Microsoft Project) or by using Excel’s Solver feature which

requires tedious and time consuming inputs. The latter method is well described in any edition of Cliff T. Ragsdale’s

“Spreadsheet Modeling and Decision Analysis” textbook.

Interestingly Ragsdale has come up with a simpler method than using Excel Solver to calculate a project schedule. In a

paper entitled: “A New Approach to Implementing Project Networks in Spreadsheets”, INFORMS Transaction on

Education 3:3 (76-85), © INFORMS ISSN: 1532-0545, Ragsdale uses the Excel array feature to calculate a project

schedule in the “blink of an eye” and it is slick! See Figure 11-1.

Basically, he uses an array formula to calculate the Early Start Time and Late Finish Time and adds/subtracts the activity

duration to calculate the Early Finish Time and Late Start Time, respectively.

Page 281: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

281 For example, the Early Start Time uses the FIND function to find the Immediate Predecessor character location in the

Activity column (e.g., activity A, B and/or C translates to character location 1, 2, 3 and so forth). It returns FIND returns

the character location if a match is found or the #VALUE! error when it cannot find a match in the Activity column for

the Immediate Predecessor’s character location. Then the ISERROR function is used to return FALSE for every character

that is an Immediate Predecessor of the activity in question. Finally the IF function to returns the Expected Duration of

the Immediate Predecessor and the MAX function to return the largest duration if there is more than one Immediate

Predecessor. If there are no predecessors, the formula returns 0 – very clever indeed!

To view the file, open Arrays and Project Scheduling found in the Advanced folder of the Module II Excel Lab Files.

Instructions are provided.

Figure 11-1: Arrays & Project scheduling worksheet.

Page 282: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

282

11.2 Solver & Master Production Scheduling Operations Managers create a master production schedule before manufacturing products on the factory floor. They

face a variety of challenges in creating a Master Production Schedule (MPS). For example, they will have ending

inventory targets after the MPS has been executed, they will want to minimize the carrying cost of inventory, the cost of

labor and any overtime labor charges. The latter two costs are offset by hiring/training and firing costs.

A MPS may be optimized and calculated using Excel’s Solver feature. Solver performs linear optimization by trying to

minimize, maximize or set equal to 0 an objective function (basically, the equation with all the costs or revenues in it)

subject to constraints (e.g., certain values have to be whole numbers, some values must be > 0, the maximum number of

resources available). Figure 11-2 presents an MPS that will be used to manufacture baseball and hockey gloves over a

period of 9 months. The objective is to minimize the overall cost of production. In the sample file, Solver has been set to

calculate no longer than 30 seconds. The $386, 416.16 total cost takes a while to calculate – if you have an older PC, you

may have to set the calculation time to minutes instead of seconds to obtain the correct answer.

To view the file, open Solver & Master Production Scheduling found in the Advanced folder of the Module II Excel Lab

Files.

Figure 11-2: Master Production Schedule linear optimization using Solver.

Page 283: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

283

11.3 Monte Carlo Simulation & the Three Time Estimate Method In Project Management, the three time estimate method is used to calculate an expected time based on estimates of

activity durations for projects with significant risk. Monte Carlo simulations are used for modeling inputs in calculations

with significant risk. The two methods are compared to determine if duration estimates are normally distributed.

The three time estimate method is used primarily for R&D projects when there is little or no prior experience in doing

the R&D project tasks but activity durations must still be estimated for the R&D project. The three time estimate

method was pioneered on the Polaris Missile project in the 1950’s. The calculations involve selecting optimistic,

pessimistic and most likely durations from activity duration estimates and computing an expected time from these

values. The expected time is really the mean activity duration. A standard deviation can also be computed for the

activity or for the project as a whole. Using the mean and standard deviation, confidence interval durations are

calculated for the project (as can cumulative probability durations). See Figure 11-3.

The Monte Carlo simulation in the example uses seed values and VBA code (Visual Basic for Applications – see Figure

11-4 to view some of the code used in the sample file) to simulate an activity duration estimate (see Figure 11-5). The

three time estimate method worksheet (shown below) calculates a project mean duration, standard deviation and

confidence intervals for an R&D project consisting of 6 activities and their duration estimates (the Project 1 Details

worksheet).

Figure 11-3: Three time estimate method calculations worksheet.

Page 284: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

284 Figure 11-4: VBA code and windows for the Monte Carlo Simulation.

The Monte Carlo Simulation worksheet (shown below, the Simulation 1 Inputs worksheet) calculates the project mean

duration, standard deviation and confidence intervals for the project using a simulation technique based on generating

random numbers and seed values for the random number generation. The simulation technique “creates” activity

durations that are normally distributed, i.e., if the duration estimates were charted, they would have a bell shape. The

simulation can also create activity durations that based on the Bernoulli, Binomial, Poisson etc. distributions, i.e., if the

activity durations were charted, they would have the shape of the aforementioned distributions.

Command buttons appear on both worksheets that provide more in-depth instructions about the inputs and

calculations. To begin a simulation, input a whole number > 0 in cell H11 of the Simulation 1 Inputs worksheet, input the

number repetitions (the number of times the project is “repeated”) and then press the Start Simulation button. The VBA

code will then take over and calculate various durations for the R&D project Testing activity (for illustration purposes

only) and in the background the VBA code will calculate the simulated durations for all 6 activities. If you have an older

PC, keep the number of repetitions below 50 or so; otherwise, the simulation will take a while to complete its

calculations (i.e., it will “tie up” Excel while it is calculating).

The results of the simulation are recorded in the Number of Repetitions Performed section of the worksheet and

compared to the three time estimate method calculations.

Page 285: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

285 Since the three time estimate method uses the normal distribution to calculate confidence interval probabilities, the

simulated durations ought to be similar to the three time estimate durations – if they are not, then it is unlikely the data

is normally distributed and the three time estimate method calculations should be ignored and not used in practice. The

latter comment is the point of the whole exercise – and of course, the latter is a judgment call. In the absence of any

other technique to assess the three time estimate calculations, some output which can be assessed, is better than no

output.

To view the file, open Monte Carlo Simulation found in the Advanced folder of the Module II Excel Lab Files. Note, the

file contains macros, so you will have to enable macros before using the file – Excel will provide guidance on how to do

this if you encounter a message requiring you to first enable macros.

Figure 11-5: Monte Carlo Simulation worksheet.

Page 286: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

286

11.4 Business Analytics (OLAP) As was previously mentioned in the PivotTables & PivotCharts section, business analytics are widely used in e-Business

software solutions. At the core of business analytics are the PivotTable and PivotChart. Since Excel has these features

built-in, Excel ought to be able to conduct business analytics and it can (a.k.a. Online Analytical Processing or OLAP,

Business Intelligence or BI, data mining).

OLAP is a data mining technique that takes the ideas from Excel PivotTables one step further. OLAP not only allows you

to break down data by categories, which it calls dimensions, but it allows hierarchies within dimensions so you can “drill

down” to finer and finer levels of the dimensions. OLAP is one of the most conceptually simple but powerful data mining

methods available – why it is in widespread use in industry.

The process consists of Excel creating a connection to a database and then using a query, the required fields and their

data are imported into a PivotTable. The imported fields are stored in a cube file, which is usually a subset of the

database (i.e., only the fields we are interested in comparing and summarizing are imported). Before importing the fields

from the cube file into a PivotTable, the user defines data hierarchies within the dimensions.

Before examining the sample file, a little background about the database itself and how to reestablish the connection to

the cube file require discussion (when opening the sample file).

OLAP requires a database with one-to-many relationships arranged in what is called a star structure (really a database

consisting of tables that are related using a joining table):

Figure 11-6: Database star structure used in OLAP.

Page 287: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

287 The Access database relationships window above is from a database named Foodmart.mdb10 (the sample file PivotTable

is based on fields extracted from this database). The database is for a fictitious chain of supermarkets throughout North

America that keeps track of every sale for every product sold in each of its stores, for the years 1997 and 1998.

For each sale, it records information about:

the customer who purchased the product,

the product that was purchased,

the store where the product was purchased, and

the date of the purchase.

Each of these 4 items is a dimension. The database contains a table for each dimension. The tables are labeled:

Customers (10,281 records)

Products (1,560 records)

Stores (24 records)

Dates (1,096 records)

The Facts joining table has 251,395 records. It contains a record for each sale of each product at each store. Each record

in this table includes the revenue and the number of units sold for each sale.

Each product is a part of a product family: Food, Drink and Non-Consumable. Within each product family there are

product departments (e.g., Dairy, Checkout, Deli), product subcategories (e.g., cheese, milk, hot dogs, canned fruit),

brand names (e.g., Walrus Beer) followed by the individual product names (e.g., Walrus Light Beer); therefore, it can be

said the product table is hierarchical with a top level product family and a bottom level product name. Similar

hierarchies exist in the Customers, Dates and Stores tables.

To view the file, open OLAP found in the Advanced folder of the Module II Excel Lab Files. The Foodmart.mdb database

and Foodmart Sample Query.oqy (the query file) have been provided for reference purposes only. DO NOT tamper with

Foodmart Sample Cube.cub (the cube file); otherwise, the OLAP PivotTable will not function properly. It is best to first

save the Excel and cube files to your hard drive and in the same location.

With the OLAP file open, click on a plus and minus drill down indicator. You will now have to reestablish the

connection from Excel to the cube file. You will have to do this when you open the OLAP file, for the first time, and save

to your hard drive or any time you move the files to another location.

The reason for this is that the Excel files containing the OLAP PivotTable “hard codes” the file path of the cube file. When

the Excel file and its cube file are moved to another location (e.g., a different PC folder or network folder) the Excel file

will ask where the cube file is located.

As an aside, the cube file is called a “cube” because the PivotTable containing the data used to summarize and compare

is 2-dimensional. Couple this to the fact we can “drill down” into a dimensions hierarchy – the latter constitutes the 3rd

dimension. This is why the term “cube” is used which implies the data is a 3 dimensional object.

10 “Data Analysis for Managers”, 2

nd Edition, Data Mining Techniques: Discriminant Analysis, Logistic Regression, and OLAP, p. 848 by

S. Christian Albright, Wayne L. Winston and Christopher Zappe.

Page 288: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

288

Page 289: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

289 The following paragraphs describe how to reestablish the connection between the Excel file and its cube file.

1. After activating the PivotTable, as described above, Excel will open a security warning dialog box:

Figure 11-7: Security warning.

2. Click OK.

3. Next, Excel will ask you to input the location of the cube file:

Figure 11-8: Cube connection dialog box.

4. Click on the … button to the right of the File input field, navigate to where you have the saved the cube file, click

on the file to select it and click OK.

5. Click the Next button and follow the directions.

After the connection to the cube file has been reestablished, the PivotTable should appear as follows:.

Page 290: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

290 Figure 11-9: OLAP PivotTable.

To drill down, just click on any plus indicator. To collapse a field that has been drilled down, double click the field above

it (e.g., if you click on the Drink plus indicator and then on the Alcoholic Beverages plus indicator, you can collapse this

hierarchy by double clicking on the Drink label or on its minus indicator). Continually clicking on the plus indicator for a

dimension is the process of “drilling down”.

To compare different fields, drag and drop them to the OLAP PivotTable report areas.

The following are some questions you can use to purposely “play” with the OLAP PivotTable:

1. What was the food revenue from Vancouver stores in the 3rd quarter of 1998?

2. What was the Walrus Light Beer revenue from Yucatan stores in the 1st quarter of 1998?

3. Add the Gender and Houseowner dimensions to the PivotTable Filter area. Add the Sum of Units Sold to the

Values area of the PivotTable. What were the total 1997 wine revenues and units sold from US stores for male

homeowners and what was the average unit price of the wine? What was the average unit price of the wine in

1998 (for US stores and male homeowners)? What was the average unit price percent increase or decrease in

1998 vs. 1997?

4. On March 3rd, 1997, what was the revenue from stores in San Diego for Toretti sunglasses purchased by

females that were not homeowners?

5. Create a line PivotChart that shows the wine and beer revenues (one line for each) for all 4 quarters in 1997

and 1998 from stores in the US for all genders, regardless of homeownership status.

6. Create a line PivotChart that shows the 1998 revenues, by quarter, for Health and Hygiene: Cold Remedies, Pain

Killers and Decongestant products purchased from Victoria stores regardless of gender or home ownership

status. Is their a relationship between any of the items and if so, any ideas why there is a relationship (e.g., try

to explain the seasonality of the sales vs. some event you may be aware of that occurs in that quarter)?

The Answers are provided in the Answers worksheet.

Page 291: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

291

11.5 Data Tables vs. Mixed References

To view the file, open Data Table found in the Advanced folder of the Module II Excel Lab Files.

Firstly, a data table IS NOT the same as a Table used with data lists. A data table is a What-If? tool that shows how

changing certain values in your formulas affects the results of the formulas. You can create one input or two input data

tables, depending on the number of inputs that you want to test. Data tables are an alternative to using the more

problematic mixed references to calculate data in a table (i.e., no knowledge about mixed references is required to

calculate a table of data as long as there are only one or two inputs that will change).

For example, use a one input data table if you want to see how different interest rates affect a monthly mortgage

payment. A two input data table can show how different interest rates and loan terms will affect the mortgage payment.

Figure 11-10: One and two input data tables for a monthly mortgage calculation.

Set-up is important for the data table feature to work. In a single input data table, the formulas or references to cells

that contain formulas are arranged horizontally and above the data table (cells F13:H13). The single inputs you want the

data table to calculate are arranged vertically and to the left of the data table (cells E14:E22). In Figure 11-10, the single

input that will be changed in the data table calculations is the Interest Rate (the column E values). To create the one

input data table, select the data table range, select Data Table from the What-If Analysis drop-down menu and input the

cell reference that will change in the Data Table dialog box:

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

A B C D E F G H I J K L M N O P Q R S T U V

Interest Rate 9.50%Term, years 10Prinicipal $80,000

Payment $1,035Total Payments $124,222Total Interest $44,222

Outputs Payment Total Payments Total InterestInputs $1,035 $124,222 $44,222 $1,035 5 6 7 8 9 10 11 12 13 14 15

8.00% 971 116,474 36,474 8.00% $1,622 $1,403 $1,247 $1,131 $1,041 $971 $913 $866 $826 $793 $7658.25% 981 117,747 37,747 8.25% 1,632 1,412 1,257 1,141 1,052 981 924 877 838 804 7768.50% 992 119,026 39,026 8.50% 1,641 1,422 1,267 1,151 1,062 992 935 888 849 816 7888.75% 1,003 120,314 40,314 8.75% 1,651 1,432 1,277 1,162 1,073 1,003 946 899 860 828 8009.00% 1,013 121,609 41,609 9.00% 1,661 1,442 1,287 1,172 1,083 1,013 957 910 872 839 8119.25% 1,024 122,911 42,911 9.25% 1,670 1,452 1,297 1,182 1,094 1,024 968 922 883 851 8239.50% 1,035 124,222 44,222 9.50% 1,680 1,462 1,308 1,193 1,105 1,035 979 933 895 863 8359.75% 1,046 125,539 45,539 9.75% 1,690 1,472 1,318 1,203 1,115 1,046 990 945 907 875 847

10.00% 1,057 126,865 46,865 10.00% 1,700 1,482 1,328 1,214 1,126 1,057 1,002 956 918 887 860

Two Input Data Table

Inte

rest

Rat

e

Inte

rest

Rat

e

Term, years

Inputs

Outputs

One Input Data Table

Page 292: Excel 2007 Module II - SFU.ca - Simon Fraser Universitywainwrig/mpp/Pivot_table/Pivot-Tables... ·  · 2009-12-0210.1.3 Performance Measurement Formulae ... 10.1.7 Watch Window &

292 Figure 11-11: One input data table.

Excel will then automatically calculate the data table values (cells F14:H22 as shown in Figure 11-11).

In a two input data table, the formula or reference to a cell that contains a formula, is arranged in the top left corner of

the data table (cell K13) – this is what the data table will calculate (the payment as show in Figure 11-12). The first input

that will change the data table calculations is arranged horizontally and above the data table (cells L13:V13) – the first

input is the Term. The second input that will change the data table calculations is arranged vertically and to the left of

the data table (cells K14:K22) – the second input is the Interest Rate. To create the two input data table, select the data

table range, select Data Table from the What-If Analysis drop-down menu and input the cell references that will change

in the Data Table dialog box:

Figure 11-12: Two input data table.

Excel will then automatically calculate the data table values (cells L14:V22 as shown in Figure 11-12).