如何通过单元格中的第一个字符过滤范围? [英] How to filter a range by first Character in a cell?
本文介绍了如何通过单元格中的第一个字符过滤范围?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如果cell.Text以A开头,我想通过column1过滤一个multipleColumnRange。
I want to filter a multipleColumnRange by column1 if a cell.Text starts with "A"
rng01.Columns(1).AutoFilter Field:=1, Criteria1:="firstCharacter = 'A'", VisibleDropDown:=False
<
How could I do this, pls ?
推荐答案
这样的事情
前三行用于我的测试代码。
The first three lines were used for my test code.
Dim rng01 As Range
Set rng01 = [a1:c10]
rng01.Parent.AutoFilterMode = False
rng01.Columns(1).AutoFilter Field:=1, Criteria1:="=A*", VisibleDropDown:=False
这篇关于如何通过单元格中的第一个字符过滤范围?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文