Resetting all Slicers

UniMord

Active Member
Joined
May 6, 2002
Messages
311
I have 4 Slicers and would like to be able to reset them all at once.
Is there a button or setting that I'm overlooking? If not, how would I go about it in VBA?
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
Code:
Dim slcr As SlicerCache

    For Each slcr In ActiveWorkbook.SlicerCaches
    
        slcr.ClearManualFilter
    Next slcr
 
Upvote 0
Thank you. At the moment, I have just these 4 Slicers, so your code does the trick. However, it seems that if I were to have other Slicers elsewhere in the workbook, those would also get reset, not just these 4. How could I target just these 4?
 
Upvote 0
Code:
Dim slcr As SlicerCache

    For Each slcr In ActiveWorkbook.SlicerCaches
    
        slcr.ClearManualFilter
    Next slcr

Hi .. Is it possible to amend the code so that it clears all the filters from Slicer but keeps the Blanks away?
 
Upvote 0
I know this post is old but I just had this situation and applied this solution:

Code:
'***Clear all slicers on activesheet except named***
Sub clearslcr()
Dim slcr As SlicerCache
Dim sl As Slicer


    For Each slcr In ActiveWorkbook.SlicerCaches
    For Each sl In slcr.Slicers
    If sl.Parent.Name = ActiveSheet.Name Then
    
If InStr(sl.Name, "FILTER DATE") = False Then


        slcr.ClearManualFilter
End If
End If
Next sl
    Next slcr
End Sub
 
Upvote 0
Unimord, I know this post is very old but I will still pass along how to clear slicer filters, which I found on my own by accident.
Select all slicers using CTRL+Click
Select Data Tab, sort and filter section
Select clear

You won't need VBA code.

Hope this helps.
 
Upvote 0

Forum statistics

Threads
1,223,997
Messages
6,175,874
Members
452,679
Latest member
darryl47nopra

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