
VBAから
・オートフィルタの設定
・ワイルドカードを使用して条件を絞り込み
をする方法を記載します!
前提
シート「sample」の以下の表に対して、
・オートフィルタの設定
・ワイルドカードを使用して条件を絞り込み
をします。

条件「~で始まる」で絞り込む
ここでは例として、
・オートフィルタの設定と表の3列目「住所」を
・「神奈川で始まる」で絞り込み
をします。
Sub sample()
'オートフィルタの設定と表の3列目「住所」を「神奈川*」で絞り込み
Worksheets("sample").Range("B2").AutoFilter field:=3, _
Criteria1:="神奈川*"
End Sub
上記を実行すると、以下になります。

条件「~で終わる」で絞り込む
ここでは例として、
・オートフィルタの設定と表の3列目「住所」を
・「区で終わる」で絞り込み
をします。
Sub sample()
'オートフィルタの設定と表の3列目「住所」を「*区」で絞り込み
Worksheets("sample").Range("B2").AutoFilter field:=3, _
Criteria1:="*区"
End Sub
上記を実行すると、以下になります。

条件「~を含む」で絞り込む
ここでは例として、
・オートフィルタの設定と表の3列目「住所」を
・「新宿を含む」で絞り込み
をします。
Sub sample()
'オートフィルタの設定と表の3列目「住所」を「*新宿*」で絞り込み
Worksheets("sample").Range("B2").AutoFilter field:=3, _
Criteria1:="*新宿*"
End Sub
上記を実行すると、以下になります。

条件「~を含まない」で絞り込む
ここでは例として、
・オートフィルタの設定と表の3列目「住所」を
・「新宿を含まない」で絞り込み
をします
Sub sample()
'オートフィルタの設定と表の3列目「住所」を「<>*新宿*」で絞り込み
Worksheets("sample").Range("B2").AutoFilter field:=3, _
Criteria1:="<>*新宿*"
End Sub
上記を実行すると、以下になります。
