+ Reply to Thread
Results 1 to 9 of 9

Help? What am I doing wrong with clearing filters?

  1. #1
    Registered User
    Join Date
    10-10-2006
    Posts
    68

    Help? What am I doing wrong with clearing filters?

    Here's the code..
    It seems i've tried every variation of filter clearing code and nothing seems to work..
    I'm starting to pull my hair out over this..

    Here's what I want to do in laymans terms:
    1) Open the "Dummy sheet."
    2) Check if there are any filters on, and if so, clear them
    3) Copy the entire visible data set
    4) Close the "Dummy Sheet"
    5) Copy the data to "Copy of Master Sheet"
    ... and go from there..

    The issue is getting the Dummy Sheet to clear any filters that are on before copying the info to another workbook.

    Please Login or Register  to view this content.
    I know there's alot of useless code in there at the moment but I've left it to remind myself of what i've tried and what hasn't worked..
    Any help?
    Thanks,

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,942

    Re: Help? What am I doing wrong with clearing filters?

    Have you tried to just remove the filter, instead of clearing it?

    THis will turn the filter off (if it is on) or on (if it is off)
    Please Login or Register  to view this content.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,649

    Re: Help? What am I doing wrong with clearing filters?

    Or you may try only this to remove filter from the table and show all the data.

    Please Login or Register  to view this content.
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,942

    Re: Help? What am I doing wrong with clearing filters?

    Thanks sktneer, your suggestion is probably far better than mine, Im just starting to learn VBA, and I got that from the macro recorder lol

  5. #5
    Registered User
    Join Date
    10-10-2006
    Posts
    68

    Re: Help? What am I doing wrong with clearing filters?

    Thanks guys, but I tried all those suggestions... I guess the problem is, depending on who is using the Master Sheet, they may or may not turn the filtering off. If it's already off, then everything gets buggered up.. The other issue I noticed is that sometimes on the DUmmy Sheet, the Filter button at the top is actually off, yet the column filters are still on (drop down filters). This was really the crux of the matter I think... that's why Selection.Autofilter wouldn't work consistently.
    I DID have it working like that at one point, while the Filter button up top was activated.

    Anyhow, I stumbled upon this seemingly redundant bit of code and it works like a charm!

    Please Login or Register  to view this content.
    Appreciate you guys looking though.
    Thanks.

  6. #6
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,942

    Re: Help? What am I doing wrong with clearing filters?

    I guess the problem is, depending on who is using the Master Sheet, they may or may not turn the filtering off. If it's already off, then everything gets buggered up
    I dont see how just turning filters ON will change anything? As long as no filters are activated, all data will show

  7. #7
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,649

    Re: Help? What am I doing wrong with clearing filters?

    Quote Originally Posted by FDibbins View Post
    Im just starting to learn VBA.
    That's good to know. Keep it up.

  8. #8
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,649

    Re: Help? What am I doing wrong with clearing filters?

    Sheet filter and Table filter are not the same, they will be required to be turned off separately....
    Please Login or Register  to view this content.

  9. #9
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,942

    Re: Help? What am I doing wrong with clearing filters?

    Quote Originally Posted by sktneer View Post
    Sheet filter and Table filter are not the same, they will be required to be turned off separately....
    Please Login or Register  to view this content.
    I take your point, sktneer, but if they are off and turned on - and no filters are activated, neither should affect the data display, should they?

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Clearing filters from a Pivot table
    By jomili in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-16-2015, 01:11 PM
  2. [SOLVED] Clearing out ListObject Filters
    By Dominicus in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-24-2012, 12:56 AM
  3. Clearing all data filters by macro
    By Andrew-Mark in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-17-2011, 09:58 PM
  4. Excel 2007 Freezing While Clearing Filters.
    By JDobbsy1987 in forum Excel General
    Replies: 0
    Last Post: 07-19-2010, 04:01 AM
  5. Clearing Filters and Returning to Cell A1
    By DentonHTHS in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 03-02-2009, 06:21 PM

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