Using “what if” scenarios

From Apache OpenOffice Wiki
Jump to: navigation, search



Scenarios are a tool to test “what-if” questions. Each scenario is named, and can be edited and formatted separately. When you print the spreadsheet, only the contents of the currently active scenario is printed.

A scenario is essentially a saved set of cell values for your calculations. You can easily switch between these sets using the Navigator or a drop-down list which can be shown beside the changing cells. For example, if you wanted to calculate the effect of different interest rates on an investment, you could add a scenario for each interest rate, and quickly view the results. Formulas that rely on the values changed by your scenario are updated when the scenario is opened. If all your sources of income used scenarios, you could efficiently build a complex model of your possible income.

Creating scenarios

Tools > Scenarios opens a dialog with options for creating a scenario. To create a new scenario:

  1. Select the cells that contain the values that will change between scenarios. To select multiple ranges, hold down the Ctrl key as you click. You must select at least two cells.
  2. Choose Tools > Scenarios.
  3. On the Create Scenario dialog, enter a name for the new scenario. It’s best to use a name that clearly identifies the scenario, not the default name as shown in the illustration. This name is displayed in the Navigator and on the title bar of the scenario on the sheet itself.
  4. Creating a scenario
  5. Optionally add some information to the Comment box. The example shows the default comment. This information is displayed in the Navigator when you click the Scenarios icon and select the desired scenario.
  6. Optionally select or deselect the options in the Settings section. See below for more information about these options.
  7. Click OK to close the dialog. The new scenario is automatically activated.

You can create several scenarios for any given range of cells.

Settings

The lower portion of the Create Scenario dialog contains several options. In most cases the default settings (shown selected in the example) are likely to be suitable in most situations.

Display border

Places a border around the range of cells that your scenario alters. To choose the color of the border, use the field to the right of this option. The border has a title bar displaying the name of the active scenario. Click the arrow button on the right of the scenario name to open a drop-down list of all the scenarios that have been defined for the cells within the border. You can choose any of the scenarios from this list at any time.

Copy back

Copies any changes you make to the values of scenario cells back into the active scenario. If you do not select this option, the saved scenario values are never changed when you make changes. The actual behavior of the Copy back setting depends on the cell protection, the sheet protection, and the Prevent changes settings.

Copy entire sheet

Copies the entire sheet into an additional scenario sheet.

Prevent changes

Prevents changes to the active scenario.

  • You can only change the scenario properties if the Prevent changes option is not selected and if the sheet is not protected.
  • You can only edit cell values if the Prevent changes option is selected, if the Copy back option is not selected, and if the cells are not protected.
  • You can only change scenario cell values and write them back into the scenario if the Prevent changes option is not selected, if the Copy back option is selected, and if the cells are not protected.

Working with scenarios using the Navigator

After scenarios are added to a spreadsheet, you can jump to a particular scenario by using the Navigator, then selecting a scenario from the list. You can also color code scenarios to make them easier to distinguish from one another.

To select a scenario in the Navigator, click the Scenarios icon in the Navigator. The defined scenarios are listed, with the comments that were entered when the scenarios were created.

Scenarios in the Navigator

Double-click a scenario name in the Navigator to apply that scenario to the current sheet.

To delete a scenario, right-click the name in the Navigator and choose Delete.

To edit a scenario, including its name and comments, right-click the name in the Navigator and choose Properties. The Edit Properties dialog is the same as the Create Scenario dialog.

To learn which values in the scenario affect other values, choose Tools > Detective > Trace Dependents. Arrows point to the cells that are directly dependent on the current cell.


Content on this page is licensed under the Creative Common Attribution 3.0 license (CC-BY).
Personal tools