Excel 2013 VBA Clear All Filters macro Excel 2013 VBA Clear All Filters macro vba vba

Excel 2013 VBA Clear All Filters macro


Try this:

If ActiveSheet.AutoFilterMode Then ActiveSheet.ShowAllData


ShowAllData will throw an error if a filter isn't currently applied. This will work:

Sub ResetFilters()    On Error Resume Next    ActiveSheet.ShowAllDataEnd Sub


If the sheet already has a filter on it then:

Sub Macro1()    Cells.AutoFilterEnd Sub

will remove it.