ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Excel Lists - Resetting Filters (https://www.excelbanter.com/excel-programming/381687-excel-lists-resetting-filters.html)

MJ

Excel Lists - Resetting Filters
 
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


Dave Peterson

Excel Lists - Resetting Filters
 
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.

MJ wrote:

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


--

Dave Peterson

MJ

Excel Lists - Resetting Filters
 
Thanks Dave!

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

Cheers!

Dave Peterson wrote:
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.

MJ wrote:

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


--

Dave Peterson



Dave Peterson

Excel Lists - Resetting Filters
 
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.

MJ wrote:

Thanks Dave!

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

Cheers!

Dave Peterson wrote:
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.

MJ wrote:

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


--

Dave Peterson


--

Dave Peterson


All times are GMT +1. The time now is 09:16 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com