Hi, Could anyone give me an idea as to how I might set up a macro that turns on certain filters in my Pivot Table. I have some Pivot Items that can be either C, L, O or P, (reflecting status of Work Orders). As the program progresses, not all of these will show up in my pivot table, because when a program is complete all of them will go to "L" (for Locked). However, I need the filters to work to show only those statuses that are "C" and "L". If I run my macro and there are no more Work Orders with the status of "P" (Planned), then I get an error message when the macro gets to this point. Basically, I need to only see those Work Orders that are at "L" and "C". If there are no more at status "C", then all I need to see is "L". Any assistance on this would be greatly appreciated.
Regards, Steve Sheets("Pivot Table Task Compl-Lkd").Select ActiveSheet.PivotTables("PivotTable1").PivotFields("Sts").CurrentPage = "(All)" With ActiveSheet.PivotTables("PivotTable1").PivotFields("Sts") .PivotItems("O").Visible = False .PivotItems("P").Visible = False End With --~--~---------~--~----~------------~-------~--~----~ ------------------------------------------------------------------------------------- Some important links for excel users: 1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at http://www.excelitems.com 2. Excel tutorials at http://www.excel-macros.blogspot.com 3. Learn VBA Macros at http://www.vbamacros.blogspot.com 4. Excel Tips and Tricks at http://exceldailytip.blogspot.com To post to this group, send email to excel-macros@googlegroups.com If you find any spam message in the group, please send an email to: Ayush Jain @ jainayus...@gmail.com or Ashish Jain @ 26may.1...@gmail.com ------------------------------------------------------------------------------------- -~----------~----~----~----~------~----~------~--~---