XLA routines: EE_PivotRemoveTotals

Nick's picture
EE_PivotRemoveTotals is a simple routine that removes the totals from a pivot
Sub EE_PivotRemoveTotals(Optional pt As PivotTable)
'http://excelexperts.com/xla-routines-eePivotRemoveTotals  for updates on this routine
    If pt Is Nothing Then
        If ActiveSheet.PivotTables.Count = 0 Then Exit Sub
        Set pt = ActiveSheet.PivotTables(1)
    End If
 
    pt.RowGrand = False
    pt.ColumnGrand = False
End Sub