+ Reply to Thread
Results 1 to 11 of 11

Macro Slow After Using Filter

  1. #1
    Forum Contributor
    Join Date
    12-19-2011
    Location
    Central Europe
    MS-Off Ver
    Excel O365
    Posts
    361

    Macro Slow After Using Filter

    Hi all

    My worksheet_change Macro is running smoothly, until I filter a data.
    Even when I remove all filters, the macro will take a minute to run (whereas it is instantly otherwhise)

    Anyone has any idea what the reason could be for this?

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Macro Slow After Using Filter

    Please share your code.. if possible with a sample workbook


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Forum Contributor
    Join Date
    12-19-2011
    Location
    Central Europe
    MS-Off Ver
    Excel O365
    Posts
    361

    Re: Macro Slow After Using Filter

    Please Login or Register  to view this content.
    I am afraid I cannot share a sample workbook

  4. #4
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Macro Slow After Using Filter

    I am not seeing any filter in your code…

    Here is the little bit fine tuned version of code…

    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    12-19-2011
    Location
    Central Europe
    MS-Off Ver
    Excel O365
    Posts
    361

    Re: Macro Slow After Using Filter

    HI

    Many thanks for your help.

    Yes, there's no filter set in the code. It's only on the worksheet.
    The thing is when I filter by "abc" (or whatever I filter by), then unfilter, the macro takes ages to run - I don't understand how it could have a influence on the code

  6. #6
    Forum Contributor
    Join Date
    12-19-2011
    Location
    Central Europe
    MS-Off Ver
    Excel O365
    Posts
    361

    Re: Macro Slow After Using Filter

    Hi Sixthsense

    I just changed the part about col. width to

    Please Login or Register  to view this content.

  7. #7
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Macro Slow After Using Filter

    Just remove the screen updating turn off and On code and check…

  8. #8
    Forum Contributor
    Join Date
    12-19-2011
    Location
    Central Europe
    MS-Off Ver
    Excel O365
    Posts
    361

    Re: Macro Slow After Using Filter

    Hi there

    Are you referring to the macro running slow after filtering?

  9. #9
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Macro Slow After Using Filter

    Just remove the Application.ScreenUpdating = False & Application.ScreenUpdating = True completely from your code and check...

  10. #10
    Forum Contributor
    Join Date
    12-19-2011
    Location
    Central Europe
    MS-Off Ver
    Excel O365
    Posts
    361

    Re: Macro Slow After Using Filter

    Hi sixthsense

    No success by removing it

    However, I spotted the part which makes it so slow after filtering - is there a way to improve the coding of this?

    Please Login or Register  to view this content.
    Thanks

    FD

  11. #11
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Macro Slow After Using Filter

    Check the below code...

    Please Login or Register  to view this content.

+ 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. Macro is running real slow and makes navigating the worksheet really slow after execution.
    By MichWolverines in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-03-2013, 04:29 PM
  2. [SOLVED] slow computer (slow clipboard) breaks my macro
    By twilsonco in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-05-2013, 09:16 PM
  3. Filter Code is really slow, please Help...
    By lanziniad in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 12-14-2011, 11:18 PM
  4. auto filter very slow to return results
    By martindwilson in forum Excel General
    Replies: 3
    Last Post: 02-16-2009, 09:08 AM
  5. Excel filter moves slow
    By Popa in forum Excel General
    Replies: 0
    Last Post: 05-15-2008, 10:49 AM

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