Skip to content

Latest commit

 

History

History
49 lines (30 loc) · 1.54 KB

Excel.CubeField.LayoutSubtotalLocation.md

File metadata and controls

49 lines (30 loc) · 1.54 KB
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
CubeField.LayoutSubtotalLocation property (Excel)
vbaxl10.chm668091
vbaxl10.chm668091
Excel.CubeField.LayoutSubtotalLocation
b4388c3a-d9e1-47b8-9a4c-f94b29712ff1
04/23/2019
medium

CubeField.LayoutSubtotalLocation property (Excel)

Returns or sets the position of the PivotTable field subtotals in relation to (either above or below) the specified field. Read/write XlSubtotalLocationType.

Syntax

expression.LayoutSubtotalLocation

expression A variable that represents a CubeField object.

Remarks

You can set this property for any PivotTable field in outline format; however, the formatting appears only if the specified field is a row field other than the innermost (lowest level) row field.

For non-OLAP data sources, the value of this property doesn't change when the field is rearranged or when it is added to or removed from the report.

The LayoutForm property determines whether the report appears in table format or in outline format.

Example

This example displays the state field in the first PivotTable report on the active worksheet in outline format, and it displays the subtotals at the top of the field.

With ActiveSheet.PivotTables("PivotTable1") _ 
 .PivotFields("state") 
 .LayoutForm = xlOutline 
 .LayoutSubtotalLocation = xlAtTop 
End With

[!includeSupport and feedback]