![]() |
Auto Hide Pivot Table Items
Hi ya all...
I want to automatically hide line items in a pivot table base on a comparision. Lets start with a simple pivot table of jobs and sales$. Can someone help me with a macro which will select all jobs whose sales are below a certain amount and hide these jobs automatically? Thanks much...you guys rock! ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~ View and post usenet messages directly from http://www.ExcelForum.com/ |
Auto Hide Pivot Table Items
'------------------------------------------------------
Sub test() Dim StartRow As Long Dim LastRow As Long Dim ValueColumn As Integer Dim CheckValue As Double '------------------------------ CheckValue = 1000000 ValueColumn = 4 StartRow = 6 LastRow = ActiveSheet.Cells(65536, ValueColumn).End(xlUp).Row - 1 '-- main loop For rw = StartRow To LastRow If ActiveSheet.Cells(rw, ValueColumn).Value < CheckValue Then ActiveSheet.Rows(rw).EntireRow.Hidden = True End If Next End Sub '-- eop ------------------------------------------------ Regards BrianB ================================================== ====== lpolliard wrote in message ... Hi ya all... I want to automatically hide line items in a pivot table base on a comparision. Lets start with a simple pivot table of jobs and sales$. Can someone help me with a macro which will select all jobs whose sales are below a certain amount and hide these jobs automatically? Thanks much...you guys rock! ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~ View and post usenet messages directly from http://www.ExcelForum.com/ |
All times are GMT +1. The time now is 05:14 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com