+ Reply to Thread
Results 1 to 4 of 4

Macro to clear all filters in a table

Hybrid View

  1. #1
    Registered User
    Join Date
    02-18-2013
    Location
    Windsor, Australia
    MS-Off Ver
    Excel 2013
    Posts
    77

    Macro to clear all filters in a table

    I just need a sinmple macro that will clear all filters in a table. If the table is called Table1, could someone kindly help me out? I can easily do it by recording a macro, but as soon as the columns change, it won't work. I don't know enough about VBA to do it myself...

  2. #2
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,551

    Re: Macro to clear all filters in a table

    Try this'

    ActiveSheet.ListObjects("YourTableName").Range.AutoFilter
    Thanks,
    Mike

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved.

  3. #3
    Registered User
    Join Date
    02-18-2013
    Location
    Windsor, Australia
    MS-Off Ver
    Excel 2013
    Posts
    77

    Re: Macro to clear all filters in a table

    Great, only problem is it removes the filter buttons as well, not resets them.

  4. #4
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,551

    Re: Macro to clear all filters in a table

    O this should do it

    ActiveSheet.ListObjects("TableName").AutoFilter.ShowAllData

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1