• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 50
  • 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

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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