Results 1 to 12 of 12

Delete Entire rows without loop with multiple partial strings criteria

Threaded View

caabdul Delete Entire rows without... 03-03-2018, 01:53 PM
YasserKhalil Re: Delete Entire rows... 03-03-2018, 01:58 PM
shg Re: Delete Entire rows... 03-03-2018, 02:15 PM
caabdul Re: Delete Entire rows... 03-03-2018, 02:38 PM
daboho Re: Delete Entire rows... 03-03-2018, 03:55 PM
caabdul Re: Delete Entire rows... 03-03-2018, 04:15 PM
daboho Re: Delete Entire rows... 03-03-2018, 04:26 PM
caabdul Re: Delete Entire rows... 03-03-2018, 07:30 PM
daboho Re: Delete Entire rows... 03-04-2018, 01:49 AM
jeffreybrown Re: Delete Entire rows... 03-03-2018, 07:32 PM
bakerman2 Re: Delete Entire rows... 03-03-2018, 08:29 PM
bakerman2 Re: Delete Entire rows... 03-04-2018, 12:05 PM
  1. #11
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MSO Home and Business 2024
    Posts
    7,615

    Re: Delete Entire rows without loop with multiple partial strings criteria

    This should do it.
    Sub Macro1()
        string1 = "value1"
        string2 = "value2"
        With Cells(1).CurrentRegion
           .AutoFilter 1, "<>*" & string1 & "*", xlAnd, "<>*" & string2 & "*"
           .Offset(1).SpecialCells(12).EntireRow.Delete
           .AutoFilter
        End With
    End Sub
    Last edited by bakerman2; 03-03-2018 at 08:37 PM.
    Avoid using Select, Selection and Activate in your code. Use With ... End With instead.
    You can show your appreciation for those that have helped you by clicking the * at the bottom left of any of their posts.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] loop multiple criteria & delete matching rows?
    By Quint6778 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-09-2017, 09:58 AM
  2. Using loop(s) to delete rows based on criteria
    By Fish_Bio in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 07-09-2015, 03:02 PM
  3. [SOLVED] delete entire row if multiple criteria are satisfied
    By 4evra in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 02-20-2013, 08:06 AM
  4. Loop through rows and delete based on criteria
    By yolandaro30 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-27-2012, 12:23 PM
  5. Delete rows NOT containing 1 of multiple strings in a column
    By jarochnrol in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-22-2011, 05:13 PM
  6. Loop to delete rows meeting criteria
    By narrowgate88 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-18-2009, 04:54 PM
  7. delete entire rows based on a criteria
    By acekargo in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-30-2008, 11:15 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