1

I currently have a code which searches an AutoFilter, but searches it for exactly what I put within the quotations.

ActiveSheet.Range(Selection, Selection.End(xlUp)).AutoFilter Field:=5, Criteria1:="CLO "

What I need is a code which will search the filter for the word say "CLO " within each line. So say there's a line which says "CLO has been booked..." I want that to come up in the search. Currently, my search is returning no results since it is searching specifically for "CLO ".

4

1 回答 1

3

使用以下内容更新您的代码

ActiveSheet.Range(Selection, Selection.End(xlUp)).AutoFilter _
    Field:=5, Criteria1:="CLO *"

*表示只要文本以“CLO”开头,就会返回该行,而不管它后面的文本。

于 2013-07-29T20:00:33.690 回答