Anda di halaman 1dari 35

DS 852: The Art of Modeling with Spreadsheets

How To Build Better Spreadsheets

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

Spreadsheet Design

An efficient process An effective process Good design helps analysts

Spreadsheet Errors

Many, perhaps most, spreadsheets contain internal errors

Errors multiply with use

A variety of empirical studies have been performed

The Phases of Spreadsheet Modeling

Designing
Building Testing

Designing a Spreadsheet

Plan Modularize Start small Parameterize

Design for use


Keep it simple Design for communication Document important data and formulas

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 models ultimate uses

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

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

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

Design for Use

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

Design for Communication

Spreadsheets lives are often longer than expected Use visual cues that reinforce models logic

Use informative labels Use blank spaces Use outlines, color, bold fonts, as appropriate

Split windows can aid in viewing

Document Important Stuff

Record source for important parameters Explain important formulas Use Cell Comments to describe cell contents Consider a separate module to list assumptions

Cell Comments

Insert Comment to add documentation to a cell

WORKBOOK DESIGN

Use separate sheets to group similar kinds of information Design workbooks for ease of navigation Protect workbooks from unwanted changes during use

Separate Sheets for Similar Kinds

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

Design 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

PROTECTION HELPS!!!

Lock cells not to be changed


Use worksheet protection Use data validation

Protecting Worksheets

Data Validation

BUILDING THE 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

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

Relative and Absolute Addressing

Necessary for efficient copying An address such as B7 is relative

An address such as $B$6 is absolute

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

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 Pull-down window at top left of spreadsheet

Shows all named cells for workbook Can be used to enter individual cell names

Testing a Spreadsheet

Check that numerical results look plausible Check that formulas are correct Test that model performance is plausible

Numerical Results Look Plausible?

Make rough estimates Check with a calculator Test extreme cases

Formulas Are Correct?

Check manually Display individual cell references Display all formulas Use the auditing tools Use error checking

Checking Formulas Manually

Visually audit formula each cell at a time Most effective when range names used Tends to be tedious

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

Display All Formulas

Hold down control key and All formulas are displayed

Makes for easier scanning


Aids in detecting deviations from patterns Reverse by repeating Control Tilde

Using the Auditing Tools


Identifies predecessors and successors of cells Trace Precedents

Colored arrows to predecessors Colored arrows to successors

Trace Dependents

Error Checking

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

Anda mungkin juga menyukai