+ Reply to Thread
Results 1 to 6 of 6

Delete Row if value less than - Quicker Solution?

  1. #1
    Forum Contributor
    Join Date
    09-09-2008
    Location
    Middlesbrough, England
    MS-Off Ver
    2007
    Posts
    174

    Delete Row if value less than - Quicker Solution?

    Hello,

    I've created the following code which deletes rows if the value in column G is less than 10.

    Please Login or Register  to view this content.
    The issue is its a very time consuming. Can anyone recommend a faster solution?

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Delete Row if value less than - Quicker Solution?

    Filter column G for values less than 10 and then delete en masse?
    If posting code please use code tags, see here.

  3. #3
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,262

    Re: Delete Row if value less than - Quicker Solution?

    Hi batchy
    Add this in beginning of code:
    Please Login or Register  to view this content.
    And this in end
    Please Login or Register  to view this content.
    Good Luck
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the star to left of post [Add Reputation]
    Also....add a comment if you like!!!!
    And remember...Mark Thread as Solved.
    Excel Forum Rocks!!!

  4. #4
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,262

    Re: Delete Row if value less than - Quicker Solution?

    Try this code of xld's...Much faster
    Please Login or Register  to view this content.

  5. #5
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Delete Row if value less than - Quicker Solution?

    Maybe:

    Please Login or Register  to view this content.

  6. #6
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Re: Delete Row if value less than - Quicker Solution?

    Hi !

    With big data as SpecialCells method has a limit and as clearing consecutive rows is faster than deleting row by row,
    the tip is to use a temp additional column to mark rows to clear (aka 0 - 1 or False - True)
    then sort entire range on that additional column in order to move rows to clear at the bottom of range,
    clear rows and additional column, that's it !

+ 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. A quicker way to delete data?
    By demarc in forum Excel General
    Replies: 2
    Last Post: 04-11-2015, 09:34 AM
  2. Quicker Delete Row VBA code
    By step_hen80 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-30-2013, 05:05 AM
  3. Is 'ranking by' a VBA solution or a manual solution?
    By mtw2018 in forum Excel General
    Replies: 2
    Last Post: 04-10-2012, 01:47 PM
  4. Quicker function than delete entire row
    By davidparkes in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 04-18-2011, 02:15 PM
  5. Quicker way to Delete Random Product from Sheet?
    By Aurise in forum Excel General
    Replies: 9
    Last Post: 05-11-2009, 05:25 PM
  6. solution:delete empty rows
    By lettuce137 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-08-2009, 10:23 PM
  7. Quicker VBA
    By sparx in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-10-2007, 06:47 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