gpt4 book ai didi

excel - 删除由变量设置的自动过滤器

转载 作者:行者123 更新时间:2023-12-04 21:03:58 24 4
gpt4 key购买 nike

我在删除由变量设置的自动过滤器时遇到了一些麻烦。我已经尝试了所有我能想到/在网上找到的东西。似乎没有什么可以删除它。有什么建议么?

Dim CashRange As Range
Set CashRange = Range("L2:L50000")
CashRange.AutoFilter 1, "CASH"
CashLabeledRows = ActiveSheet.AutoFilter.Range.Columns(1).SpecialCells(xlCellTypeVisible).Count - 1
CashRange.Parent.AutoFilter.Range.Cells.Interior.ColorIndex = 6
CashRange.Parent.AutoFilterMode = False

最佳答案

看看这个例子,也许它们会有所帮助。

If ActiveSheet.FilterMode = True Then 'checks if there are any filters turned on!?
If ActiveSheet.AutoFilterMode = True Then 'if there are filters at all(what so ever)
ActiveSheet.ShowAllData 'Turns off all filters(select all), but not remove them

这不是序列码,每一行都是为了它自己。但它可以相互结合。

关于excel - 删除由变量设置的自动过滤器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29289380/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com