The Formula Bar

The Formula Bar displays the selected cell's formula, including any @RISK functions that have been, or will be, inserted into the cell. Changes to the configuration of a distribution will be reflected in the Formula Bar as those changes are made. In addition to displaying the cell's contents, the Formula Bar has two buttons to the far right.

  • Edit Formula - Click this button to manually edit the formula for the selected cell. See Editing Formulas below for more information.
  • Validate Formula -The Edit Formula button becomes the Validate Formula button when manually editing. After editing is complete, click this button or press Enter to validate the new formula and return to the main Define Distribution window.
  • Cancel Editing - This button will only appear when editing a formula. Click Cancel or press Esc to cancel all changes.
  • Formula Tools - This button opens a menu that includes options for the distribution or distributions in the current cell. Those options are:
    • Replace Selection with Distribution in Cell - Replace the currently selected formula text with a distribution from another cell on the same worksheet only.
    • Append Distribution to Formula - Add a distribution to the current formula. Multiple distribution functions can be combined into a single formula, or a distribution can be combined with other values or Excel functions. See Advanced Distributions for more information.
    • Remove Selected Distribution - Remove a distribution from the cell; for cells with multiple distribution functions, only the function highlighted in the formula will be removed, whereas cells with a single distribution function will replace the function with either the expected value of the distribution or the value set in the Static Value parameter.

When working with complex formulas that involve more than one @RISK function inside a single cell, the Define Distribution window will only display the configuration for the selected distribution; the selected distribution will be highlighted in the Formula Bar.

To view or edit the configuration for a different distribution function, click the function name in the Formula bar.

Editing Formulas

Primarily, editing of the function is done through the Configuration Panel; however, it is also possible to edit the formula manually. Manual editing of a formula can be done in two ways. The first is to start typing; new input will be inserted where the cursor is located. The second method is to click inside the Formula Bar and use the left or right arrows on the keyboard to set the cursor position and begin editing.

If a distribution function is highlighted in the Formula Bar, it will be overwritten when typing!

After editing a formula, hit Enter or use the Validate Formula button ( ) to check the syntax. If the formula is valid, @RISK will return to the Define Distribution window. If the formula is not valid, a warning prompt will open; clicking Yes will return to editing mode, and clicking No will discard all changes.