Forum Discussion
claym
Feb 22, 2019Copper Contributor
Button for reset all filters
Hi, First of all I am not at good at this but I looking for a way to use a button to reset all the filters I have. To use one button instead of clear all the filters separately would be great as it...
JundiyaAlHaqiqi
May 25, 2025Brass Contributor
Paste the following VBA code:
Sub ClearFilters()
On Error Resume Next ' Ignore errors if no filters are applied
ActiveSheet.AutoFilter.ShowAllData
On Error GoTo 0 ' Reset error handling
End Sub
This macro clears all filters in the active worksheet. If no filters are applied, it won’t throw an error.