• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 54
  • 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.
Leonardo M
Leonardo M
1 Solution

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
Leonardo MAuthor Commented:
Thank you, worked perfect!
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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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