
VBAから
・オートフィルタの条件をクリアして
・全てのデータを表示
する方法を記載します!
前提
シート「sample」の以下の表に対して、
・オートフィルタの条件をクリアして
・全てのデータを表示
をします。

VBAコード
Sub sample()
With Worksheets("sample")
'オートフィルタが設定されている、かつデータが絞り込まれている場合
If .AutoFilterMode And .FilterMode Then
'条件をクリアして全てのデータを表示
.ShowAllData
End If
End With
End Sub
実行結果
オートフィルタの条件がクリアされ、全てのデータが表示されました。
