Model Definition
Defining a model for What-If analysis involves identifying the outputs to analyze and the inputs that influence them, directly or indirectly.
Define Outputs
An output is a cell on which you want to run a What-If analysis.
An Output definition is required to start any What-If Analysis. Select a cell or range of cells and use the Output button in the @RISK ribbon to define which variables you want to analyze. See the Output Menu for a complete explanation of all the Output functionality in What-If Analysis and @RISK.
Outputs are also evaluated in a Multi-Way What-If analysis. In this case, a ranking of how combinations of inputs affect the output is generated.
Define Inputs
Inputs can be manually identified for two types of What-If analyses: One-Way and Multi-Way. In a One-Way What-If analysis, each input is varied independently while all others remain fixed, allowing you to measure the individual impact of each variable on selected outputs. In contrast, a Multi-Way What-If analysis evaluates how input combinations influence outputs by simultaneously varying multiple variables across all possible value sets.
At a minimum, each input is defined by three values: a base value (the one initially present in the model), its possible downside (negative) change, and its possible upside (positive) change.
Automatic Input Definition
What-If Analysis offers three ways to define inputs using RiskAutoVary functions automatically. This allows a quick setting up of input variables without manually editing formulas.
-
Auto-Assign Inputs via Ribbon Menu
-
When you click What-If → Auto-Assign Inputs, What-If analysis scans your spreadsheet for cells that influence the already defined outputs.
-
It automatically inserts RiskAutoVary(base, min, max) functions into formulas where constants are detected.
-
The default variation (e.g., ±10%) and types of constants to include (stand-alone, embedded, function arguments) are determined by the settings under Settings.
-
-
Auto-Detection When Starting a What-If Analysis
-
If the option "Scan Precedents Cells to find Inputs when What-If Analysis Starts" is enabled in the settings:
-
As soon as you click Start in the What-If menu, What-If Analysis temporarily assigns RiskAutoVary functions to inputs affecting the selected outputs.
-
These functions use the default variation settings, allowing a What-If run without altering the underlying model.
-
Once the analysis ends, the inputs are removed, restoring the original formulas.
-
-
Auto-Detection When Outputs Are Added:
If the option "Scan Precedents Cells to find Inputs when Outputs are Added" is enabled in the Settings. What-If Analysis automatically scans for precedent cells and inserts RiskAutoVary functions when you define a new output.
The inputs remain in the spreadsheet until manually removed, allowing you to refine or review them before analysis.
To remove RiskAutoVary functions use the ‘Remove Auto-Assigned Inputs’ from the What-If Analysis menu
Manual Input Definition
Input can be manually added using the Function and Distribution menus. This approach gives complete control over which variables are analyzed and how they are varied.
Before adding any distribution functions:
-
Review your model to determine which constants or assumptions directly influence key outputs (e.g., prices, cost drivers, demand forecasts).
-
These variables can be cell values, constants embedded in formulas, or function arguments.
-
Manually add inputs through the Function Menu
Use the Function Menu > What-If Analysis section on the @RISK ribbon to select the appropriate What-If functions for each selected input.
-
RiskVary
The standard function to define variation based on a base case and percentage or absolute range.
-
RiskVary(100,-10,+10), indicating a base case of 100 and a possible -10% and +10% change.
-
RiskVary(50,-45,+10), indicating a base case of 50 and a possible -45% and +10% change.
See the function help
-
-
RiskVaryTable
Use when you want to evaluate a specific list of values for the input. Alternatively, you can also enter the table of values directly in the function itself. (link to particular function page).
-
RiskVaryTable(100, G1:G50), where fifty values located in the range G1:G50 are successively returned by the RiskVaryTable function during the What-If analysis, and new output values are calculated for each.
-
RiskVaryTable(42,{40,42,44,46,48}), where five different values (even integers from 40 to 48) are successively returned by the RiskVaryTable function during the What-If analysis and new output values are calculated for each.
See the function help
-
To run a multi-way analysis, use the following functions for at least one input of your model.
-
RiskVaryMulti: This works like RiskVary but flags the input for inclusion in a Multi-Way What-If analysis
-
RiskVaryMultiTable: It is the Multi-Way version of a value table input - RiskVaryTable
-
-
Manually add inputs through the Distribution Menu
If you prefer to use @RISK functions like RiskNormal or RiskPert, you can add them from the Define Distribution Window, and they will be recognized in the What if analysis.
To run a Multi-Way analysis, you can turn on the Multi-Way Advanced distribution option for any @RISK function.