cool hit counter VBA pivot table filter subroutine_Intefrankly

VBA pivot table filter subroutine


Sub pivot filter(pf, pv, v)

With ActiveSheet.PivotTables("pivot table1").PivotFields(pf)
    .EnableMultiplePageItems = True
    For Each pii In .PivotItems ' Check all to avoid an all-or-nothing error
        pii.Visible = True
    Next
    For Each pii In .PivotItems
        If IsError(Application.Match(pii.Name, pv, 0)) Then
            pii.Visible = Not (v) ' non-existent
        Else
            pii.Visible = v ' presence
        End If
    Next
End With

End Sub

Call example. Call Perspective Screening(" layers", Array("all"), False) ' Check all

Call  Perspective Screening(" storage space code", Array("AA52"), True)

Recommended>>
1、So this is how this little girl learned to program
2、Grand Opening of Chongqing Science and Technology Week 2018 ARIC robotics competition is cool as hell
3、MySQL Compression Solution I
4、Why is visual programming a bad idea
5、Python3 Learning Notes I Basic Syntax

    已推荐到看一看 和朋友分享想法
    最多200字,当前共 发送

    已发送

    朋友将在看一看看到

    确定
    分享你的想法...
    取消

    分享想法到看一看

    确定
    最多200字,当前共

    发送中

    网络异常,请稍后重试

    微信扫一扫
    关注该公众号