Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如果cell.Text以“A”开头,我想按column1过滤multipleColumnRange
rng01.Columns(1).AutoFilter Field:=1, Criteria1:="firstCharacter = 'A'", VisibleDropDown:=False
请问我怎么能这样做?
像这样的东西。
前三行用于我的测试代码。
Dim rng01 As Range Set rng01 = [a1:c10] rng01.Parent.AutoFilterMode = False rng01.Columns(1).AutoFilter Field:=1, Criteria1:="=A*", VisibleDropDown:=False
最简单的方法是使用第 1 列中单词的第一个字符创建一个附加列:
=LEFT(A1,1)
并过滤该新列。