+ Reply to Thread
Results 1 to 5 of 5

Delete Rows based on conditions

  1. #1
    Forum Contributor
    Join Date
    04-23-2007
    Location
    Texas
    Posts
    417

    Delete Rows based on conditions

    Hello, I am having some trouble remembering how to do this. I've written this code and it works if I run it multiple times.

    Is there a more efficient way to write this code and it not completely lock excel for 10 minutes?

    Please Login or Register  to view this content.
    If we all use our Minds our Heads and our Brains NO TELLING what we could come up with!!

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,944

    Re: Delete Rows based on conditions

    See if this works for you:
    Please Login or Register  to view this content.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Forum Contributor
    Join Date
    04-23-2007
    Location
    Texas
    Posts
    417

    Re: Delete Rows based on conditions

    I'm not sure why but I have to run the macro many times to delete all the rows.

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,944

    Re: Delete Rows based on conditions

    Generally, when deleting rows with a Macro, you start at the bottom of the range and move up. I suggest the following instead.
    Please Login or Register  to view this content.

  5. #5
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,115

    Re: Delete Rows based on conditions

    Another option
    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 rows based on two conditions
    By Agnethe in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 06-21-2017, 08:00 PM
  2. [SOLVED] Need a macro to delete rows based on multiple conditions
    By WorkAccount2 in forum Excel Programming / VBA / Macros
    Replies: 20
    Last Post: 03-30-2017, 12:33 PM
  3. Delete rows from table based on conditions
    By CLemons in forum Excel General
    Replies: 1
    Last Post: 12-17-2015, 10:35 PM
  4. identifying rows to delete based on multiple conditions
    By DannyGIS in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 06-09-2014, 06:29 PM
  5. [SOLVED] Macro to Delete Rows based on Specific Conditions
    By stockgoblin42 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 05-28-2013, 05:29 PM
  6. [SOLVED] VBA code to delete duplicate rows based on multiple conditions
    By pjsween in forum Excel General
    Replies: 5
    Last Post: 06-27-2012, 01:15 PM
  7. Delete Rows Based on Two Conditions
    By ExcelGuy160 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 09-20-2010, 02:44 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