View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
BrianB BrianB is offline
external usenet poster
 
Posts: 109
Default 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/