• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 55
  • Last Modified:

How to sum several pivot table values instantly

Dear experts,

Please advise what is the easiest way to sum instantly a pivot table with several columns in value field.

Thank you.
0
Leonardo M
Asked:
Leonardo M
1 Solution
 
YamaafgCommented:
Hi,

One way to do it is using VBA.

Try below vba:

Public Sub PivotFieldsToSum()
 
Dim ptf As PivotField
With Selection.PivotTable
.ManualUpdate = True
For Each ptf In .DataFields
With ptf
.Function = xlSum
.NumberFormat = "#,##0"
End With
Next ptf
.ManualUpdate = False
End With
End Sub
0
 
Leonardo MAuthor Commented:
Thank you, worked perfect!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now