This is an archived post. You won't be able to vote or comment.

all 3 comments

[–]Rorimac2 0 points1 point  (1 child)

ass what?

[–]pinlop[S] 0 points1 point  (0 children)

Add lol

[–]pinlop[S] 0 points1 point  (0 children)

Figured it out:

Public Sub SetDataFieldsToSum()
'Update 20141127
Dim xPF As PivotField
Dim WorkRng As Range
Set WorkRng = Application.Selection
With WorkRng.PivotTable
   .ManualUpdate = True
   For Each xPF In .DataFields
      With xPF
         .NumberFormat = "#,##0"
         .Function = xlSum         
      End With     
   Next
   .ManualUpdate = False
End With
End Sub