Solved

How to sum several pivot table values instantly

Posted on 2016-10-26
2
20 Views
Last Modified: 2016-10-26
Dear experts,

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

Thank you.
0
Comment
Question by:Leonardo M
2 Comments
 
LVL 5

Accepted Solution

by:
Yamaafg earned 500 total points
ID: 41859880
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
 

Author Comment

by:Leonardo M
ID: 41859881
Thank you, worked perfect!
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Improved? Move/Copy Add-in Replacement - How to avoid the annoying, “A formula or sheet you want to move or copy contains the name XXX, which already exists on the destination worksheet.” David Miller (dlmille)  It was one of those days… I wa…
Workbook link problems after copying tabs to a new workbook? David Miller (dlmille) Intro Have you either copied sheets to a new workbook, and after having saved and opened that workbook, you find that there are links back to the original sou…
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now