LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default Hide Zeros in Pivot Tabel

I borrowed this code from a Debra Dalgleish post a while back and have
gotten much use from it. However, I am trying to use it in another macro and
I am not able to get it to do anything. It runs without errors but it does
not actually do anything. My pivot tabel isn't complicated by pivot table
standards. I have one item in the row field, no column items and three data
items. One of the data items is a calcualted field called Diff. It just
subtracts the first data item from the second. I am trying to get the macro
to go down the values in the Diff field and when it finds a zero then it
will hide that pivot item.

Does anyone have any suggestions?

Thanks,

Roger



Sub Hide_zeros()
Dim pvtitm As PivotItem
For Each pvtitm In
ActiveSheet.PivotTables(1).PivotFields("Diff").Piv otItems
If Application.Sum(pvtitm.DataRange) = 0 Then: pvtitm.Visible = False
Next pvtitm
End Sub


 
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
default pivot tabel from count to sum zeiny Excel Discussion (Misc queries) 1 February 23rd 10 04:32 PM
Pivot tabel formulas Carl Excel Discussion (Misc queries) 1 February 19th 10 11:11 AM
Can Pivot tabel be linked to multi-tabs? yhoy Excel Discussion (Misc queries) 1 December 12th 08 09:38 PM
hide zeros on pivot table Marcelo Excel Worksheet Functions 2 March 12th 08 07:19 PM
Cum fac subtotaluri intr-ul Pivot Tabel? Theo Excel Discussion (Misc queries) 0 July 19th 07 10:16 AM


All times are GMT +1. The time now is 10:07 AM.

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"