Sub filter_pivot()

Application.ScreenUpdating = False
Application.EnableEvents = False

Dim pi1 As PivotItem
For Each pi1 In
Sheets(2).PivotTables("PivotTable1").PivotFields("Grade").PivotItems
If pi1.Value = 3 Then
        pi1.Visible = True

      Else
      On Error Resume Next
     pi1.Visible = False
    End If
   Next pi1
Application.ScreenUpdating = True
Application.EnableEvents = True
End Sub




On Wed, May 25, 2011 at 4:45 PM, Chandra Shekar <
chandrashekarb....@gmail.com> wrote:

> Hi Asish,
>
> Please find attached excel file. I have given instruction in the macro
> itself. Thanks!
>
> Regards,
>
> Chandra Shekar B
>
> On Wed, May 25, 2011 at 4:02 PM, ashish koul <koul.ash...@gmail.com>wrote:
>
>> can you attch the worksheet
>>
>> On Wed, May 25, 2011 at 11:55 AM, Chandra Shekar <
>> chandrashekarb....@gmail.com> wrote:
>>
>>> Hi,
>>>
>>> Any help regarding this. Thanks!!!.
>>>
>>> Regards,
>>>
>>> Chandra Shekar B
>>>
>>>   On Tue, May 24, 2011 at 6:37 PM, Chandra Shekar <
>>> chandrashekarb....@gmail.com> wrote:
>>>
>>>> Hi,
>>>>
>>>> How to extract data from a pivot item. In the example I need pivot
>>>> items(1) data in the same worksheet. Thanks!
>>>>
>>>> With pvt_tbl
>>>>     pvt_tbl.PivotFields("Priority").PivotItems(1).Visible = True
>>>>     pvt_tbl.PivotFields("Priority").PivotItems(2).Visible = False
>>>>     pvt_tbl.PivotFields("Priority").PivotItems(3).Visible = False
>>>>     pvt_tbl.PivotFields("Priority").PivotItems(4).Visible = False
>>>> End With
>>>>
>>>> --
>>>>
>>>> ----------------------------------------------------------------------------------
>>>> Some important links for excel users:
>>>> 1. Follow us on TWITTER for tips tricks and links :
>>>> http://twitter.com/exceldailytip
>>>> 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
>>>> 3. Excel tutorials at http://www.excel-macros.blogspot.com
>>>> 4. Learn VBA Macros at http://www.quickvba.blogspot.com
>>>> 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
>>>>
>>>> To post to this group, send email to excel-macros@googlegroups.com
>>>>
>>>> <><><><><><><><><><><><><><><><><><><><><><>
>>>> Like our page on facebook , Just follow below link
>>>> http://www.facebook.com/discussexcel
>>>>
>>>
>>> --
>>>
>>> ----------------------------------------------------------------------------------
>>> Some important links for excel users:
>>> 1. Follow us on TWITTER for tips tricks and links :
>>> http://twitter.com/exceldailytip
>>> 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
>>> 3. Excel tutorials at http://www.excel-macros.blogspot.com
>>> 4. Learn VBA Macros at http://www.quickvba.blogspot.com
>>> 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
>>>
>>> To post to this group, send email to excel-macros@googlegroups.com
>>>
>>> <><><><><><><><><><><><><><><><><><><><><><>
>>> Like our page on facebook , Just follow below link
>>> http://www.facebook.com/discussexcel
>>>
>>
>>
>>
>> --
>> *Regards*
>> * *
>> *Ashish Koul*
>> *akoul*.*blogspot*.com <http://akoul.blogspot.com/>
>> http://akoul.posterous.com/
>>  *akoul*.wordpress.com <http://akoul.wordpress.com/>
>> My Linkedin Profile <http://in.linkedin.com/pub/ashish-koul/10/400/830>
>>
>>
>> P Before printing, think about the environment.
>>
>>
>> --
>>
>> ----------------------------------------------------------------------------------
>> Some important links for excel users:
>> 1. Follow us on TWITTER for tips tricks and links :
>> http://twitter.com/exceldailytip
>> 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
>> 3. Excel tutorials at http://www.excel-macros.blogspot.com
>> 4. Learn VBA Macros at http://www.quickvba.blogspot.com
>> 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
>>
>> To post to this group, send email to excel-macros@googlegroups.com
>>
>> <><><><><><><><><><><><><><><><><><><><><><>
>> Like our page on facebook , Just follow below link
>> http://www.facebook.com/discussexcel
>>
>
>  --
>
> ----------------------------------------------------------------------------------
> Some important links for excel users:
> 1. Follow us on TWITTER for tips tricks and links :
> http://twitter.com/exceldailytip
> 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
> 3. Excel tutorials at http://www.excel-macros.blogspot.com
> 4. Learn VBA Macros at http://www.quickvba.blogspot.com
> 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
>
> To post to this group, send email to excel-macros@googlegroups.com
>
> <><><><><><><><><><><><><><><><><><><><><><>
> Like our page on facebook , Just follow below link
> http://www.facebook.com/discussexcel
>



-- 
*Regards*
* *
*Ashish Koul*
*akoul*.*blogspot*.com <http://akoul.blogspot.com/>
http://akoul.posterous.com/
*akoul*.wordpress.com <http://akoul.wordpress.com/>
My Linkedin Profile <http://in.linkedin.com/pub/ashish-koul/10/400/830>


P Before printing, think about the environment.

-- 
----------------------------------------------------------------------------------
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links : 
http://twitter.com/exceldailytip
2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 
To post to this group, send email to excel-macros@googlegroups.com

<><><><><><><><><><><><><><><><><><><><><><>
Like our page on facebook , Just follow below link
http://www.facebook.com/discussexcel

Reply via email to