Chapter 36. Performing Spreadsheet What-If Analysis

<feature><title>In This Chapter</title> </feature>

One of the most appealing aspects of Excel is its ability to create dynamic models. A dynamic model uses formulas that instantly recalculate when you change values in cells that are used by the formulas. When you change values in cells in a systematic manner and observe the effects on specific formula cells, you’re performing a type of what-if analysis.

What-if analysis is the process of asking such questions as “What if the interest rate on the loan changes to 7.5 percent rather than 7.0 percent?” or “What if we raise our product prices by 5 percent?”

If you set up your worksheet properly, answering such questions is simply a matter of plugging in new values and observing the results of the recalculation. Excel provides useful tools to assist you in your what-if endeavors.

A What-If Example

Figure 36.1 shows a simple worksheet model that calculates information pertaining to a mortgage loan. The worksheet is divided into two sections: the input cells and the result cells (which contain formulas).

This simple worksheet model uses four input cells to produce the results.

Figure 36.1. This simple worksheet model uses four input cells to produce the results.

On the CD-ROM

This workbook is available on the companion CD-ROM. The file name is mortgage loan.xlsx.

With this worksheet, you can easily answer the following what-if questions:

What if I can negotiate a lower purchase price on the property?

What if the lender requires a 20-percent down payment?

What if I can get a 40-year mortgage?

What if the interest rate increases to 7.0 percent?

You can answer these questions by simply changing the values in the cells in range C4:C7 and observing the effects in the dependent cells (C10:C13). You can, of course, vary any number of input cells simultaneously.

Types of What-If Analyses

Not surprisingly, Excel can handle much more sophisticated models than the preceding example. To perform a what-if analysis using Excel, you have three basic options:

  • Manual what-if analysis: Plug in new values and observe the effects on formula cells.

  • Data tables: Create a table that displays the results of selected formula cells as you systematically change one or two input cells.

  • Scenario Manager: Create named scenarios and generate reports that use outlines or pivot tables.

Manual What-If Analysis

This method doesn’t require too much explanation. In fact, the example that opens this chapter demonstrates how it’s done. Manual what-if analysis is based on the idea that you have one or more input cells that affect one or more key formula cells. You change the value in the input cells and see what happens to the formula cells. You may want to print the results or save each scenario to a new workbook. The term scenario refers to a specific set of values in one or more input cells.

Manual what-if analysis is very common, and people often use this technique without even realizing that they’re doing a type of what-if analysis. This method of performing what-if analysis certainly has nothing wrong with it, but you should be aware of some other techniques.

Tip

If your input cells are not located near the formula cells, consider using a Watch Window to monitor the formula results in a movable window. Chapter 4 discusses this feature.

Creating Data Tables

This section discusses one of Excel’s most underutilized features: data tables. A data table is a dynamic range that summarizes formula cells for varying input cells. You can create a data table fairly easily, but data tables have some limitations. In particular, a data table can deal with only one or two input cells at a time. This limitation becomes clear as you view the examples.

Note

Scenario Manager, discussed later in this chapter (see “Using Scenario Manager”), can produce a report that summarizes any number of input cells and result cells.

Don’t confuse a data table with a standard table (which is created by choosing Insert Note Tables Note Table). These two features are completely independent of each other.

Creating a one-input data table

A one-input data table displays the results of one or more formulas for various values of a single input cell. Figure 36.2 shows the general layout for a one-input data table.

How a one-input data table is set up.

Figure 36.2. How a one-input data table is set up.

You can place the data table anywhere in a worksheet. The left column contains various values for the single input cell. The top row contains references to formulas located elsewhere in the worksheet. You can use a single formula reference or any number of formula references. The upper-left cell of the table remains empty. Excel calculates the values that result from each value of the input cell and places them under each formula reference.

This example uses the mortgage loan worksheet from earlier in the chapter (see “A What-If Example”). The goal of this exercise is to create a data table that shows the values of the four formula cells (loan amount, monthly payment, total payments, and total interest) for various interest rates ranging from 6 to 8 percent, in 0.25-percent increments.

On the CD-ROM

This workbook is available on the companion CD-ROM. The file is named mortgage loan data table.xlsx.

Figure 36.3 shows the setup for the data table area. Row 3 consists of references to the formulas in the worksheet. For example, cell F3 contains the formula =C10, and cell G3 contains the formula =C11. Column E contains the values of the single input cell (interest rate) that Excel will use in the table.

Preparing to create a one-input data table.

Figure 36.3. Preparing to create a one-input data table.

To create the table, select the data table range (in this case, E3:I12) and then choose Data Preparing to create a one-input data table. Data Tools Preparing to create a one-input data table. What-If Analysis Preparing to create a one-input data table. Data Table. Excel displays the Data Table dialog box, shown in Figure 36.4.

The Data Table dialog box.

Figure 36.4. The Data Table dialog box.

You must specify the worksheet cell that contains the input value. Because variables for the input cell appear in the left column in the data table, you place this cell reference in the text box labeled Column Input Cell. Enter C7 or point to the cell in the worksheet. Leave the Row Input Cell field blank. Click OK, and Excel fills in the table with the calculated results (see Figure 36.5).

The result of the one-input data table.

Figure 36.5. The result of the one-input data table.

Using this table, you can now see the calculated loan values for varying interest rates. If you examine the contents of the cells that Excel entered as a result of this command, you’ll see that the data is generated with a multicell array formula:

=TABLE(,C7)

As I discuss in Chapter 17, an array formula is a single formula that can produce results in multiple cells. Because the table uses formulas, Excel updates the table that you produce if you change the cell references in the first row or plug in different interest rates in the first column.

Note

You can arrange a one-input table vertically (as in this example) or horizontally. If you place the values of the input cell in a row, you enter the input cell reference in the text box labeled Row input cell in the Table dialog box.

Creating a two-input data table

As the name implies, a two-input data table lets you vary two input cells. You can see the setup for this type of table in Figure 36.6. Although it looks similar to a one-input table, the two-input table has one critical difference: It can show the results of only one formula at a time. With a one-input table, you can place any number of formulas, or references to formulas, across the top row of the table. In a two-input table, this top row holds the values for the second input cell. The upper-left cell of the table contains a reference to the single result formula.

The setup for a two-input data table.

Figure 36.6. The setup for a two-input data table.

Using the mortgage loan worksheet, you could create a two-input data table that shows the results of a formula (say, monthly payment) for various combinations of two input cells (such as interest rate and down payment percent). To see the effects on other formulas, you simply create multiple data tables—one for each formula cell that you want to summarize.

The example in this section uses the worksheet shown in Figure 36.7 to demonstrate a two-input data table. In this example, a company wants to conduct a direct-mail promotion to sell its product. The worksheet calculates the net profit from the promotion.

This worksheet calculates the net profit from a direct-mail promotion.

Figure 36.7. This worksheet calculates the net profit from a direct-mail promotion.

On the CD-ROM

This workbook, named direct mail.xlsx, is available on the companion CD-ROM.

This model uses two input cells: the number of promotional pieces mailed and the anticipated response rate. The following items appear in the Parameters area:

  • Printing costs per unit: The cost to print a single mailer. The unit cost varies with the quantity: $0.20 each for quantities less than 200,000; $0.15 each for quantities of 200,001 through 300,000; and $0.10 each for quantities of more than 300,000. The following formula is used:

    =IF(B4<200000,0.2,IF(B4<300000,0.15,0.1))
  • Mailing costs per unit: A fixed cost, $0.28 per unit mailed.

  • Responses: The number of responses, calculated from the response rate and the number mailed. The formula in this cell is the following:

    =B4*B5
  • Profit per response: A fixed value. The company knows that it will realize an average profit of $18.50 per order.

  • Gross profit: This is a simple formula that multiplies the profit-per-response by the number of responses:

    =B10*B11
  • Print + mailing costs: This formula calculates the total cost of the promotion:

    =B4*(B8+B9)
  • Net Profit: This formula calculates the bottom line—the gross profit minus the printing and mailing costs.

If you enter values for the two input cells, you see that the net profit varies quite a bit, often going negative to produce a net loss.

Figure 36.8 shows the setup of a two-input data table that summarizes the net profit at various combinations of quantity and response rate; the table appears in the range E4:M14. Cell E4 contains a formula that references the Net Profit cell:

=B15

Preparing to create a two-input data table.

Figure 36.8. Preparing to create a two-input data table.

To create the data table:

  1. Enter the response rate values in F4:M4.

  2. Enter the number mailed values in E5:E14.

  3. Select the range E4:M14 and choose Data Preparing to create a two-input data table. Data Tools Preparing to create a two-input data table. What-If Analysis Preparing to create a two-input data table. Data Table.

  4. In the Data Table dialog box, specify B5 as the Row input cell (the response rate) and cell B4 as the Column input (the number mailed).

  5. Click OK, and Excel fills in the data table.

Figure 36.9 shows the result. As you see, quite a few of the combinations of response rate and quantity mailed result in a loss rather than a profit.

The result of the two-input data table.

Figure 36.9. The result of the two-input data table.

As with the one-input data table, this data table is dynamic. You can change the formula in cell E4 to refer to another cell (such a gross profit). Or, you can enter some different values for Response Rate and Number Mailed.

Using Scenario Manager

Data tables are useful, but they have a few limitations:

  • You can vary only one or two input cells at a time.

  • The process of setting up a data table is not all that intuitive.

  • A two-input table shows the results of only one formula cell (although you can create additional tables for more formulas).

  • In many situations, you’re interested in a few select combinations, not an entire table that shows all possible combinations of two input cells.

Excel’s Scenario Manager feature makes automating your what-if models easy. You can store different sets of input values (called changing cells in the terminology of Scenario Manager) for any number of variables and give a name to each set. You can then select a set of values by name, and Excel displays the worksheet by using those values. You can also generate a summary report that shows the effect of various combinations of values on any number of result cells. These summary reports can be an outline or a pivot table.

For example, your annual sales forecast may depend on several factors. Consequently, you can define three scenarios: best case, worst case, and most likely case. You then can switch to any of these scenarios by selecting the named scenario from a list. Excel substitutes the appropriate input values in your worksheet and recalculates the formulas.

Defining scenarios

To introduce you to Scenario Manager, this section starts with an example that uses a simplified production model, as shown in Figure 36.10.

A simple production model to demonstrate Scenario Manager.

Figure 36.10. A simple production model to demonstrate Scenario Manager.

On the CD-ROM

This workbook, named production model.xlsx, is available on the companion CD-ROM.

This worksheet contains two input cells: the hourly labor cost (cell B2) and the unit cost for materials (cell B3). The company produces three products, and each product requires a different number of hours and a different amount of materials to produce.

Formulas calculate the total profit per product (row 13) and the total combined profit (cell B15). Management is trying to predict the total profit, but is uncertain what the hourly labor cost and material costs will be. They’ve identified three scenarios, listed in Table 36.1.

Table 36.1. Three Scenarios for the Production Model

Scenario

Hourly Cost

Materials Cost

Best Case

30

57

Worst Case

38

62

Most Likely

34

59

The Best Case scenario has the lowest hourly cost and lowest materials cost. The Worst Case scenario has high values for both the hourly cost and the materials cost. The third scenario, Most Likely Case, has intermediate values for both of these input cells. The managers need to be prepared for the worst case, however, and they’re interested in what would happen under the Best Case scenario.

Choose Data Three Scenarios for the Production Model Data Tools Three Scenarios for the Production Model What-If Analysis Three Scenarios for the Production Model Scenario Manger to display the Scenario Manager dialog box. When you first open this dialog box, it tells you that no scenarios are defined—which is not too surprising because you’re just starting. As you add named scenarios, they appear in the Scenarios list in this dialog box.

Tip

I strongly suggest that you create names for the changing cells and all the result cells that you want to examine. Excel uses these names in the dialog boxes and in the reports that it generates. If you use names, keeping track of what’s going on is much easier; names also make your reports more readable.

To add a scenario, click the Add button in the Scenario Manager dialog box. Excel displays its Add Scenario dialog box, shown in Figure 36.11.

The Add Scenario dialog box lets you create a named scenario.

Figure 36.11. The Add Scenario dialog box lets you create a named scenario.

This dialog box consists of four parts:

  • Scenario Name: The name for the scenario. You can give it any name that you like—preferably something meaningful.

  • Changing Cells: The input cells for the scenario. You can enter the cell addresses directly or point to them. If you’ve created a name for the cells, type the name. Non-adjacent cells are allowed (if pointing to multiple cells, press Ctrl while you click the cells). Each named scenario can use the same set of changing cells or different changing cells. The number of changing cells for a scenario is limited to 32.

  • Comment: By default, Excel displays the name of the person who created the scenario and the date that it was created. You can change this text, add new text to it, or delete it.

  • Protection: The two Protection options (preventing changes and hiding a scenario) are in effect only when you protect the worksheet and choose the Scenario option in the Protect Sheet dialog box. Protecting a scenario prevents anyone from modifying it; a hidden scenario doesn’t appear in the Scenario Manager dialog box.

In this example, define the three scenarios that are listed in Table 36.1. The changing cells are Hourly_Cost (B2) and Materials_Cost (B3).

After you enter the information in the Add Scenario dialog box, click OK. Excel then displays the Scenario Values dialog box, shown in Figure 36.12. This dialog box displays one field for each changing cell that you specified in the previous dialog box. Enter the values for each cell in the scenario. If you click OK, you return to the Scenario Manager dialog box, which then displays your named scenario in its list. If you have more scenarios to create, click the Add button to return to the Add Scenario dialog box.

You enter the values for the scenario in the Scenario Values dialog box.

Figure 36.12. You enter the values for the scenario in the Scenario Values dialog box.

Displaying scenarios

After you define all the scenarios and return to the Scenario Manager dialog box, the dialog box displays the names of your defined scenarios. Select one of the scenarios and then click the Show button. Excel inserts the corresponding values into the changing cells and calculates the worksheet to show the results for that scenario.

Modifying scenarios

The Edit button in the Scenario Manager dialog box lets you change one or more of the values for the changing cells of a scenario. From the Scenarios list, select the scenario that you want to change and click the Edit button. In the Edit Scenario dialog box, click OK to access the Scenario Values dialog box. Make your changes and click OK to return to the Scenario Manager dialog box. Notice that Excel automatically updates the Comments box with new text that indicates when the scenario was modified.

Merging scenarios

In workgroup situations, you may have several people working on a spreadsheet model, and several people may have defined various scenarios. The marketing department, for example, may have its opinion of what the input cells should be, the finance department may have another opinion, and your CEO may have yet another opinion.

Excel makes it easy to merge these various scenarios into a single workbook by using the Merge button in the Scenario Manager dialog box. Clicking this button displays the Merge Scenarios dialog box.

Before you merge scenarios, make sure that the workbook from which you’re merging is open. Then, click the Merge button in the Scenario Manager dialog box. Excel displays its Merge Scenarios dialog box. Choose the workbook that contains the scenarios you’re merging in the Book drop-down list. Then, choose the sheet that contains the scenarios you want to merge from the Sheet list box. (Notice that the dialog box displays the number of scenarios in each sheet as you scroll through the Sheet list box.) Click OK, and you return to the previous dialog box, which now displays the scenario names that you merged from the other workbook.

Generating a scenario report

If you’ve created multiple scenarios, you may want to document your work by creating a scenario summary report. When you click the Summary button in the Scenario Manager dialog box, Excel displays the Scenario Summary dialog box.

You have a choice of report types:

  • Scenario Summary: The summary report appears in the form of a worksheet outline.

  • Scenario PivotTable: The summary report appears in the form of a pivot table.

Cross-Ref

Refer to Chapter 26 for more information about outlines, and Chapter 34 for more information about pivot tables.

For simple cases of scenario management, a standard Scenario Summary report is usually sufficient. If you have many scenarios defined with multiple result cells, however, you may find that a Scenario Pivot Table provides more flexibility.

The Scenario Summary dialog box also asks you to specify the result cells (the cells that contain the formulas in which you’re interested). For this example, select B13:D13 and B15 (a multiple selection) to make the report show the profit for each product, plus the total profit.

Note

As you work with Scenario Manager, you may discover its main limitation: A scenario can use no more than 32 changing cells. If you attempt to use more cells, you get an error message.

Excel creates a new worksheet to store the summary table. Figure 36.13 shows the Scenario Summary form of the report. If you gave names to the changing cells and result cells, the table uses these names. Otherwise, it lists the cell references.

Figure 36.13. 

 

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset