How to clear filters from all worksheets in active workbook in Excel?
Supposing you have created multiple filters across different worksheets in an Excel workbook, and now you want to clear all these filters at once. Normally, you need to shift to the worksheet one by one to check the filter and then clear it manually. Is there any convenient method to clear filters from all worksheets in an active workbook? Please try the method in this article.
Recommended Productivity Tools for Excel
Office Tab: Bring powerful tabs to Office (include Excel), just like Chrome, Safari, Firefox and Internet Explorer. Save you half the time, and reduce thousands of mouse clicks for you. 30-day Unlimited Free Trial
Kutools for Excel: Save 71% of your time and solve 82% Excel problems for you. 300+ advanced tools designed for 1500+ work scenario, make Excel much easy and increase productivity immediately.60-day Unlimited Free Trial
Please run the below VBA script to clear filters from all worksheets in active workbook.
1. In the workbook you need to clear filters from, please press the Alt + F11 keys to open the Microsoft Visual Basic for Applications window.
2. In the Microsoft Visual Basic for Applications window, click Insert > Module. Then copy and paste the below VBA script into the Module window. See below screenshot:
VBA code: Clear filters from all worksheets in active workbook
Sub Auto_Open() Dim xWs As Worksheet For Each Wks In ThisWorkbook.Worksheets On Error Resume Next If Wks.AutoFilterMode Then Wks.AutoFilterMode = False End If Next Wks End Sub
3. Press the F5 key to run the code. Then all filters across all worksheets in current workbook are cleared immediately.
- How to clear filter cache (old items) from Pivot Table in Excel?
- How to clear filters when opening, saving or closing workbook in Excel?
- How to filter data based on checkbox in Excel?
- How to fill series of numbers in a filtered list column in Excel?