Excel Lists - Resetting Filters

  • Thread starter Thread starter MJ
  • Start date Start date
M

MJ

I have an Excel List created. When users start using it they often add
filters here and there and have a hard time remembering which ones they
had on and off to reset them back to the normal, unfiltered view.

Is there a way I can attach some code to a button that resets all the
filters in a list to an unfiltered state?

tia
 
You can add a "Show All" button to your favorite toolbar (especially handy if
you want to reset all the filters quickly).

Tools|Customize|Commands Tab|Data Category

Drag that "Show All" command to your favorite toolbar.
 
Thanks Dave!

A quick macro recording of that button being pressed gives me
"Activesheet.showalldata" which is exactly what I'm looking for.

Cheers!
 
My suggestion was to really use that button that's built into excel. But if you
really want your own button, I'd change the code slightly.

Option Explicit
Sub testme()
With ActiveSheet
If .FilterMode Then
.ShowAllData
End If
End With
End Sub

It won't blow up if the user hasn't filtered by any of the columns.

======
Ps. You still may want to add that icon to your favorite toolbar, it'll be
useful for other worksheets.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top