SummaryColumn Property

Microsoft Excel Visual Basic

SummaryColumn Property

       

Returns or sets the location of the summary columns in the outline.   Read/write XlSummaryColumn.

XlSummaryColumn can be one of these XlSummaryColumn constants.
xlSummaryOnRight. The summary column will be positioned to the right of the detail columns in the outline.
xlSummaryOnLeft. The summary column will be positioned to the left of the detail columns in the outline.

expression.SummaryColumn

expression   Required. An expression that returns one of the objects in the Applies To list.

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.

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