• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Change Show Value As for Multiple Columns at Once in Pivot Tables

sweisan

New Member
As the title states, is this possible? I googled pretty much the same terms as the subject title and was unable to find anything close to my issue. I have around 20 columns and wanting to show total as percentage of column and it's cumbersome to do one column at a time. Any suggestions?
 
Would a macro work for you? You'll need to change the fields as appropriate to match your exact PivotTable name and field columns, but it should work. Loops through all the data fields.

[pre]
Code:
Sub ChangeAll()

For Each pf In ActiveSheet.PivotTables("PivotTable2").DataFields
With pf
.Calculation = xlPercentOf
.BaseField = "Score"
.BaseItem = "5"
.NumberFormat = "0.00%"
End With
Next
End Sub
[/pre]
 
Back
Top