Sub topic 12
Checks and Common Mistakes in a Scenario Switch
Assume that you already have a scenario assumptions block, a selector cell, and a live case row. The selector is in C3, the allowed scenario names are in B5:B7, and the scenario index is in C4. This chapter focuses on testing the switch and finding errors.
Trace the switch from name to output
A reliable scenario switch has a clear chain:
Test each stage separately. First, confirm that C3 contains exactly one allowed scenario name. Next, confirm that MATCH returns the expected index. Finally, check that every live case formula points to the correct scenario column.
For example, if C3 contains Upside, this formula should return 2:
=MATCH($C$3,$B$5:$B$7,0)The final argument, 0, requires an exact match. Without it, Excel can return an unexpected result when the list is not sorted correctly.
Add integrity checks
A check cell should return 0 when the model is valid and 1 when it needs attention. This convention makes it easy to create a master check that sums all error flags.
Check that the index is a valid number:
=IF(AND(ISNUMBER($C$4),$C$4>=1,$C$4<=3),0,1)Check that the index agrees with the selector:
=IFERROR(IF(MATCH($C$3,$B$5:$B$7,0)=$C$4,0,1),1)The second formula returns 1 if the selector is misspelled, missing, or disconnected from the index cell. A master check can combine several checks:
=SUM($J$2:$J$10)Display a warning when this value is not zero. Do not hide these errors with a formula such as =IFERROR(calculation,0) unless zero is genuinely the correct fallback. Masking an error can make a broken scenario switch look valid.
Common layout and reference mistakes
| Mistake | Result | Prevention |
|---|---|---|
| Scenario names and assumption columns use different orders | The model uses the wrong case | Keep one documented order everywhere |
| `MATCH` omits exact matching | A near or approximate match may be returned | Use match type `0` |
| The selector is typed manually | Spelling or extra spaces cause `#N/A` | Use a validation dropdown |
| A live case formula uses relative references | Copying the formula changes the source range | Lock fixed rows and columns with `$` |
| One driver is hardcoded in the model | That driver ignores the scenario switch | Link every scenario-sensitive driver to the live row |
| Validation covers only some input cells | Invalid assumptions enter through uncovered cells | Apply the rule to the complete input range |
A particularly dangerous error is a misaligned CHOOSE formula. If 1 means Base, then the first value after the index must be the Base assumption:
=CHOOSE($C$4,E12,F12,G12)Here, E12 must be Base, F12 Upside, and G12 Downside. Label the columns clearly and test all three cases. Change the selector to each scenario and confirm that the live row changes to the intended values.
Validate assumption inputs
A scenario switch cannot protect the model from unreasonable assumptions. Apply numeric validation to driver cells. For a growth input, a custom rule written for E12 can be:
=AND(ISNUMBER(E12),E12>=-0.5,E12<=1)Apply the rule to the entire scenario input range, not just E12. Configure the alert style as Stop so users cannot continue with invalid entries. Include a message that states the permitted range, such as “Enter a percentage from -50% to 100%.”
Check for blank cells separately when blanks are not allowed. A blank may be treated as zero in one formula and as an error in another, which can produce inconsistent outputs.
CHOOSE, INDEX, and XLOOKUP checks
CHOOSE is transparent and works well when there are only a few fixed scenarios. INDEX is often easier to extend across a contiguous scenario range:
=INDEX($E12:$G12,$C$4)XLOOKUP is useful when the formula should find a scenario by name rather than by position. Whichever method you use, keep the selector, labels, and source data connected. A shorter formula is not safer if its lookup range can drift.
Exercise
The selector displays "Upside", but the live case row shows the Downside growth rate. What should you inspect first?
Show answer
Check the scenario order in the assumptions columns, the exact MATCH result in the index cell, and the order of values in the CHOOSE formula. One of these mappings is misaligned.