+ Reply to Thread
Results 1 to 4 of 4

Deleting autofiltered non-contiguous rows taking 3mins

  1. #1
    Registered User
    Join Date
    10-07-2013
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    19

    Deleting autofiltered non-contiguous rows taking 3mins

    Hi all,

    I have a workbook with around 31,000 rows of data inserted from columnns A:AF. I have applied an autofilter on this data, then I intend to delete the filtered range leaving me with around 10,000 rows once reset I have reset the autofilter. This process is currently taking around 3 mins using the following code to delete the rows after the autofilter has run:


    Please Login or Register  to view this content.
    I have tried running the following code to speed the process up but again it is around 3 mins:

    Please Login or Register  to view this content.
    Does anyone have a solution to speed this process up?

    Regards,
    Theo

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,628

    Re: Deleting autofiltered non-contiguous rows taking 3mins

    You could try switching off ScreenUpdating and setting Calculation to Manual. then, if you've got lots of formulae in those 31,000 rows, it's not going to keep re-calculating.


    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    10-07-2013
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    19

    Re: Deleting autofiltered non-contiguous rows taking 3mins

    Screen updating is off and there are no formula in the rows. The workbook is large though, I have tested the same code in a small workbook with just the data sheet and it executes in about 7 seconds! Seems like the problem is the size of the workbook.

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,628

    Re: Deleting autofiltered non-contiguous rows taking 3mins

    Are there formulae in other sheets that may or may not depend on the data in the sheet where you are deleting rows?

+ 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] How to delete multiple contiguous (and/or) non-contiguous rows, in an excel table
    By jimmalk in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-03-2012, 05:48 AM
  2. Replies: 2
    Last Post: 11-04-2012, 12:18 AM
  3. Taking most common word from an autofiltered set of data
    By farmertml in forum Excel General
    Replies: 1
    Last Post: 03-10-2009, 06:55 AM
  4. Macro for deleting autofiltered rows
    By tuph in forum Excel General
    Replies: 3
    Last Post: 12-17-2006, 10:30 PM
  5. Deleting AutoFiltered Rows
    By Nirmal Singh in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 02-07-2005, 03:06 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