Date post: | 27-Dec-2015 |
Category: |
Documents |
Upload: | hortense-flynn |
View: | 217 times |
Download: | 0 times |
5 - 15 - 1
Chapter 5: Spreadsheet Engineering
The Art of Modeling with Spreadsheets
S.G. Powell and K.R. Baker
© John Wiley and Sons, Inc.
PowerPoint Slides Prepared By:Tava Olsen Washington University in St. Louis
5 - 2
Spreadsheet Engineering
Builders use blueprints or plans Without plans structures will fail to be effective
Advanced planning in any sort of design can speed up implementation
Spreadsheets are no different from other arenas of design Engineering and advanced planning aids
effectiveness
5 - 3
Spreadsheet Design
An efficient process minimizes time spent An effective process yields results that meet
users’ requirements Good design helps analysts spend the
majority of their effort improving decisions, rather than building and fixing models
5 - 4
Spreadsheet Errors
Many, perhaps most, spreadsheets contain internal errors Errors multiply with use
A variety of empirical studies have been performed All show spreadsheet errors to be common Users are overconfident
5 - 5
The Phases of Spreadsheet Modeling
Designing Building Testing
5 - 6
Designing a Spreadsheet
Plan Modularize Start small Parameterize Design for use Keep it simple Design for communication Document important data and formulas
5 - 7
Plan
“Measure twice, cut once” Will decrease time spent correcting mistakes Turn computer off and think before beginning Begin with a sketch
Physical layout of major elements Rough indication of calculation flow
Anticipate model’s ultimate uses
5 - 8
Modularize
Group like items and separate unlike items Separate
Data Decision variables Outcome measures Detailed calculations
Influence diagrams aid with this design Formulas should generally reference cells above
and to the left
5 - 9
Start Small
Sketch full design but do not build all at once Isolate one module then build and test that
module Local mistakes much easier to detect than
when part of the global model
5 - 10
Parameterize
Place parameters in a single location away from calculations
Formulas should only contain cell references, not numerical values
Assists in: Identifying parameters Sensitivity anlysis Documentation
5 - 11
Design for Use
Anticipate who will use spreadsheet What type of questions will be asked?
Make it easy to change common parameters Make it easy to find key outputs
Group in one place Include graphs of outputs Record numerical values of base case outputs
5 - 12
Keep It Simple
Complex spreadsheets: Require more time and effort to build Are much more difficult to debug
Keep formulas short Decompose complex calculations into
intermediate steps
5 - 13
Design for Communication
Spreadsheets’ lives are often longer than expected
Use visual cues that reinforce model’s logic Use informative labels Use blank spaces Use outlines, color, bold fonts, as appropriate
Split windows can aid in viewing
5 - 14
Document Important Data and Formulas
Record source for important parametersExplain important formulasUse Cell Comments to describe cell
contentsConsider a separate module to list
assumptions
5 - 15
Cell Comments
Insert – Comment to add documentation to a cell Tools – Options – View gives different display
options Comment & indicator – permanently display comment Indicator – red triangle indicates comment, display when
cursor in cell None – neither comment nor indicator visible
5 - 16
Workbook Design
Use separate sheets to group similar kinds of information
Design workbooks for ease of navigation Protect workbooks from unwanted changes
during use
5 - 17
Use Separate Sheets to Group Similar Kinds of Information
Makes model easier for outsider to use Isolate technical details of model Bring assumptions and results to the fore Users should only interact with a few, easily
recognized, sheets
5 - 18
Design Workbooks for Ease of Navigation
Any form of structural help for users is beneficial
Use revealing names for individual sheets Double-click on name tab at bottom of
spreadsheet to edit name
5 - 19
Protect Workbooks From Unwanted Changes During Use
Lock cells not to be changed Use worksheet protection Use data validation
5 - 20
Locking Cells
To lock all cells Select entire worksheet Select Format – Cells – Protection and check the
box for locked To unlock variable cells
Select desired cells Select Format – Cells – Protection and uncheck
the box for locked
5 - 21
Protecting Worksheets
Tools – Protection – Protect Sheet At top of Protect Sheet window check box for
Protect worksheet If check only Select Unlocked Cells
User will be able to only select and modify unlocked cells
If check Select Locked and Unlocked Cells User will be able to select any cell but only modify
unlocked cells
5 - 22
Data Validation
Controls input values Highlight cells then click Data – Validation Three tabs
Settings: Restrict inputs (e.g., range of cell values)
Input Message: Create message when cursor on cell
Error Alert: Alert for invalid entry
5 - 23
Building a Spreadsheet
Follow a plan Build one module at a time Predict the outcome of each formula Copy and paste formulas carefully Use relative and absolute addressing to simplify
copying Use the Function Wizard to ensure correct syntax Use range names to make formulas easy to read Use dummy input data to make errors stand out
5 - 24
Copying and Pasting Formulas
Copying (rather than retyping) reduces the potential for typographical errors
Copying can also be a source of bugs e.g., wrong range copied
5 - 25
Relative and Absolute Addressing
Necessary for efficient copying An address such as B7 is relative
In cell A6, B7 represents one row down and one column to the right
If copied, new formula will refer to new cell that is one row down and one column to the right
An address such as $B$6 is absolute Cell will not change if formula is copied Use for parameter values
5 - 26
Function Wizard
The button fx brings up the function wizard
Contains a complete list of all Excel functions
Selecting a function will bring up a window showing needed inputs
Function value will be shown in window automatically
5 - 27
Range Names
Any cell or range of cells may be named Name or cell reference may be used in formulas
Names easier to debug and use Require extra work to enter and maintain Select Insert – Name – Define to assign a name Pull-down window at top left of spreadsheet
Shows all named cells for workbook Can be used to enter individual cell names
5 - 28
Testing a Spreadsheet
Check that numerical results look plausible Check that formulas are correct Test that model performance is plausible
5 - 29
Check That Numerical Results Look Plausible
Make rough estimates Check with a calculator Test extreme cases
5 - 30
Check That Formulas Are Correct
Check manually Display individual cell references Display all formulas Use the auditing tools Use error checking
5 - 31
Checking Formulas Manually
Visually audit formula each cell at a time Most effective when range names used Tends to be tedious
5 - 32
Displaying Individual Cell References
Press F2 or double-click on cell of interest Reveals formula with color-coded cell
references Stronger visual clues than manual checking
5 - 33
Display All Formulas
Hold down control key and press tilde key All formulas are displayed Makes for easier scanning Aids in detecting deviations from patterns Reverse by repeating Control – Tilde
5 - 34
Using the Auditing Tools
Identifies predecessors and successors of cells Select Tools – Auditing – Show Auditing Toolbar
to display auditing toolbar Trace Precedents
Colored arrows to predecessors
Trace Dependents Colored arrows to successors
5 - 35
Error Checking
Tab under Tools – Options Available in Excel 2002 and later versions Equivalent of grammar checking in word
processing Cells with possible errors are flagged with
colored triangle
5 - 36
Errors Checked Under Automatic Error Checking
Evaluates to error value Text date with 2 digit years Number stored as text Inconsistent formula in region Formula omits cells in region Unlocked cells containing formulas Formulas referring to empty cells
5 - 37
Test That Model Performance Is Plausible
Model should react in a plausible manner to a range of inputs
The user should be content with trends in output based on varying inputs
Sensitivity testing (Chapter 6) is an important tool to test plausibility
5 - 38
Summary
Spreadsheets deserve careful engineering Most spreadsheets contain errors Users are over confident about their models
Rules for spreadsheet modeling Designing a spreadsheet Designing a workbook Building a spreadsheet Testing a spreadsheet