McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., Table of Contents Chapter 3 (The Art of Modeling with Spreadsheets) The Everglade Golden Years Co. Cash Flow Problem (Section 3.1)3.2–3.3 The Process of Modeling with Spreadsheets (Section 3.2)3.3–3.11 Guidelines for Building “Good” Spreadsheet Models (Section 3.3)3.12–3.16 Debugging a Spreadsheet Model (Section 3.4)3.16–3.20
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., The Everglade Cash Flow Problem YearProjected Net Cash Flow (millions of dollars) 2003–8 2004–2 2005– – –
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., The Everglade Cash Flow Problem Their short-term cash flow requirements cannot be met without borrowing. A long-term (10 year) loan can be taken with an interest rate of 7% A series of short-term loans (1 year) can be taken with a projected interest rate of 10% Question: Which loan (or combination of loans) should be taken, and in what amounts, in order to maximize their cash-balance position after 10 years?
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., The Process of Modeling
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., Plan: Visualize Where You Want to Finish A common stumbling block in the modeling process occurs right at the beginning—”How do I get started?” At this point it can be useful to ask the question—”Where do I want to end up?” –What information do I need to provide in a report? –What should the “answer” look like? –What kinds of numbers need to be included in the recommendation? What information is needed in the Everglade Cash Flow problem?
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., Plan: Do Some Calculations by Hand Another common stumbling block arises when trying to enter a formula in one of the output cells. At this point, it can be useful to do some calculations by hand. –Just pick some numbers for the changing cells and determine what the results should be. Suppose Everglade takes out a $6 million long-term loan and then adds short- term loans of $2 million in 2003 and $5 million in –How much cash will they have left at the end of 2003? –How much cash will they have left at the end of 2004?
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., Plan: Sketch Out a Spreadsheet
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., Build: Start with a Small Version If the model is complicated, start with a small, readily manageable version of the model. First make sure you’ve got the logic of the model worked out correctly for the small version. Only then expand it to full size.
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., Test: Test the Small Version of the Model Test the small model thoroughly. Try values in the changing cells for which you know the answers (at least approximately). –Examples: All zeroes All ones Very large numbers Numbers for which you’ve done hand calculations Expand the model to full size (copying formulas to the later years). Test the large model in a similar way.
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., Analyze: Analyze the Model (Before Solver)
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., Analyze: Analyze the Model (After Solver)
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., Guidelines for Building “Good” Spreadsheet Models Enter the Data First –Any spreadsheet model is driven by the data –It is easier (and usually better) to build the model around the data Organize and Clearly Identify the Data –Relevant data should be grouped (e.g. in tabular form) –All data should be labeled –Units should be identified Enter Each Piece of Data into One Cell Only –Refer to the original data as needed –This makes the model much easier to modify (only need to change data in one place)
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., Guidelines for Building “Good” Spreadsheet Models Separate Data from Formulas –Avoid putting numbers directly in formulas –Put numbers in data cells and refer to them as needed –This makes all data visible and easier to modify Keep It Simple –Avoid “power functions” of Excel if possible –Break out complicated formulas into subtotals Use Range Names –Refer to data cells and blocks of cells using Excel’s range name feature –Range names make formulas and the Solver model much easier to read –Care must be taken not to overuse range names and to make sure they remain correctly defined.
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., Guidelines for Building “Good” Spreadsheet Models Use Relative and Absolute References to Simplify Copying Formulas –Whenever multiple related formulas will be needed, try to enter the formula just once, and then use Excel’s fill commands to replicate the formula. –This makes the model easer to build and also reduces typos. Use Borders, Shading, and Colors to Distinguish Cell Types –For example: Data cells in blue (no border) Changing cells in yellow (regular border) Target cell in orange (heavy border) Show Entire Model on Spreadsheet –All data should be visible. –All constraints should be on the spreadsheet (not buried in Solver), preferably in three consecutive cells.
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., Three Tests for a “Good” Spreadsheet Model You should be able to immediately identify the data cells, changing cells, and target cell. All elements of the model should be visible on the spreadsheet (including all constraints). You should not have to look in the Solver dialogue box to figure out the model. Each equation should be simple enough that you can tell what the equation is in each output cell without looking.
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., A Poor Spreadsheet Model
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., Debugging a Spreadsheet Model: The Toggle Pressing control-~ toggles back-and-forth between showing values and showing formulas in the spreadsheet.
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., Debugging with the Auditing Toolbar The button third from the left can be used to trace the dependents of a cell, that is, those cells with formulas that refer to this cell. The leftmost button can be used to trace the precedents of a cell, that is, those cells that appear within the formula for this cell.
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., Dependents of the LT Loan Cell
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., Precedents of the ST Interest (2004) Cell