CreateSummary Method

Description

Creates a new worksheet containing a summary report for the scenarios on the specified worksheet.

Syntax

object.CreateSummary(reportType, resultCells)

object

Required. The Scenarios collection object.

reportType

Optional. Specifies the report type (either xlStandardSummary or xlPivotTable). If this argument is omitted, a standard report is created.

resultCells

Optional. A range containing 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, no result cells are included in the report.

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")