Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
default pivot tabel from count to sum | Excel Discussion (Misc queries) | |||
Pivot tabel formulas | Excel Discussion (Misc queries) | |||
Can Pivot tabel be linked to multi-tabs? | Excel Discussion (Misc queries) | |||
hide zeros on pivot table | Excel Worksheet Functions | |||
Cum fac subtotaluri intr-ul Pivot Tabel? | Excel Discussion (Misc queries) |