Excel筛选器在两个值之间的转换(快速) [英] Excel filter pivot between two values (fast)

查看:87
本文介绍了Excel筛选器在两个值之间的转换(快速)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想根据一个字段("QTD帐单百分比")进行过滤,以获取0,3 <使用VBA的"QTD帐单百分比"< 0.35:

I want to filter according to a field ("QTD bill %") to get all values for which 0,3< "QTD bill %" <0,35 with VBA :

Sub Macro2()
Dim pvtF As PivotField
Dim pvtI As PivotItem

Set pvtF = Worksheets("Sheet2").PivotTables(1).PivotFields("QTD bill %")
For Each pvtI In pvtF.PivotItems
    If pvtI > "0.3" And pvtI < "0.35" Then
        pvtI.Visible = True
    Else
        pvtI.Visible = False
    End If
Next pvtI

End Sub

但是当我运行代码时,它需要> 1分钟!!!

But when I run the code it takes >1min!!!

如何快速在两个值之间过滤?

How can I filter between two values fast?

请帮帮我!!谢谢

推荐答案

您需要从在另一个非Values PivotField上看到的下拉菜单中选择"Values filter"选项,以过滤VALUES中的任何字段区域.

You need to select the "Values filter" option from one of the dropdowns you see on the other non-Values PivotField to filter any fields that are in the VALUES area.

请参阅我写的这本书的屏幕截图,该屏幕截图说明了这一点:

See this screenshot from the book I'm writing that illustrates this:

这篇关于Excel筛选器在两个值之间的转换(快速)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆