Apache OpenOffice Calc · What-if analysis · Intermediate
Switch Between What-If Scenarios in OpenOffice Calc
Store named price-and-volume assumptions, switch scenarios safely, and avoid overwriting the baseline through Copy back.
Documentation-qualified exercise; native application verification pending · Editorial standards
Use Tools > Scenarios to store named sets of input values, then switch between them while keeping one set of formulas. A scenario supplies assumptions; unlike Goal Seek, it does not solve for an unknown input.
Build a small profit model
This exercise uses Apache OpenOffice Calc 4.1 desktop, English menus and Windows/Linux keyboard conventions. It follows the official guide and has not been executed in a native application. Use an unprotected, disposable ODS workbook so protection options do not complicate the first exercise.
Enter these labels in A1:A5 and corresponding values or formulas in B1:B5:
| Cell | Label | Value or formula |
|---|---|---|
| B1 | Unit price | 20 |
| B2 | Units | 100 |
| B3 | Unit cost | 12 |
| B4 | Fixed cost | 300 |
| B5 | Profit | =(B1-B3)*B2-B4 |
The baseline profit is 500: (20 − 12) × 100 − 300. Only B1:B2 will belong to each scenario. Cost assumptions remain outside the scenario and affect all cases. Save the starting workbook before creating scenarios.
Capture three stable assumption sets
- Select B1:B2. Choose Tools > Scenarios.
- Name the scenario Baseline. Add a comment such as “Price 20, volume 100; costs held constant.” Keep Display border selected so the scenario selector is visible.
- Clear Copy back. Leave Copy entire sheet off: you want named inputs on one working sheet, not extra full-sheet copies. Confirm with OK.
- Change B1 to 18 and B2 to 80. Select B1:B2 again, create a scenario named Cautious, and again clear Copy back. Profit should be 180.
- Change B1 to 22 and B2 to 120. Create Upside over the same B1:B2 range, with Copy back cleared. Profit should be 900.
Clearing Copy back is deliberate. With it enabled, edits made while one scenario is active can change that saved scenario. Editing the inputs before creating the next scenario could otherwise overwrite the baseline you meant to preserve.
Use the arrow beside the scenario border to select Baseline, Cautious and Upside. Each switch should replace both driver cells together and recalculate B5. Expected pairs and outputs are 20/100 → 500, 18/80 → 180, and 22/120 → 900. A scenario is not working correctly if the label changes but only one input changes.
Revise one saved scenario deliberately
Open Navigator and choose its Scenarios view. Double-click Cautious to activate it. Right-click its name and choose Properties. Enable Copy back for this deliberate update, confirming that the sheet is unprotected and Prevent changes does not block the operation.
Change B2 to 90 while Cautious is active. Profit should become 240. Switch to Baseline and back to Cautious to verify that 90 was stored. Then return to Cautious properties and clear Copy back to protect the new assumption set from incidental working edits. Baseline must still show 20 and 100, with profit 500.
Now change B4, outside the scenario, from 300 to 350. Baseline should produce 450, revised Cautious 190, and Upside 850. This tests the boundary: switching scenarios replaces B1:B2, not the fixed-cost input or the profit formula. Restore B4 to 300 afterward.
Recover and keep the model understandable
If Baseline unexpectedly changes, investigate Copy back before blaming recalculation. Use the recorded fixture to restore its two inputs, deliberately store them, and turn Copy back off again. Do not include B5 when creating scenarios, since replacing a formula with saved values would defeat the model.
Save, close and reopen the ODS workbook, then repeat the three switches and checks. Name scenarios by meaning, and record which inputs are deliberately shared. Sheet protection and Prevent changes alter scenario-editing behavior, so add them only after confirming this unprotected workflow.
Official reference
Apache OpenOffice 4.1 Calc Guide, Chapter 9, Using Scenarios, especially Copy back and Changing Scenarios. Recovered official guide retrieved 19 October 2026; persistence checks are reader exercises, not claimed test results.