Additional information, including supplemental material and rights and permission policies, is available at http://ite.pubs.informs.org. Vol. 10, No. 1, September 2009, pp. 18–33 issn 1532-0545 09 1001 0018 informs ® doi 10.1287/ited.1090.0027 © 2009 INFORMS I N F O R M S Transactions on Education A Spreadsheet Scenario Analysis Technique That Integrates with Optimization and Simulation Thomas A. Grossman School of Business and Professional Studies, University of San Francisco, San Francisco, California 94117, tagrossman@usfca.edu Özgür Özlük College of Business, San Francisco State University, San Francisco, California 94132, ozgur@sfsu.edu S cenario analysis is a widely used technique, and business students should be proficient in running scenarios through a spreadsheet model. We propose 10 desirable properties for a scenario analysis technique, and show that the Microsoft Excel Scenario Manager tool satisfies only one of them. We provide a tutorial for a better technique that can be programmed into an existing spreadsheet in a matter of minutes. We show how to integrate the technique with the Excel Solver to allow for rapid optimization of multiple scenarios and with the Crystal Ball add-in for Monte Carlo simulation to enable simulation of multiple scenarios. Our undergraduate and MBA students are able to learn the technique with little difficulty. Key words: spreadsheets; scenarios; scenario analysis; optimization; simulation History: Received: July 2008; accepted: January 2009. 1. Introduction analyst to compute key outputs by running multiple scenarios through his model. Ryan and Ryan (2002) report that 40% of the financial analysts surveyed almost always use scenario analysis for capital budgeting. Weisel (2004) presents scenario analysis in the context of managerial accounting. Other examples in the literature range from wood paneling manufacturers (Buehlmann et al. 2000) to medical scientists (Postma et al. 2001). Markham and Palocsay (2006) describe scenario analysis, give a brief overview of scenario analysis for problem solving that dates back to 1942, make the case for placing scenario analysis in the business school curriculum, and show how to use Excel’s builtin Scenario Manager tool. They point out that a shortcoming of the Scenario Manager tool is that it does not support stochastic analysis. Fortunately, it is easy for an analyst to program scenario analysis functionality in the spreadsheet. This paper presents in detail an effective approach for programming scenario analysis. We do not know when this approach was first devised, and we speculate that it has been independently discovered by many analysts. The earliest reference we can find is Tennent and Friend (2001), who sketch an approach in a section on “useful functions.” Powell and Baker (2007, pp. 128–129) briefly present an equivalent technique. Minor programming distinctions among these approaches are discussed in the appendix. Spreadsheets are ubiquitous in business (Ragsdale 2001) and are used for critical business purposes (Croll 2005, Grossman et al. 2007). They are one of the major tools for managers in the decision-making process (Coles and Rowley 1996) and play an important role in the practice of management science/operations research (MS/OR) (LeBlanc and Grossman 2008). Spreadsheets play a leading role in business school management science courses, and essentially all business school management science textbooks rely heavily on spreadsheets. Management science is concerned with advanced analytical techniques such as optimization and simulation. Prior to studying these advanced techniques, the student should have a foundation of basic techniques, including how to establish a base case and perform benchmarking (or change from base), sensitivity analysis, scenario analysis, and backsolving/goal seeking (Powell and Baker 2007, Grossman 2008). 1.1. Scenario Analysis This paper addresses “scenario analysis,” which is the systematic investigation of the impact of different sets of model inputs on key model outputs. A scenario is a set of predefined input values, usually with a descriptive name. In forward-looking planning models, each scenario can represent a coherent view of a possible future state. Scenario analysis is the process used by the 18 Grossman and Özlük: A Spreadsheet Scenario Analysis Technique with Optimization and Simulation Additional information, including supplemental material and rights and permission policies, is available at http://ite.pubs.informs.org. INFORMS Transactions on Education 10(1), pp. 18–33, © 2009 INFORMS 1.2. Contribution We propose a set of 10 desirable properties that can be used to evaluate a scenario analysis technique. We explain why the Excel Scenario Manager tool fails to satisfy most of these properties. We present a simple and quick programming technique for scenario analysis (the “Scenario Engine”) that satisfies all 10 desirable properties. Based on our experience of teaching the Scenario Engine to business students for many years, we provide a tutorial on how to program it into an existing model. Because it is a spreadsheet programming technique rather than an Excel tool, this approach is portable and can be used in any spreadsheet, including Excel, Google’s spreadsheet, and others. Unlike the Excel Scenario Manager tool, the Scenario Engine can be combined with optimization and Monte Carlo simulation. We show in §7 how to integrate scenario analysis with optimization using Solver. We show in §8 how to integrate scenario analysis with Monte Carlo simulation using Crystal Ball. We believe that the Scenario Engine technique will benefit business school students and should be taught in or prior to a business school management science course. The Scenario Engine technique is easy to learn and integrates nicely with traditional management science topics such as optimization and Monte Carlo simulation. 2. Desirable Properties of a Scenario Analysis Technique We propose 10 properties that can be used to evaluate a scenario analysis technique. Ideally, a scenario analysis technique would satisfy all of these properties. We group these properties into the following categories: spreadsheet engineering, analyst convenience, and management science. This list of criteria is likely not complete, but we believe it covers the most important issues. 2.1. Desirable Properties for Spreadsheet Engineering Spreadsheet engineering is the effective software engineering of a spreadsheet computer program (Grossman and Özlük 2004). From the perspective of spreadsheet engineering, a scenario analysis technique should be transparent, verifiable, and protected. A scenario analysis technique is transparent when the input values associated with each scenario are readily available for inspection. (Transparency for scenario analysis is a special case of a more general concept of providing visibility of model inputs and model logic.) Input values should not be buried in dialog boxes, VBA code, hidden cells, or hidden worksheets. A scenario technique that is transparent is less 19 likely to introduce errors due to faulty inputs in a scenario. A scenario analysis technique is verifiable when it is easy to check the outputs to confirm they are accurate. This is of critical importance to any audit process (such as an audit process that can be required for Sarbanes-Oxley compliance) or when transferring a spreadsheet to another analyst. To be verifiable, it must be possible to use cell formulas to trace output values back to their corresponding input values and inspect the intermediate cell formulas. A scenario analysis technique is protected when it is difficult to accidentally modify the scenario input values, for example, by overtyping them unintentionally. Values that reside in a spreadsheet can easily be protected through the use of Excel cell protection. This can also be accomplished by accessing scenario input values only through dialog boxes, VBA code, hidden cells, or hidden worksheets, although such approaches compromise transparency. 2.2. Desirable Properties for Analyst Convenience An analyst is more likely to employ and use properly a tool that is convenient. From the perspective of analyst convenience, a scenario analysis technique should be dynamic, flexible, and efficient. A scenario analysis technique is dynamic (or “live”; see Wagner and Keisler 2006) when the outputs automatically update when the model changes (e.g., a cell formula is modified) or an input not in the scenarios is changed (e.g., the scenarios contain only data, and the analyst modifies a decision variable). If the scenario analysis technique is “static” rather than dynamic, then the scenario outputs become incorrect after even a minor change, and the analyst must routinely perform extra work to rerun the scenario analysis. A scenario analysis technique is flexible when it is easy to modify the scenario input values. In practice, the input values used in scenarios can be negotiable and subject to change and adjustment throughout the analytical process. Such changes should be easy to implement and are facilitated by having scenario input values readily accessible in the spreadsheet and by allowing the use of cell formulas in the input values. A scenario analysis technique is efficient when an analyst can use it quickly once the managerial work of defining the scenarios has been completed. Because the input values for the scenarios are likely to be in the rows of a spreadsheet, a scenario analysis technique that directly acts upon data in the spreadsheet is advantageous. 2.3. Desirable Properties for Management Science From the perspective of management science, a scenario analysis technique should be optimization ready, Additional information, including supplemental material and rights and permission policies, is available at http://ite.pubs.informs.org. 20 Grossman and Özlük: A Spreadsheet Scenario Analysis Technique with Optimization and Simulation INFORMS Transactions on Education 10(1), pp. 18–33, © 2009 INFORMS stochastic ready, and scalable, and it should use standard terminology. A scenario analysis technique is optimization ready when it can easily be combined with optimization. A scenario analysis technique is stochastic ready when it can easily be combined with Monte Carlo simulation. Markham and Palocsay (2006) raise this as a desirable property in the context of the Excel Scenario Manager tool, which does not allow for stochastic analysis. A scenario analysis technique is scalable when there is no fixed upper bound on the number of inputs for each scenario or on the number of scenarios. A scenario analysis technique uses standard MS/OR terminology. Markham and Palocsay (2006) raise this as a desirable property in the context of the Excel Scenario Manager tool, which uses the term “changing cell” in a nonstandard way. 3. Excel’s Scenario Manager Rates Poorly Excel comes with a Scenario Manager tool that is described thoroughly in Markham and Palocsay (2006). Unfortunately, this tool rates poorly in terms of the 10 desirable scenario analysis properties, satisfying only the property of being protected. The Excel Scenario Manager tool is not transparent because the input values are buried in dialog boxes and are not readily accessible. (This concern was raised by Markham and Palocsay 2006.) It is not verifiable because the output values are numbers rather than formulas in a spreadsheet, so it is impossible to determine their origin after running the Scenario Manager tool. It is impossible to know whether the values have been manually overwritten. It is protected because the scenario input values are stored in a dialog box, and it is difficult to accidentally overwrite them. The Excel Scenario Manager tool is not dynamic because the outputs are static and do not contain any formulas. The Scenario Manager must be rerun whenever a cell formula is changed or an input not in the scenario list is changed. It is not flexible because it is cumbersome to modify input values across scenarios as each scenario is buried in its own dialog box. Markham and Palocsay (2006) point out that the inputs do not accept cell formulas, so if one input is to be changed across multiple scenarios, it requires tedious dialog box navigation. It is not efficient because once the scenario input values have been defined, each datum in each scenario must be manually entered into a dialog box. The Excel Scenario Manager tool is not optimization ready because it cannot be combined with Solver. As Markham and Palocsay (2006) point out, the Excel Scenario Manager tool is not stochastic ready because it does not support Monte Carlo simulation. It is not scalable because it supports only 32 inputs. Markham and Palocsay (2006) indicate that it does not use standard MS/OR terminology because of its unusual use of the term “changing cell.” Therefore, we conclude that Excel’s Scenario Manager has substantial shortcomings for serious analytical work. In §5, we present a better approach, called the Scenario Engine, but we first present an example model in §4. 4. Preliminaries: A Core Model and a List of Scenarios Before employing a scenario analysis technique, the analyst requires a “core model” and a list of scenarios. The core model is a spreadsheet computer program that implements a mathematical model that is relevant to the business situation being considered. The core model should be accurate and meaningful. This core model should be designed so that the inputs are clearly defined and documented. In this paper, we present models where all of the inputs are contained in a single module, but this is not a requirement. Our core model was used by Markham and Palocsay (2006) and is from the direct mail example in Chapter 2 in Winston and Albright (2001). A company plans to print a catalog and mail it to customers who might order by using a reply envelope. The base case data are as follows. The fixed cost to print (the setup cost) is $20,000, with a printing cost of $0.10 per catalog and mailing cost of $0.15 per catalog. The company incurs a $0.20 cost for each reply envelope that is returned by a customer. The average size of a customer order is $40, and the company’s variable cost per order averages around 80% of the order’s value. The company plans to mail 100,000 catalogs, and they expect a response rate of 8%. Figure 1 presents a spreadsheet model for the direct mail example, with cell formulas in Figure 2. The original model consists of the INPUTS module and the MODEL module. The INPUTS module contains all the numeric values required by the model. The MODEL module contains the cell formulas needed to compute key outputs, which are net profit (Cell F16) and breakeven response rate (Cell F20). The list of scenarios is a well-organized set of scenarios, where each scenario is a set of input values with a descriptive name, and the data for all scenarios are arranged in a consistent manner. Markham and Palocsay (2006) consider three scenarios. To better illustrate the purpose of scenario analysis, we use six scenarios. Grossman and Özlük: A Spreadsheet Scenario Analysis Technique with Optimization and Simulation 21 Additional information, including supplemental material and rights and permission policies, is available at http://ite.pubs.informs.org. INFORMS Transactions on Education 10(1), pp. 18–33, © 2009 INFORMS Figure 1 The Core Model and Scenario List for the Direct Mail Example A B C 1 CORE MODEL FOR DIRECTMAIL CAMPAIGN 2 3 4 5 6 7 INPUTS 8 9 Mailing inputs 10 Fixed cost to print 11 $ 20,000.00 Var. cost for printing $ 12 0.10 Var. cost for mailing $ 13 0.15 # of catalogs mailed 14 100,000 15 Order inputs 16 17 Average order $ 40.00 18 Var. % cost of order 80% 19 Var. envelope cost $ 0.20 Response rate 20 8% 21 22 23 24 25 Fixed cost to print 26 Cell C11 27 28 1 Current 29 2 Optimistic SCENARIO 30 3 Pessimistic LIST 31 4 High Average Order 32 5 Very High Response 33 6 Very Low Response 34 D E F G MODEL Model of responses # of responses Model of profit Total revenue Costs Fixed costs Var. mailing costs Var. order costs Total cost 8,000 $ 320,000.00 $ $ $ $ 20,000.00 25,000.00 257,600.00 302,600.00 NET PROFIT $ 17,400.00 Breakeven (BE) Model BE point BE response rate $ $ $ $ $ $ Average order Cell C17 20,000.00 18,000.00 22,000.00 20,000.00 20,000.00 20,000.00 Var % cost of order Cell C18 $ 40.00 $ 45.00 $ 35.00 $ 65.00 $ 40.00 $ 40.00 5,769.20 5.77% Response rate Cell C20 80% 75% 85% 80% 80% 80% 8% 9% 7% 8% 15% 4% Notes. The core model is in the INPUTS and MODEL modules. The scenarios are in Rows 28–33, with documentation in Rows 26 and 27. Figure 2 Cell Formulas for the Direct Mail Spreadsheet Model A B 1 2 3 4 5 6 7 8 INPUTS 9 Mailing inputs 10 11 Fixed cost to print 12 Var. cost for printing 13 Var. cost for mailing 14 # of catalogs mailed 15 Order inputs 16 17 Average order 18 Var. % cost of order 19 Var. envelope cost 20 Response rate 21 22 23 24 25 26 27 28 1 29 2 30 SCENARIO 3 LIST 31 4 32 5 33 6 34 C D E F G MODEL Model of responses # of responses Model of profit Total revenue Costs Fixed costs Var. mailing costs Var. order costs Total cost 20,000 0.1 0.15 100,000 =C20*C14 =F6*C17 =C11 =(C12+C13)*C14 =(C19+C18*C17)*F6 =SUM(F11:F13) NET PROFIT =F9-F14 40 0.8 0.2 0.08 Fixed cost to print Cell C11 Current Optimistic Pessimistic High Average Order Very High Response Very Low Response Breakeven (BE) Model BE point =(F11+F12)/(C17-C18*C17-C19) BE response rate =F19/C14 Average order Cell C17 20,000 18,000 22,000 20,000 20,000 20,000 Var % cost of order Cell C18 40 45 35 65 40 40 Response rate Cell C20 0.80 0.75 0.85 0.80 0.80 0.80 0.08 0.09 0.07 0.08 0.15 0.04 Additional information, including supplemental material and rights and permission policies, is available at http://ite.pubs.informs.org. 22 Grossman and Özlük: A Spreadsheet Scenario Analysis Technique with Optimization and Simulation INFORMS Transactions on Education 10(1), pp. 18–33, © 2009 INFORMS • The “Current” scenario uses the base case data. • In the “Optimistic” scenario, the average order is $45; the fixed cost to print is $18,000; the variable order cost percentage is 75%; the response rate is 9%; whereas other inputs are at base. • In the “Pessimistic” scenario, the average order is $35; the fixed cost to print is $22,000; the variable order cost percentage is 85%; the response rate is 7%; and other inputs are at base. • The “High Average Order” scenario is the same as the Current scenario, except that the average order size is $65. • The “Very High Response” scenario is the same as the Current scenario, except that the response rate is 15%. • The “Very Low Response” scenario is the same as the Current scenario, except that the response rate is 4%. The scenarios are in the SCENARIO LIST module in Figure 1. Rows 26 and 27 contain documentation. Each scenario row contains information for one scenario, including the scenario number (Cells B28:B33), scenario name (Cells C28:C33), and a value for each input (Cells D28:G33). Scenario numbers are sequential starting from 1. By convention, we use scenario number 1 (Row 28) for the base case. Any number of scenarios is possible; for illustration we use only six. 5. The Scenario Engine Technique for Scenario Analysis Scenario analysis begins with a list of scenarios that need to be run through the core model. The Scenario Engine is programmed in three steps. First, we select a scenario (§5.1) by writing the scenario number associated with the selected scenario in Cell B4. Second, we create an IN USE module and write cell formulas in Row 26 to display the input values for the selected scenario (§5.2). Third, we “echo” the values from the IN USE module to the INPUTS module by replacing appropriate input values in the INPUTS modules with cell references (§5.3). The existing core model logic then “sees” the input values for the selected scenarios, and the spreadsheet automatically computes the key outputs. 5.1. Step 1: Select a Scenario We type into Cell B4 the scenario number of the scenario we want to evaluate (Figure 3). The Scenario Engine takes it from there, obtaining the appropriate input values from the list of scenarios (§5.3) and feeding them to the core model (§5.4). 5.2. Step 2: Display the Input Values for the Selected Scenario For convenience, we have (Figure 3) Cell B26 echo the scenario number in Cell B4, using the cell formula Cell B26: = B4. We now need to program Cells C26:G26 to display the input values from the scenario list that correspond to the scenario number in Cell B26. For example, Cell D26 will display the “Fixed cost to print” for the selected scenario. We use the INDEX function, Cell D26: = INDEX(D28:D33,$B$26) (Figure 4). This use of INDEX instructs Excel to examine the range D28:D33 and return the value of the cell in the row specified in Cell B26. For example, when the scenario number in Cell B26 is 2, the INDEX function examines the column range D28:D33, finds the second row within the column range (Row 29), and returns from Cell D29 the value 18,000. We copy the formula in Cell D26 to Cells C26:G26. (To facilitate this copy operation, Cell B26 is programmed in the INDEX function using an absolute reference of $B$26.) Note that the scenario number in Cells B28:B33 is a memory aid and is not directly referenced by the INDEX function. 5.3. Step 3: Send the Input Values to the Core Model To complete the Scenario Engine, we need the core model to “see” the input values from the selected scenario. In each core model input cell that appears in the scenario list, we write a cell formula that echoes (points to) the displayed scenario input value. For example, the core model input “Fixed cost to print” (Cell C11) is programmed to refer to the sales rep cost value in Cell D25 (Figure 4), Cell C11: = D26. Similar changes are made for the other inputs. The input “Average order” in Cell C17 is changed to refer to the value in Cell E25; Cell C17: = E26. For the other two scenario inputs, we enter similar formulas; Cell C18: = F26, and Cell C20: = G26. Typically, some core model inputs will not be included in the scenarios. The cells for these core model inputs are not modified when programming the Scenario Engine; they remain numeric values. This completes the programming of the Scenario Engine. To use the Scenario Engine, simply enter the selected scenario number into Cell B4, and the spreadsheet instantly computes the core model using the inputs from the selected scenario. 5.4. Step 4 (Optional): Improved Spreadsheet Engineering It is a wise spreadsheet engineering practice to separate data from formulas. For this reason, the INPUTS module contains only numeric data. However, the Scenario Engine approach places cell formulas into some data cells to “echo” the values of the selected scenario. Faculty who emphasize sound spreadsheet engineering may want to redesign the INPUTS module to Grossman and Özlük: A Spreadsheet Scenario Analysis Technique with Optimization and Simulation 23 Additional information, including supplemental material and rights and permission policies, is available at http://ite.pubs.informs.org. INFORMS Transactions on Education 10(1), pp. 18–33, © 2009 INFORMS Figure 3 The Scenario Engine Displaying Scenario 2 A B C 1 SCENARIO ANALYSIS FOR DIRECTMAIL CAMPAIGN 2 SCENARIO 3 SELECTED 4 2 5 6 7 8 INPUTS 9 Mailing inputs 10 11 Fixed cost to print $ 18,000.00 12 Var. cost for printing $ 0.10 13 Var. cost for mailing $ 0.15 14 100,000 # of catalogs mailed 15 Order inputs 16 17 Average order $ 45.00 18 Var. % cost of order 75% 19 Var. envelope cost $ 0.20 Response rate 20 9% 21 22 23 24 25 26 27 28 29 30 31 32 33 34 D E IN USE 1 2 3 4 5 6 SCENARIO LIST Current Optimistic Pessimistic High Average Order Very High Response Very Low Response G MODEL Model of responses # of responses Model of profit Total revenue Costs Fixed costs Var. mailing costs Var. order costs Total cost 9,000 $ 405,000.00 $ $ $ $ 18,000.00 25,000.00 305,550.00 348,550.00 NET PROFIT $ 56,450.00 Breakeven (BE) Model BE point BE response rate 3,891.40 3.89% Fixed cost to print Scenario number Scenario Name 2 Optimistic F Average order $ Cell C11 18,000.00 $ $ $ $ $ $ $ 20,000.00 18,000.00 22,000.00 20,000.00 20,000.00 20,000.00 Var % cost of order Response rate Cell C18 Cell C20 Cell C17 45.00 $ $ $ $ $ $ 40.00 45.00 35.00 65.00 40.00 40.00 75% 9% 80% 75% 85% 80% 80% 80% 8% 9% 7% 8% 15% 4% Notes. The Scenario Engine is controlled using Cell B4. The Scenario Engine is programmed in Cells C11, C17, C18, C20, and B26:G26. Cells F16 and F20 display the key outputs for Scenario 2. Figure 4 Cell Formulas for the Scenario Engine A B SCENARIO 2 3 SELECTED 4 2 5 6 7 8 INPUTS 9 10 Mailing inputs 11 Fixed cost to print 12 Var. cost for printing 13 Var. cost for mailing 14 # of catalogs mailed 15 16 Order inputs 17 Average order 18 Var. % cost of order 19 Var. envelope cost 20 Response rate 21 22 23 24 25 Scenario Number 26 IN USE =B4 27 28 1 29 2 30 SCENARIO 3 LIST 4 31 32 5 33 6 34 C D E F G MODEL Model of responses # of responses Model of profit Total revenue Costs Fixed costs Var. mailing costs Var. order costs Total cost =D26 0.1 0.15 100,000 =C20*C14 =F6*C17 =C11 =(C12+C13)*C14 =(C19+C18*C17)*F6 =SUM(F11:F13) NET PROFIT =F9-F14 =E26 =F26 0.2 =G26 Scenario Name =INDEX(C28:C 30, $B$26) Current Optimistic Pessimistic High Average Order Very High Response Very Low Response Breakeven (BE) Model BE point =(F11+F12)/(C17-C18*C17-C19) BE response rate =F19/C14 Fixed cost to print Average order Cell C11 Cell C17 =INDEX(D28:D30, $B$26) =INDEX(E28:E30, $B$26) 20,000 18,000 22,000 20,000 20,000 20,000 40 45 35 65 40 40 Notes. The programming required for the Scenario Engine is in Cells C11, C17, C18, C20, and B26:G26. Var % cost of order Cell C18 =INDEX(F28:F30, $B$26) Response rate Cell C20 =INDEX(G28:G30, $B$26) 0.80 0.75 0.85 0.80 0.80 0.80 0.08 0.09 0.07 0.08 0.15 0.04 Grossman and Özlük: A Spreadsheet Scenario Analysis Technique with Optimization and Simulation Additional information, including supplemental material and rights and permission policies, is available at http://ite.pubs.informs.org. 24 Figure 5 INFORMS Transactions on Education 10(1), pp. 18–33, © 2009 INFORMS The Direct Mail Spreadsheet Model (Redesigned) A B C 1 SCENARIO ANALYSIS FOR DIRECTMAIL CAMPAIGN 2 SCENARIO 3 SELECTED 4 2 5 6 7 8 FIXED INPUTS 9 Var. cost for printing $ 0.10 10 Var. cost for mailing $ 0.15 11 # of catalogs mailed 100,000 12 Var. envelope cost $ 0.20 13 14 15 16 INPUTS FROM SELECTED SCENARIO 17 Fixed cost to print $ 18,000.00 18 Average order $ 45.00 19 Var. % cost of order 75% 20 Response rate 9% 21 22 23 24 25 26 27 28 29 30 31 32 33 34 D E IN USE SCENARIO LIST 1 2 3 4 5 6 Current Optimistic Pessimistic High Average Order Very High Response Very Low Response G MODEL Model of responses # of responses Model of profit Total revenue Costs Fixed costs Var. mailing costs Var. order costs Total cost 9,000 $ 405,000.00 $ $ $ $ 18,000.00 25,000.00 305,550.00 348,550.00 NET PROFIT $ 56,450.00 Breakeven (BE) Model BE point BE response rate 3,891.40 3.89% Fixed cost to print Scenario Number Scenario Name 2 Optimistic F Average order $ Cell C17 18,000.00 $ $ $ $ $ $ $ 20,000.00 18,000.00 22,000.00 20,000.00 20,000.00 20,000.00 $ $ $ $ $ $ Cell C18 45.00 40.00 45.00 35.00 65.00 40.00 40.00 Var % cost of order Response rate Cell C19 Cell C20 75% 9% 80% 75% 85% 80% 80% 80% 8% 9% 7% 8% 15% 4% Notes. The INPUTS module of Figure 1 is divided into two modules: FIXED INPUTS, containing only numeric data, and INPUTS FROM SELECTED SCENARIO, containing cell formulas that echo the values in the selected scenario. distinguish between standard numeric input cells and input cells controlled by the Scenario Engine. Figure 5 presents such a redesign. The FIXED INPUTS module (Cells C9:C12) contains numbers, and the INPUTS FROM SELECTED SCENARIO module (Cells C17:C20) contains formulas. 5.5. Rapid Creation of a Scenario Summary Report It is often desirable to create a “scenario summary report” that presents the key outputs from each scenario, along with other information such as the scenario number, scenario name, and selected input and output values for each scenario. This can be done manually by entering different scenario numbers into Cell B4 and recording the results. It is less tedious and more reliable to create a scenario summary report by performing a one-parameter sensitivity analysis on the scenario number. The analyst can perform the sensitivity analysis by using the commercial add-in SensIt (2008), the Data Sensitivity tool of the Sensitivity Toolkit (2007), the Data Table feature of Excel, or by writing simple VBA code. The Data Sensitivity tool is easy to use, but the results are not dynamic. The Data Table is slightly harder to use, but the results are dynamic (cf. Wagner and Keisler 2006). VBA code is difficult to write well, and we do not use it in our courses. We demonstrate in native Excel using the Data Table feature. We create a scenario summary report (using a process shown in Figure 6 with the results in Figure 7) that shows for each scenario the corresponding scenario name (Cell C26), average order (Cell C17), net profit (Cell F16), and the breakeven response rate (Cell F20). To set up the table in Figure 6, we enter documentation in Cells C36:F37 using text labels (Row 36) and the corresponding cell addresses (Row 37). In Row 38, we enter a pointer to each cell documented in the row above. Thus, Cell C38: = C26 (as documented in Cell C37). We do the same in the next cell to the right, Cell D38: = C17, and continue this process for Cells E38:F38. We leave Cell B38 blank. We enter the value 1 in Cell B38, continuing down to the value 6 in Cell B44. To populate the data table (Figure 6), we select Cells B38:F44 and perform Data\Table \, setting the Grossman and Özlük: A Spreadsheet Scenario Analysis Technique with Optimization and Simulation 25 Additional information, including supplemental material and rights and permission policies, is available at http://ite.pubs.informs.org. INFORMS Transactions on Education 10(1), pp. 18–33, © 2009 INFORMS Figure 6 Data Table to Create a Scenario Summary Report Notes. Select Cells B38:F44, open the Data Table Dialog Box, enter $B$4 in “Column input cell,” and click “OK.” “Column input cell” to be the scenario number in Cell B4, and click “OK” as shown in Figure 6. The results are shown in Figure 7 and the formula view in Figure 8. The scenario summary report allows for quick comparison of model results for each scenario. The scenario summary report is suitable for inclusion in documents or presentations, and it can easily be edited or formatted as desirable. Note that the analyst can include in the scenario summary report any desirable inputs or outputs. When created using Data Table, the scenario summary report is dynamic. Should there be a change to the original model or to inputs not included in the scenarios (for example, a change to the number of catalogs mailed in Cell C14), the information in the scenario summary report instantly updates. This powerful functionality is not available with the Excel Scenario Manager tool. Figure 7 5.6. The Scenario Engine Technique Satisfies the Desirable Scenario Analysis Properties The Scenario Engine technique satisfies all 10 of the desirable scenario analysis properties defined in §2. The Scenario Engine is transparent because the input values are taken directly from the scenario list in the spreadsheets. It is verifiable because the output values displayed in the model and in the summary report (§5.5) can be traced back using cell formulas to the values in the scenario list. It is easily made protected by locking the scenario list values (using standard Excel protections), so they cannot be accidentally overwritten. The Scenario Engine is flexible because it is easy to modify input values and to use cell formulas for input values. It is dynamic because the outputs are live; if a cell formula is changed, the outputs—including the scenario summary table—automatically update without further effort by the analyst. It is efficient because Completed Scenario Summary Report A B C D E Scenario Name Average order Net Profit F 35 36 37 38 39 40 41 42 43 44 45 SCENARIO OUTPUT 1 2 3 4 5 6 Cell C26 Optimistic Current Optimistic Pessimistic High Average Order Very High Response Very Low Response $ $ $ $ $ $ $ Cell C17 45.00 40.00 45.00 35.00 65.00 40.00 40.00 $ $ $ $ $ $ $ Cell F16 56,450.00 17,400.00 56,450.00 (11,650.00) 57,400.00 72,000.00 (13,800.00) Breakeven Response Rate Cell F20 3.89% 5.77% 3.89% 9.31% 3.52% 5.77% 5.77% Grossman and Özlük: A Spreadsheet Scenario Analysis Technique with Optimization and Simulation Additional information, including supplemental material and rights and permission policies, is available at http://ite.pubs.informs.org. 26 INFORMS Transactions on Education 10(1), pp. 18–33, © 2009 INFORMS Figure 8 Completed Scenario Summary Report (Formula View) A B C D E F Scenario Name Average order Net Profit Breakeven Response Rate Cell C25 Cell C17 Cell F16 35 36 37 38 39 SCENARIO 40 OUTPUT 41 42 43 44 45 1 2 3 4 5 6 =C26 =TABLE(,B4) =TABLE(,B4) =TABLE(,B4) =TABLE(,B4) =TABLE(,B4) =TABLE(,B4) =Average_order =TABLE(,B4) =TABLE(,B4) =TABLE(,B4) =TABLE(,B4) =TABLE(,B4) =TABLE(,B4) once the scenario input values have been defined, the programming is quick and easy, typically less than two minutes. The Scenario Engine is optimization ready because it integrates with Solver as shown in §7 below. It is stochastic ready because it supports Monte Carlo simulation, as shown in §8 below. It is scalable because it supports any number of inputs and any number of scenarios. It is consistent with standard MS/OR terminology because it introduces no new terms. 6. Integrating Solver Optimization with the Scenario Engine An analyst performing optimization with Solver might want to optimize multiple scenarios to see how the optimal decisions are affected by different possible sets of future parameter values. Although this can be done manually, it is preferable to automate the optimization and reporting process. We show how to do this by integrating Solver with the Scenario Engine. 6.1. Example Model for Optimization We show in Figure 9 an example model from Powell and Baker (2007, §5.1). A product-marketing manager Figure 9 Cell F20 =Net_profit =TABLE(,B4) =TABLE(,B4) =TABLE(,B4) =TABLE(,B4) =TABLE(,B4) =TABLE(,B4) =Breakeven_response_rate =TABLE(,B4) =TABLE(,B4) =TABLE(,B4) =TABLE(,B4) =TABLE(,B4) =TABLE(,B4) needs to decide how an advertising budget of $40,000 should be allocated to the upcoming four quarters. The product sells for $40 and costs $25 to produce. The overhead rate is 15%. Quarterly sales are adjusted by a seasonal factor: 90% for Quarter 1, 110% for Quarter 2, 80% for Quarter 3, and 120% for Quarter 4. There is sales expense of $8,000 for Quarters 1 and 2 and $9,000 for Quarters 3 and 4. There are also quarterly ad expenditures (which are decision variables). Consultants to the company assume the following formula for the relationship between advertising and quarterly unit sales: unit sales = 35 × seasonal factor × 3000 + ad budget 6.2. Scenarios We illustrate our approach using six scenarios (Figure 10). In practice, one might use many more. For each scenario, inputs that are not mentioned are at their base case values. • The “Current” scenario is the base case. • The “Optimistic” scenario has a price of $41, cost of $24, overhead rate of 12%, and an ad budget of $45,000. Core Model for Advertising Budget Example A B C 1 CORE MODEL FOR ADVERTISING BUDGET 2 3 4 5 INPUTS 6 7 Price 8 $ 40.00 Cost $ 25.00 9 Ad Budget $ 40,000 10 Overhead Rate 15% 11 Sales Parameters 35 12 13 Q1 14 Sales Expense 15 8,000 Seasonal 16 0.9 17 18 19 20 21 22 23 D E F G H DECISIONS I Q1 Exp $972 J Q2 Exp $2,919 K Q3 Exp $135 L Q4 Exp $4,063 M Total $8,089 MODEL Quarter Units Sold Revenue Cost of Goods Gross Margin $ $ $ Q1 Q2 Q3 Q4 Total 1,985 2,962 1,568 3,530 10,045 79,412 $ 118,475 $ 62,710 $ 141,192 $ 401,789 49,632 $ 74,047 $ 39,194 $ 88,245 $ 251,118 29,779 $ 44,428 $ 23,516 $ 52,947 $ 150,671 Sales Expense Advertising Overhead Total Fixed Cost $ $ $ $ 8,000 972 11,912 20,884 Profit Profit Margin $ 3,000 Q2 8,000 1.1 Q3 9,000 0.8 Q4 9,000 1.2 Note. The core model is in the INPUTS, DECISIONS, MODEL, and OUTPUTS modules. $ $ $ $ 8,000 2,919 17,771 28,690 $ 9,000 $ 135 $ 9,407 $ 18,542 8,895 $ 15,738 $ 11.20% 13.28% $ $ $ $ 9,000 4,063 21,179 34,242 $ 34,000 $ 8,089 $ 60,268 $ 102,357 4,975 $ 18,705 $ 48,314 7.93% 13.25% 12.02% OUTPUTS Profit $48,314 Grossman and Özlük: A Spreadsheet Scenario Analysis Technique with Optimization and Simulation 27 Additional information, including supplemental material and rights and permission policies, is available at http://ite.pubs.informs.org. INFORMS Transactions on Education 10(1), pp. 18–33, © 2009 INFORMS Figure 10 Core Model with Scenario Engine Displaying Scenario 2 A B C D 1 SCENARIO ANALYSIS FOR ADVERTISING BUDGET 2 SCENARIO SELECTED 3 2 4 5 6 FIXED INPUTS 7 Sales Parameters 35 3,000 8 9 Q1 Q2 10 Sales Expense 8,000 8,000 11 Seasonal 0.9 1.1 12 13 INPUTS FROM SELECTED SCENARIO 14 41.00 Price $ 15 Cost $ 24.00 16 $ 45,000 Ad Budget 17 12% Overhead Rate 18 19 20 21 22 24 25 26 27 28 29 SCENARIO 30 LIST 31 32 33 1 2 3 4 5 6 Q3 9,000 0.8 Cost Scenario Name Optimistic Cell C8 $ 41.00 Cell C9 $ 24.00 Current Optimistic Pessimistic High Price High Cost High Budget $ $ $ $ $ $ 40.00 41.00 37.00 45.00 40.00 40.00 F G H I DECISIONS Price 23 Scenario Number IN USE 2 E $ $ $ $ $ $ 25.00 24.00 26.00 25.00 30.00 25.00 Q4 9,000 1.2 Overhead Rate J Q1 Exp $8,261 Q2 Exp $13,822 K L Q3 Exp $5,898 Q4 Exp $17,019 M Total $45,000 MODEL Quarter Units Sold Revenue Cost of Goods Gross Margin Q1 Q2 Q3 3,343 4,993 2,641 $ 137,051 $ 204,731 $ 108,287 $ 80,225 $ 119,842 $ 63,388 $ 56,826 $ 84,888 $ 44,900 Q4 Total 5,943 16,920 $ 243,646 $ 693,715 $ 142,622 $ 406,077 $ 101,024 $ 287,638 Sales Expense Advertising Overhead Total Fixed Cost $ $ $ $ $ 9,000 $ 5,898 $ 12,994 $ 27,892 $ $ $ $ Profit Profit Margin $ 24,119 $ 38,499 $ 17,008 17.60% 18.80% 15.71% $ 8,000 8,261 16,446 32,707 $ $ $ $ 8,000 13,822 24,568 46,390 9,000 17,019 29,238 55,257 $ 34,000 $ 45,000 $ 83,246 $ 162,246 45,767 $ 125,392 18.78% 18.08% OUTPUTS $125,392 Profit Ad Budget Cell C11 Cell C10 12% $ 45,000 15% 12% 18% 15% 15% 15% $ $ $ $ $ $ 40,000 45,000 35,000 40,000 40,000 55,000 Notes. The INPUTS module is divided into the FIXED INPUTS and INPUTS FROM SELECTED SCENARIO modules. The Scenario Engine is programmed in Cells B25:G25 and D15:D18. The scenarios are presented in Rows 27–32, with documentation in Rows 23–24. The Scenario Engine is controlled using Cell B4. • The “Pessimistic” scenario has a price of $37, cost of $26, overhead rate of 18%, and an ad budget of $35,000. • The “High Price” scenario has a price of $45. • The “High Cost” scenario has a cost of $30. • The “High Budget” scenario has an ad budget of $55,000. 6.3. Scenario Engine We program a Scenario Engine as described in §5. In Figure 10, the cells related to the Scenario Engine cells are colored a shade of green. The scenarios themselves are in Rows 27–32. The IN USE scenario values are in Row 25. The selected scenario is in Cell B4. We split the INPUTS module (of Figure 9) into two modules with the inputs controlled by the Scenario Engine placed in the INPUTS FROM SELECTED SCENARIO module and the remaining inputs placed in the FIXED INPUTS module. 6.4. Combining Solver with the Scenario Engine We program Solver with the ad expenditures (Cells I4:L4) as the changing cells, the profit (Cell M22) as the target cell, and the constraint that the total ad expenditures ⇐ ad budget (M4 ⇐ C17), plus nonnegativity. To manually connect optimization to the Scenario Engine, we simply set the scenario selected (Cell B4) to the desired scenario number and invoke Solver. To optimize multiple scenarios, we repeat this process using different values in Cell B4. The manual process of running Solver and summarizing optimization results for all the scenarios in a well-organized table is tedious and error prone, especially with a sizable number of scenarios. It should be automated. Automation can be achieved using a parametric optimization add-in such as Solver Table (2003) or the Solver Sensitivity tool of Sensitivity Toolkit (2007), or by writing VBA code. Solver Table and the Solver Sensitivity tools are easy to use. We used the Solver Sensitivity tool (Figure 11), which allows us to include any outputs as long as they are in cells adjacent to one another, to generate the results shown in Figure 12. This section showed how to perform optimization on any number of scenarios. This approach is quick and easy. The prerequisites are a fully specified Solver model and a set of scenarios. The analyst must program a Scenario Engine and then run Solver Sensitivity. For an analyst who is comfortable implementing the Scenario Engine technique and using the Solver Sensitivity tool, this requires only a few minutes of effort. More importantly, using the Scenario Engine, the analyst can change any number of model inputs, as opposed to at most two inputs that can be changed using either Solver Table or the Solver Sensitivity tool. Solver returns static output, so any approach that uses Solver will also have static output. Hence, Grossman and Özlük: A Spreadsheet Scenario Analysis Technique with Optimization and Simulation Additional information, including supplemental material and rights and permission policies, is available at http://ite.pubs.informs.org. 28 INFORMS Transactions on Education 10(1), pp. 18–33, © 2009 INFORMS Figure 11 Solver Sensitivity Dialog Boxes Note. Note that the worksheet name is “AdvertisingBudget.” the Solver scenario analysis is not dynamic. Note that Solver does not function on worksheets that have Excel’s “protect sheet” feature enabled, so whenever Solver is used, cells on the worksheet cannot be protected. 7. Integrating Crystal Ball Simulation with the Scenario Engine Markham and Palocsay (2006) point out that the Excel Scenario Manager tool does not allow stochastic analysis. This is a serious shortcoming for the management scientist. In this section, we show how to combine stochastic analysis with scenario analysis by integrating the Scenario Engine with the Crystal Ball add-in for Monte Carlo simulation. 7.1. Example Model for Simulation We illustrate (Figure 13) our approach using Problem 15.9 from Powell and Baker (2007). A small private company is considering an initial public offering. The initial price of the stock ranges from $10 to $15 with the discrete distribution shown in Table 1. Figure 12 There is 30% probability that the company will fail in the first year and this probability remains the same in each of the first five years. If the company does not fail, then its stock value increases each year by a percentage given by a lognormal distribution with a mean of 1.5% and standard deviation of 0.5%. We place probability distributions into “Initial Price” (Cell D19), “Fail or Not” (Cells E22:I22), and “% Price Increase” (Cells E23:I23) by designating them as Crystal Ball “Assumptions.” The company would like to determine the probability distribution for the price of the stock in five years (Cell D26); hence we designate this cell as a Crystal Ball “Forecast.” 7.2. Scenarios We will use the following six scenarios, although in practice one might use many more. For each scenario, inputs that are not mentioned are at their base case values. • The “Current” scenario is the base case. • In the “Optimistic” scenario, failure probability in Year 1 is 15% in the first year and decreases by 2% Solver Scenario Analysis Summary A B C 1 SCENARIO SELECTED 2 1 $71,446.79 3 2 $125,392.21 4 3 $1,650.45 5 4 $140,130.00 6 5 ($1,910.00) $ (142,040.00) 7 6 $76,097.27 $ 8 Objective: Profit Change D E Q1 Exp Q2 Exp F Q3 Exp G Q4 Exp $7,273 $12,346 $5,117 $15,263 53,945.42 $8,261 $13,822 $5,898 $17,020 $ (123,741.76) $1,672 $3,980 $692 $5,307 $ $7,273 $12,346 $5,117 $15,263 $ 138,479.55 78,007.27 $969 $2,929 $136 $4,056 $10,237 $16,773 $7,459 $20,532 Grossman and Özlük: A Spreadsheet Scenario Analysis Technique with Optimization and Simulation 29 Additional information, including supplemental material and rights and permission policies, is available at http://ite.pubs.informs.org. INFORMS Transactions on Education 10(1), pp. 18–33, © 2009 INFORMS Figure 13 Core Model for Simulation Example A B C 1 CORE MODEL FOR IPO VALUE 2 3 4 5 INPUTS 6 7 8 Distrn of Increase 9 10 11 IPO Price 12 Probability 13 Year 14 15 Probability of Failure 16 17 MODEL 18 19 Initial Price 20 21 Year Fail or Not (Fail=0) 22 % Price Increase 23 Value 24 25 Price in 5 years 26 27 28 D E F G LogNormal Distribution Mean Std. dev. 1.50% 0.50% $ 10.00 0.10 0 $ 11.00 $ 0.20 H I Failure Probability Annual Change 0% 12.00 0.30 1 30% 2 30% 1 1 1.00% 12.12 2 1 1.00% 12.24 $ 13.00 0.20 3 30% $ 14.00 0.10 4 30% $ 15.00 0.10 5 30% 12.00 0 12.00 3 1 1.00% 12.36 4 1 1.00% 12.49 5 1 1.00% 12.61 12.61 Notes. The core model is in the INPUTS and MODEL modules. The key output is in Cell D26. every year. The mean of the lognormal distribution is 2%, and the standard deviation is 0.50%. • In the “Pessimistic” scenario, failure probability in Year 1 is 36% for the first year and increases by 3% every year. The mean of the lognormal distribution is 1%, and the standard deviation is 0.90%. • In the “High Mean” scenario, the mean of the lognormal distribution is 4.00%. • In the “High Year 1 Probability” scenario, failure probability in Year 1 is 50%, for the first year. • In the “High S.D.” scenario, the standard deviation of the lognormal distribution is 2%. 7.3. Scenario Engine We program a Scenario Engine as described in §§5.1–5.3. In Figure 14, the cells related to the Scenario Engine are colored a shade of green. The scenarios themselves are in Rows 33–38. The IN USE scenario values (which are echoed into the INPUTS module) are in Row 31. The selected scenario is in Cell B4. 7.4. Combining Crystal Ball with the Scenario Engine To manually connect simulation to the Scenario Engine, we simply set the scenario selected (Cell B4) Table 1 Price ($) Probability Probability Distribution for Simulation Model 10 11 12 13 14 15 0.10 0.20 0.30 0.20 0.10 0.10 to the desired scenario number and run Crystal Ball. To simulate multiple scenarios, we repeat this process using different values in Cell B4. The manual process of running Crystal Ball and summarizing simulation results for all the scenarios in a well-organized table is tedious and error prone (especially with a sizable number of scenarios). It should be automated. To automate the simulation of each scenario, we can use the Crystal Ball Sensitivity tool provided in the Sensitivity ToolKit (2007), the Crystal Ball Decision Table tool (which, despite its name, is actually a sensitivity analysis tool), or by writing VBA code. The Crystal Ball Sensitivity tool is easy to use. The Crystal Ball Decision Table tool is slightly more difficult to use, but it generates the histogram plots of the simulation output values. We used the Crystal Ball Sensitivity tool (Figure 15) to generate the results shown in Figure 16. Note that in Figure 16 we do not report the scenario name because Crystal Ball Sensitivity cannot do this. (If necessary, the scenario name could be programmed using a lookup function.) This approach is consistent with the use of common random numbers, because the random numbers are controlled by the simulation add-in. This section showed how to perform Monte Carlo simulation using Crystal Ball on any number of scenarios. This approach is quick and easy. The prerequisites are a fully specified Crystal Ball model and a set of scenarios. The analyst must program a Scenario Engine and then run the Crystal Ball Sensitivity tool. Grossman and Özlük: A Spreadsheet Scenario Analysis Technique with Optimization and Simulation Additional information, including supplemental material and rights and permission policies, is available at http://ite.pubs.informs.org. 30 INFORMS Transactions on Education 10(1), pp. 18–33, © 2009 INFORMS Figure 14 1 2 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 31 32 33 34 35 36 37 38 39 40 41 Core Model with Scenario Engine Displaying Scenario 3 A B C SCENARIO ANALYSIS FOR IPO VALUE D E F G H I SCENARIO SELECTED 3 FIXED INPUTS Year IPO Price Probability $ 0 10.00 0.10 $ 1 11.00 0.20 $ 2 12.00 0.30 INPUTS FROM SELECTED SCENARIO LogNormal Distribution Mean Std. dev. Distrn of Increase 1.00% 0.90% Year Probability of Failure 0 Initial price 12.00 Year Fail or Not (Fail=0) % Price Increase Value 0 12.00 Price in 5 years 12.61 $ 3 13.00 $ 0.20 4 14.00 0.10 $ 5 15.00 0.10 Failure Probability Annual Change 3% 1 36% 2 39% 3 42% 4 45% 5 48% 1 1 1.00% 12.12 2 1 1.00% 12.24 3 1 1.00% 12.36 4 1 1.00% 12.49 5 1 1.00% 12.61 MODEL Failure Probability Year One Scenario Failure Probability Annual Change LogNormal Mean LogNormal SD IN USE 3 Name Pessimistic Cell E17 0.36 Cell G14 3% Cell D14 1% Cell E14 0.90% SCENARIO LIST 1 2 3 4 5 6 Current Optimistic Pessimistic High Mean High Year 1 Prob. High S.D. 30% 15% 36% 30% 50% 30% 0% –2% 3% 0% 0% 0% 1.50% 2.00% 1.00% 4.00% 1.50% 1.50% 0.50% 0.10% 0.90% 0.50% 0.50% 2.00% Notes. The INPUTS module is divided into the FIXED INPUTS and INPUTS FROM SELECTED SCENARIO modules. The Scenario Engine is programmed in Cells D14, E14, G14, E17:I17, and B33:G33. The scenarios are in Rows 35–40, with documentation in Rows 31–32. The Scenario Engine is controlled using Cell B4. For an analyst who is comfortable implementing the Scenario Engine technique and using the Crystal Ball Sensitivity tool, this requires only a few minutes of effort. Because the simulation results generated by Crystal Ball are static, the simulation scenario analysis is not dynamic. 8. Classroom Experience with the Scenario Engine We have taught the Scenario Engine to hundreds of students. With an explanation of the INDEX function and a bit of practice, both undergraduate and MBA students are able to learn it in 30–60 minutes of class time, in a setting where all students have computers. Many of our MBA students are well aware, from prior experience, of the cumbersome nature of Excel’s Scenario Manager tool and greatly prefer the Scenario Engine technique. With a bit of practice, our students are able to build a Scenario Engine for any existing spreadsheet model. Those students who apply themselves tell us they can do this in less than two minutes—even on a spreadsheet they have not seen before. The only requirement is that the inputs be organized in a well-documented inputs module, and that the scenarios be predefined in a well-documented scenario list such as in Figure 1. Students’ Excel skills upon entering our course typically range from beginner to expert. We take action Grossman and Özlük: A Spreadsheet Scenario Analysis Technique with Optimization and Simulation 31 Additional information, including supplemental material and rights and permission policies, is available at http://ite.pubs.informs.org. INFORMS Transactions on Education 10(1), pp. 18–33, © 2009 INFORMS Figure 15 Crystal Ball Sensitivity Dialog Boxes Source. Adapted from Powell and Baker (2007). Notes. Note that the worksheet name is “with Scenario.” to fix student spreadsheet deficiencies with minimal use of class time using “student-led remediation” described in Grossman (2006). Students need to be able to use the INDEX function to program the Scenario Engine and Excel’s Data Table tool to build the scenario summary report. We teach both during class before we spend the 30–60 minutes on the Scenario Engine. We present a simple tutorial on INDEX (see the appendix) that takes 5 to 10 minutes. We provide a simple handout with screenshots that walks students through the use of Data Table, described in Grossman (2008). Teaching Data Table takes about 10 minutes with MBAs and 20 minutes with undergraduates. They have no difficulty learning it, provided that we motivate them with an interesting context. When we teach parametric optimization or simulation sensitivity, students have no difficulty combining these techniques with the Scenario Engine. 9. Conclusion Scenario analysis is an important and useful technique for obtaining business insight from a model. Figure 16 As discussed in Markham and Palocsay (2006), students should be proficient in scenario analysis. We present a set of 10 desirable scenario analysis properties. Unfortunately, the Excel Scenario Manager satisfies only one of these properties, sorely limiting its usefulness for serious analytical work. We present the Scenario Engine technique for scenario analysis in a spreadsheet. It satisfies all 10 desirable scenario analysis properties. The Scenario Engine can be quickly programmed into any welldesigned spreadsheet model. This approach greatly reduces manual data entry and copying of outputs into summary reports, increasing analyst productivity and accuracy. We demonstrate the ease with which an analyst can integrate the Scenario Engine with Solver for optimization and with Crystal Ball for Monte Carlo simulation. Markham and Palocsay (2006) demonstrate the straightforward integration of the Scenario Manager tool with the decision analysis add-in TreePlan (SensIt 2008). We believe that integration of the Scenario Engine with TreePlan for decision analysis would be Simulation Scenario Analysis Summary for Problem 15.9 A B C D E 1 SCENARIO SELECTED Price in 5 years: Mean Price in 5 years: StDev Price in 5 years: Min Price in 5 years: Max 2 1 $ 2.26 $ 5.04 $ - $ 16.66 3 2 3 4 5 6 $ $ $ $ $ 7.62 0.82 2.60 0.40 2.27 $ $ $ $ $ 6.83 3.18 5.72 2.27 5.03 $ $ $ $ $ - $ $ $ $ $ 16.67 16.67 18.93 16.48 22.80 4 5 6 7 8 Source. Adapted from Powell and Baker (2007). Grossman and Özlük: A Spreadsheet Scenario Analysis Technique with Optimization and Simulation Additional information, including supplemental material and rights and permission policies, is available at http://ite.pubs.informs.org. 32 INFORMS Transactions on Education 10(1), pp. 18–33, © 2009 INFORMS straightforward, and we see this as an avenue for further research. We have used the Scenario Engine with undergraduate and MBA students and have found they can learn it with modest effort. We anticipate that it will be of value in many business school management science courses. Acknowledgments We thank the editors and the anonymous referees for their thoughtful reviews and valuable comments. We also thank Patrick O’Beirne for his comments on the OFFSET function. Appendix This appendix describes the INDEX function, which might not be familiar to some readers or their students. We provide to students a spreadsheet containing this information prior to teaching the Scenario Engine. Essential Functionality of INDEX The INDEX function is a convenient way to obtain the contents of a cell located within a particular range of cells. For the Scenario Engine, we need to make use of only a subset of the functionality of INDEX, described here. The syntax for our purposes is =INDEX(range, row_num), where range is a single column of cells, and row_num is the row number within the range. The INDEX function returns the value in the cell at row_num within the range. Examples (see Figure A.1): =INDEX(G7:G9,2) returns 20, the value in Cell G8: Row 2 of G7:G9. =INDEX(G7:G9,5) returns #REF!; Row 5 was specified for a range with only three rows. Enrichment: Additional Functionality of INDEX Note that there is an “advanced” syntax for INDEX that is not required for the Scenario Engine. It can be desirable to expand students’ knowledge of Excel by showing them this functionality. The “advanced” syntax is =INDEX(range, row_num, col_num). Range is a rectangular selection of cells, row_num is the row number within the range, and col_num is the column number within the range. INDEX returns the value in the cell at row_num and col_num within the range. Examples (see Figure A.1): =INDEX(G7:K9,1,1) returns 10, the value in Cell G7: Row 1, Column 1 of G7:K9. =INDEX(H8:J9,1,1) returns 70, the value in Cell H8: Row 1, Column 1 of H8:J9. =INDEX(G7:K9,2,5) returns 220, the value in Cell K8: Row 2, Column 5 of G7:K9. =INDEX(G7:K9,4,5) returns the error message #REF!; the range has only three rows. Figure A.1 INDEX Example for Additional Functionality G 7 8 9 10 H 10 20 30 I 60 70 80 J 110 120 130 K 160 170 180 210 220 230 Choice of Lookup Functions Excel provides a class of “lookup” functions that are useful for extracting data from a list. We recommend the INDEX function. However, Tennent and Friend (2001) use OFFSET, and Powell and Baker (2007) use CHOOSE. Each of these three functions is capable of providing the necessary functionality. However, from a spreadsheet engineering perspective, OFFSET should be avoided whenever possible, and CHOOSE requires excessive programming and can be difficult to verify. INDEX has none of these difficulties and therefore is preferred. (Note that VLOOKUP does not work well for this application because it requires a column number that has to be changed for each column. LOOKUP can be used for this application, but it requires one more range argument than INDEX and is therefore more challenging to program.) OFFSET. The OFFSET function (along with the INDIRECT function) works not by the usual spreadsheet cell referencing but instead by addressing a cell that is a specified number of rows and columns away from a specified location in the spreadsheet. This poses serious problems for accurate, reliable programming. In general in Excel, when a user drags-and-drops (or cuts-and-pastes) a cell containing a formula, the spreadsheet automatically adjusts and cells return the same values they contained prior to the edit. However, OFFSET does not reliably exhibit this behavior. A simple drag-and-drop can cause the value returned by the OFFSET function to change. Likewise, in general in Excel, when a user inserts or deletes a new row, the spreadsheet automatically adjusts, and cells return the same values they contained prior to the row insertion. However, OFFSET does not reliably exhibit this behavior. If a row is inserted or deleted between the “range” of OFFSET and the offset location, the value returned by the OFFSET function changes. Due to this unusual behavior in response to normally benign programming actions, a spreadsheet containing OFFSET must be considered inherently risky. Furthermore, OFFSET does not work properly with Excel’s formula auditing tools. A cell whose value is returned by OFFSET does not provide an arrow to the OFFSET cell when Trace Dependents is used. This can cause such a cell to be perceived as “orphan data” (and therefore a candidate for deletion during routine quality assurance), when in fact it is used by the OFFSET function. Finally, OFFSET is one of a handful of “volatile” functions (meaning that it always recalculates), which increases calculation time in larger spreadsheets. CHOOSE. The CHOOSE function is unwieldy and requires excessive programming. With CHOOSE, the programmer cannot provide a single range for all scenarios but must program an individual argument for each scenario. For example, with six scenarios the programmer might write CHOOSE(Scenario_Number, L14, L15, L16, L17, L18, L19) but cannot write this as CHOOSE(Scenario_Number, L14:L19). If there were 20 scenarios, the CHOOSE function would require 21 separate arguments, which is impractical as well as hard to verify. In addition, in Excel 2003 and earlier, CHOOSE was limited to 29 scenarios. This has increased in Excel 2007 to 254 scenarios (requiring 255 arguments). Conceptually, there is Grossman and Özlük: A Spreadsheet Scenario Analysis Technique with Optimization and Simulation Additional information, including supplemental material and rights and permission policies, is available at http://ite.pubs.informs.org. INFORMS Transactions on Education 10(1), pp. 18–33, © 2009 INFORMS 33 no limit on the number of scenarios a user might want to deploy; hence, Excel’s limitation to 254 scenarios compromises scalability. Grossman, T. A., V. Mehrotra, Ö. Özlük. 2007. Lessons from mission-critical spreadsheets. Comm. Assoc. Inform. Systems 20(60) 1009–1042. INDEX. In contrast, the INDEX function has none of the above shortcomings. Unlike OFFSET, it uses standard cell referencing and hence is well behaved with regard to cutand-paste and row insertions and deletions. It works well with Excel’s Trace Dependents feature, and like most Excel functions, is nonvolatile. In contrast to CHOOSE, it accepts a single range for all the scenarios; it is therefore faster to program and easier to verify. Markham, I. S., S. W. Palocsay. 2006. Scenario analysis in spreadsheets with Excel’s scenario tool. INFORMS Trans. Ed. 6(2) 23–31, http://ite.pubs.informs.org/. References Buehlmann U., C. T. Ragsdale, B. Gfeller. 2000. Spreadsheet-based decision support system for wood panel manufacturing. Decision Support Systems 29(3) 207–227. Coles, S., J. Rowley. 1996. Spreadsheet modelling for management decision making. Indust. Management Data Systems 96(7) 17–23. Croll, G. 2005. The importance and criticality of spreadsheets in the city of London. Eur. Spreadsheet Risks Interest Group 6th Annual Conf., London, European Spreadsheet Risks Interest Group, Greenwich, UK, 83–93. Accessed July 1, 2008, http://sprig. section.informs.org/sprigfiles/Croll05.pdf. Grossman, T. A. 2006. Integrating spreadsheet engineering in a management science course—A hierarchical approach. INFORMS Trans. Ed. 7(1) 18–36, http://ite.pubs.informs.org/. Grossman, T. A. 2008. A primer on spreadsheet analytics. Eur. Spreadsheet Risks Interest Group 9th Annual Conf., European Spreadsheet Risks Interest Group, Greenwich, UK, 129–139. Grossman, T. A., Ö. Özlük. 2004. A paradigm for spreadsheet engineering methodologies. Eur. Spreadsheet Risks Interest Group 5th Annual Conf., European Spreadsheet Risks Interest Group, Greenwich, UK. LeBlanc L. J., T. A. Grossman. 2008. The use of spreadsheet software in the application of management science and operations research. Interfaces 38(4) 225–227. Postma, M. J., M. A. Heijnen, J. C. Jager. 2001. Cost-effectiveness analysis of pneumococcal vaccination for elderly individuals in The Netherlands. PharmacoEconom. 19(2) 215–222. Powell, S. G., K. R. Baker. 2007. Management Science: The Art of Modeling with Spreadsheets, 2nd ed. John Wiley & Sons, Hoboken, NJ. Ragsdale, C. T. 2001. Teaching management science with spreadsheets: From decision models to decision support. INFORMS Trans. Ed. 1(2) 68–74, http://ite.pubs.informs.org/. Ryan, P. A., G. P. Ryan. 2002. Capital budgeting practices of the Fortune 1000: How have things changed. J. Bus. Management 8(4) 355–364. SensIt. 2008. SensIt sensitivity analysis add-in. Accessed July 1, 2008, http://www.treeplan.com/sensit.htm. Sensitivity Toolkit. 2007. Accessed July 1, 2008, http://mba.tuck. dartmouth.edu/toolkit/. Solver Table. 2003. Accessed July 1, 2008, http://highered.mcgrawhill.com/sites/0073129038/student_view0/solver_table.html. Tennent, J., G. Friend. 2001. Guide to Business Modelling. Profile Books, London. Wagner, J. M., J. Keisler. 2006. Enhance your own research productivity using spreadsheets. Tutorials Oper. Res. 148–162. Weisel, J. 2004. Add muscle to what-if analyses. J. Accounting 198(3) 76–79. Winston, W. L., S. C. Albright. 2001. Practical Management Science, 2nd ed. Thomson Learning, Duxbury, Pacific Grove, CA.