How to turn off the “repeat all item label” in pivot activitie?

How to turn off the “repeat all item label” in pivot activities?
Need your help, thanks~

image

@Jason.Li

Welcome to the community

I Believe you cannot do it via activity directly…you need to go with a macro to disable or enable that setting

Sub DisableRepeatAllItemLabelsForPivot(sheetName As String, pivotTableName As String)
    Dim ws As Worksheet
    Dim pt As PivotTable
    Dim pf As PivotField
    
    Set ws = ThisWorkbook.Worksheets(sheetName)
    Set pt = ws.PivotTables(pivotTableName)
        For Each pf In pt.PivotFields
        On Error Resume Next
        pf.RepeatLabels = False
    Next pf
   
End Sub

cheers

1 Like

thanks for your help, record excel macro successfully

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.