LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Getting correct labels in Excel pivot

Hi Claus,

Thanks for your reply. It worked for me perfectly.

Thanks a lot,

Greetings,

Roger


Op zondag 29 december 2013 16:32:27 UTC+1 schreef Claus Busch:
Hi Roger,



Am Sun, 29 Dec 2013 06:27:28 -0800 (PST) schrieb RogerH72:



However the labels in the pivot still implicate the wrong aggregation, namely sum of item in stead of average of item.




Is there any way to get the correct labels in the pivots using VBA?




try:



Sub Test()

Dim wsh As Worksheet

Dim pt As PivotTable

Dim ptf As PivotField



For Each wsh In Worksheets

For Each pt In wsh.PivotTables

For Each ptf In pt.DataFields

ptf.Function = xlAverage

ptf.Caption = Replace(ptf.Caption, "Sum", "Average")

Next

Next

Next

End Sub





Regards

Claus B.

--

Win XP PRof SP2 / Vista Ultimate SP2

Office 2003 SP2 /2007 Ultimate SP2


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
excel 07 not displaying all Pivot Table x-axis labels curve_ball Charts and Charting in Excel 0 July 21st 08 08:45 PM
How do I repeat labels in Excel for a pivot table field? sonya Excel Discussion (Misc queries) 3 July 1st 08 09:55 PM
Excel 2002: Can Pivot Table show headings beside the row labels ? Mr. Low Excel Discussion (Misc queries) 2 September 27th 07 03:57 PM
excel graphs data labels in Pivot tables Rosa Campos Charts and Charting in Excel 0 May 9th 06 07:55 PM
Chart data labels are not correct or not displayed Bolton User Charts and Charting in Excel 3 April 11th 06 05:24 PM


All times are GMT +1. The time now is 07:08 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"