Chapter 5: Spreadsheet Engineering: The Art of Modeling With Spreadsheets
Chapter 5: Spreadsheet Engineering: The Art of Modeling With Spreadsheets
PowerPoint Slides Prepared By: Tava Olsen Washington University in St. Louis
5-1
5-1
Spreadsheet Engineering
Builders use blueprints or plans
Advanced planning in any sort of design can speed up implementation Spreadsheets are no different from other arenas of design
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-3
Spreadsheet Errors
Many, perhaps most, spreadsheets contain internal errors
5-5
Designing a Spreadsheet
Plan Modularize Start small Parameterize Design for use Keep it simple Design for communication Document important data and formulas
5-6
Plan
Measure twice, cut once Will decrease time spent correcting mistakes Turn computer off and think before beginning Begin with a sketch
5-7
Modularize
Group like items and separate unlike items Separate
Influence diagrams aid with this design Formulas should generally reference cells above and to the left
5-8
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-9
Parameterize
Place parameters in a single location away from calculations Formulas should only contain cell references, not numerical values Assists in:
Make it easy to change common parameters Make it easy to find key outputs
Keep It Simple
Complex spreadsheets:
Require more time and effort to build Are much more difficult to debug Decompose complex calculations into intermediate steps
5 - 12
Use informative labels Use blank spaces Use outlines, color, bold fonts, as appropriate
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 - 15
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 - 16
5 - 17
5 - 18
5 - 19
Locking Cells
To lock all cells
Select entire worksheet Select Format Cells Protection and check the box for locked Select desired cells Select Format Cells Protection and uncheck the box for locked
5 - 20
Protecting Worksheets
Tools Protection Protect Sheet At top of Protect Sheet window check box for Protect worksheet If check only Select Unlocked Cells
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 - 22
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 - 23
5 - 24
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 Cell will not change if formula is copied Use for parameter values
5 - 25
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 - 26
Range Names
Any cell or range of cells may be named Name or cell reference may be used in formulas
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 - 27
Testing a Spreadsheet
Check that numerical results look plausible Check that formulas are correct Test that model performance is plausible
5 - 28
5 - 29
5 - 30
5 - 31
5 - 32
5 - 33
Trace Dependents
5 - 34
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 - 35
5 - 37
Summary
Spreadsheets deserve careful engineering
Most spreadsheets contain errors Users are over confident about their models
5 - 38