Share via


Scenarios.CreateSummary Method (Excel)

Creates a new worksheet that contains a summary report for the scenarios on the specified worksheet. Variant.

Syntax

expression .CreateSummary(ReportType, ResultCells)

expression A variable that represents a Scenarios object.

Parameters

Name

Required/Optional

Data Type

Description

ReportType

Optional

XlSummaryReportType

Specifies whether the summary report is a PivotTable or standard summary.

ResultCells

Optional

Variant

A Range object that represents the result cells on the specified worksheet. Normally, this range refers to one or more cells containing the formulas that depend on the changing cell values for your model — that is, the cells that show the results of a particular scenario. If this argument is omitted, there are no result cells included in the report.

Return Value

Variant

Example

This example creates a summary of the scenarios on Sheet1, with result cells in the range C4:C9 on Sheet1.

Worksheets("Sheet1").Scenarios.CreateSummary _ 
 ResultCells := Worksheets("Sheet1").Range("C4:C9")

See Also

Concepts

Scenarios Object Members

Scenarios Object