![]() |
| FREE Excel STUFF |
|
Search |
| Excel Help. Popular |
| NEW! Multiple Excel Search & Links |
| Excel Formulas |
| Excel Macros |
| Excel Newsletter |
| PRODUCTS |
| Up to $139.00 FREE! |
|
Categories & Search |
| Excel Templates |
| Excel Add-ins |
| Excel Training |
| More.... |
| OTHER |
| Excel Development |
|
|
NEW! More Books.. |
Add Excel Answers & Search To Your Google Toolbar Details |
Current Special! Complete
Excel Excel Training
Course for Excel 97 - Excel 2003, only $145.00. $59.95 Instant
Buy/Download, 30 Day Money Back Guarantee
& Free Excel Help for LIFE!
See Also: Hide/Show Pivot Table Field Items by Criteria || Excel Pivot Tables || Hide/Show Pivot Table Fields || Refresh Pivot Table via Excel Macros || Excel Subtotals || Making the SUBTOTAL Function Dynamic || Bold Excel Subtotals Automatically || Sum Every Nth Cell || Count of Each Item in a List || Grouping Pivot Tables Problems
Hide/Show Pivot Table Field Items
Those of you that use
Pivot Tables
will be well aware of their power. Lets look at how we can use Excel VBA to
show or hide Pivot Table Field Items. The Excel macro below should
give you a good idea how this can be done.
Sub HideShowFields()
Dim pt As PivotTable
Dim pi As PivotItem
Set pt = ActiveSheet.PivotTables("MyPivot")
'Speeds up code dramatically
pt.ManualUpdate = True
For Each pi In pt.PivotFields("Head1").PivotItems
'+0 Forces text number value to real number
Select Case pi.Value + 0
Case 1 To 5
pi.Visible = False
Case Else
pi.Visible = True
End Select
Next pi
pt.ManualUpdate = False
End Sub
Excel Dashboard Reports & Excel Dashboard Charts 50% Off
Special! Free Choice of Complete Excel Training Course OR Excel Add-ins Collection on all purchases totaling over $64.00. ALL purchases totaling over $150.00 gets you BOTH! Purchases MUST be made via this site. Send payment proof to special@ozgrid.com 31 days after purchase date.
Instant Download and Money Back Guarantee on Most Software
Excel Trader Package Technical Analysis in Excel With $139.00 of FREE software!
Microsoft ® and Microsoft Excel ® are registered trademarks of Microsoft Corporation. OzGrid is in no way associated with Microsoft