Question : excel pivot add all field in row
Answered by : open-oystercatcher-av7c2egeyetk
Sub AddAllFieldsValues()
'Update 20141112 Dim pt As PivotTable Dim I As Long For Each pt In ActiveSheet.PivotTables For I = 1 To pt.PivotFields.Count With pt.PivotFields(I) If .Orientation = 0 Then .Orientation = xlDataField End With Next Next
End Sub
Source : https://www.extendoffice.com/documents/excel/2246-excel-pivot-table-add-multiple-fields.html | Last Update : Tue, 02 Feb 21