Clear multiple filters within the same tab/sheet

drom

Well-known Member
Joined
Mar 20, 2005
Messages
528
Office Version
  1. 2021
  2. 2019
  3. 2016
  4. 2013
  5. 2011
  6. 2010
  7. 2007
[]Hi and thanks in advance![/b]
I have a tab/sheet with multiple different tables
some time I have to filter a table and I do forget to clear the filters when moving to one other sheet and saving the Book

Takes me quite lot time and is so tedious to check in which table I have applied filters

I DO KNOW how to Clear remove filters using VBA, but I would like to know if there is any other way rather than going table by table and/or using VBA to CLEAR EVERY FILTER on the existing tables in a sheet


Any idea ?

Thanks again!
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
Excel allows one autofilter table per worksheet...

If you're currently going to a worksheet, then to the headings, then clearing each heading individually... a quicker way would be:


With the DATA ribbon selected..
Go to the worksheet with the autofilter data... (regardless of whether you know it's filtered or not)
Click on the CLEAR button immediately to the right of the larger FILTER button. This clears all filters for a given table.






Another solution (vba) is:

For each worksheet, add the following code (note WORKSHEET, not MODULE)


Code:
Private Sub Worksheet_Deactivate()


    Me.ShowAllData


End Sub


Now, every time you leave a worksheet, it automatically "unfilters" / shows-all the data.

This way, every time you go to a different worksheet, you know it will not be filtered.





If you didn't want it to automatically clear the filter of the sheet you're leaving, you could always just put Me.ShowAllData into a sub in a Module, and bind a shortcut-key to it.

e.g.

Code:
Sub CtrlShiftF()
    Me.ShowAllData
End Sub





A final solution might be:

Add this into a module and add a button or bind a shortcut-key to it.

Sub FilterClear()

Dim Wks As Worksheet

For Each Wks In ThisWorkbook.Worksheets
Wks.ShowAllData
Next Wks

End Sub
 
Upvote 0

Forum statistics

Threads
1,215,149
Messages
6,123,311
Members
449,095
Latest member
Chestertim

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top