+ Reply to Thread
Results 1 to 3 of 3

Delete row based on single cell value

  1. #1
    Forum Contributor
    Join Date
    02-24-2010
    Location
    BC, Canada
    MS-Off Ver
    Excel 2010
    Posts
    174

    Delete row based on single cell value

    Hi,

    I'm trying to delete entire rows when column K has the value TRUE in it (this is a text value, not a formula result).

    I'm trying the following code.

    Please Login or Register  to view this content.
    This seems to work, but EXTREMELY slowly. I can see it deleting a row every few seconds, but my spreadsheet is over 12,000 rows. Is it because of the way it is set to loop? Is there a way to edit this so that it will work faster? It may be best if it starts at the end of the sheet, since that is where most of the TRUE values will be.

    Thanks!

  2. #2
    Forum Expert judgeh59's Avatar
    Join Date
    02-07-2013
    Location
    Boise, Idaho
    MS-Off Ver
    Excel 2016
    Posts
    2,310

    Re: Delete row based on single cell value

    is it possible you have a bunch calculations happening?...

    add this to the beginning of your code

    Please Login or Register  to view this content.
    add this to the end

    Please Login or Register  to view this content.
    see if this helps....


    and Yes, when deleting rows it's usually better to work from the bottom and go up....

    but that doesn't usually make it slow doing your way....
    Ernest

    Please consider adding a * if I helped

    Nothing drives me crazy - I'm always close enough to walk....

  3. #3
    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 based on single cell value

    Try:

    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. [SOLVED] Delete Entire Row based on single cell value using VBA command Button
    By rain4uu in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-07-2014, 12:53 PM
  2. [SOLVED] Extract single cell data based on a single cell entry
    By farmerdoode in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-05-2013, 11:11 PM
  3. Delete row based on single column value
    By Urchino in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-17-2011, 09:24 PM
  4. Delete multiple rows of data based on criteria in a single cell
    By slaga9 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-12-2011, 03:41 AM
  5. delete rows based on single value error
    By sandy.beach in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 06-09-2009, 08:19 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