Palisade Knowledge Base

HomeTechniques and Tips@RISK Simulation: Graphical ResultsAutomatic Overlays from Multiple Worksheets

7.27. Automatic Overlays from Multiple Worksheets

Applies to: @RISK for Excel 5.x–7.x

I want to have several inputs or outputs overlaid on one graph, to be displayed automatically at the end of a simulation. How can I do it?

You can embed overlay graphs in your worksheet with the RiskResultsGraph( ) function. The graphs will be updated automatically when you run a simulation, and the latest versions will be stored with your workbook even if you don't store simulation results. Please download the attached example (about 130 KB).

To pull together multiple distributions in one overlaid graph, you need a contiguous set of cells (row or column), defined as an output range with a common name. If the cells you want to graph are in different parts of a worksheet, or even in different worksheets, you can create a range of contiguous cells that are set equal to the cells you actually want to graph, and then designate the range as an @RISK output. The example has four such ranges, in column C.

Some additional points about this example:

An alternative is available in @RISK Professional and Industrial releases 6.2 and newer, if you're willing to use Visual Basic for Applications. The GraphDistribution method takes an Array-type argument that lets you specify non-contiguous cells for overlays. The Automation Guide, in the Help » Developer Kit (XDK) menu, introduces you to VBA programming and gives a couple of examples of that function; complete documentation is in the @RISK XDK Reference in the same menu.

Last edited: 2015-07-14


This page was: Helpful | Not Helpful