CB.ScenarioAnalysisND Example

This example resets the Crystal Ball simulation, and then sets up and runs a scenario analysis as described by comments in the sample code:

CB.ResetND
' Select target forecast in cell B1
CB.ScenarioAnalysisND cbSceChooseTarget, "B1"

' Produce results based on a percentile range
CB.ScenarioAnalysisND cbSceRangeForecastResults, cbSceSelectPercentiles

' Use the range from the 50th percentile to the 75th
CB.ScenarioAnalysisND cbSceSelectPercentiles, 50, 75
' Show only the chart for the target forecast while the tool is running
CB.ScenarioAnalysisND cbSceForeOption, cbSceShowTargetFore
' Run 500 trials
CB.ScenarioAnalysisND cbSceSimTrials, 500
' Include only the target forecast in the results
CB.ScenarioAnalysisND cbSceIncludeNonTargetFore, False
' Run the tool
CB.ScenarioAnalysisND cbSceRun