Share via


Outline.SummaryRow Property

Excel Developer Reference

Returns or sets the location of the summary rows in the outline. Read/write XlSummaryRow.

Syntax

expression.SummaryRow

expression   A variable that represents an Outline object.

Remarks

XlSummaryRow can be one of these XlSummaryRow constants.
xlSummaryBelow The summary row will be positioned below the detail rows in the outline.
xlSummaryAbove The summary row will be positioned above the detail rows in the outline.

Set XlSummaryRow to xlAbove for Microsoft Word-style outlines, where category headers are above the detailed information. Set XlSummaryRow to xlBelow for accounting-style outlines, where summations are below the detailed information.

Example

This example creates an outline with automatic styles, with the summary row above the detail rows, and with the summary column to the right of the detail columns.

Visual Basic for Applications
  Worksheets("Sheet1").Activate
Selection.AutoOutline
With ActiveSheet.Outline
    .SummaryRow = xlAbove
    .SummaryColumn = xlRight
    .AutomaticStyles = True
End With

See Also