resetting all filters quickly

markster

Well-known Member
Joined
May 23, 2002
Messages
575
Office Version
  1. 365
Platform
  1. Windows
  2. MacOS
Is there a quick way of resetting all filters to me having to find the blue arrows on the individual filters of a large spreadsheet. I don't want to remove the filter arrows just reset them all quickly. Perhaps some VBA code will do it - can anyone help?
Cheers
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
Hi, markster,
try something like this
Code:
Sub reset_autofilter1()
Application.ScreenUpdating = False
Selection.AutoFilter
Selection.AutoFilter
Application.ScreenUpdating = True
End Sub
OR
Code:
Sub reset_autofilter2()
'Erik Van Geit
'051101
Dim c As Range
Application.ScreenUpdating = False
For Each c In Selection.Resize(1, Selection.Columns.Count)
    Selection.AutoFilter Field:=c.Column
Next c
Application.ScreenUpdating = True
End Sub

kind regards,
Erik
 
Upvote 0
Double clicking on the filter button should do it unless you have any blank columns in your filter range. Then you may want to select your entire range before double clicking.
 
Upvote 0

Forum statistics

Threads
1,203,468
Messages
6,055,599
Members
444,801
Latest member
JurieDT

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