+ Reply to Thread
Results 1 to 6 of 6

Double filter (condition) to delete rows

  1. #1
    Registered User
    Join Date
    09-14-2012
    Location
    Italy
    MS-Off Ver
    Excel 2010
    Posts
    15

    Double filter (condition) to delete rows

    Hi, I'm using this code to delete a row if the condition is "satisfied"
    Please Login or Register  to view this content.
    but I need a condition that analize TWO cells on the same row, not just one like the code above

    Thanks Nik

  2. #2
    Valued Forum Contributor
    Join Date
    03-17-2007
    Location
    Michigan
    MS-Off Ver
    Excel 2016
    Posts
    957

    Re: Double filter (condition) to delete rows

    I found this code on the Internet, I believe it might be what you are looking for:
    Please Login or Register  to view this content.
    Hope it helps!
    Last edited by lilsnoop; 01-22-2014 at 10:21 AM.

  3. #3
    Registered User
    Join Date
    09-14-2012
    Location
    Italy
    MS-Off Ver
    Excel 2010
    Posts
    15

    Re: Double filter (condition) to delete rows

    Hi thanks for your reply
    unfortunately this is not really my job

    I've tried to adapt your code but i receive an error on this line:
    Rng.SpecialCells(xlCellTypeVisible).EntireRow.Delete

    trying to rewrite the code specifically to my needs:
    IF THE CELL IN COLUMN E CONTAINS "STRING1" AND CELL IN COLUMN F CONTAINS "STRING2"
    THAN DELETE ENTIRE ROW

    looking forward to your reply

    Nik

  4. #4
    Valued Forum Contributor
    Join Date
    03-17-2007
    Location
    Michigan
    MS-Off Ver
    Excel 2016
    Posts
    957

    Re: Double filter (condition) to delete rows

    Hi Nik,

    Try this by placing in a module:
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    09-14-2012
    Location
    Italy
    MS-Off Ver
    Excel 2010
    Posts
    15

    Re: Double filter (condition) to delete rows

    Excellent !

    It works !

    I've noticed that is much quicker than my old code

    Thank you very much

  6. #6
    Valued Forum Contributor
    Join Date
    03-17-2007
    Location
    Michigan
    MS-Off Ver
    Excel 2016
    Posts
    957

    Re: Double filter (condition) to delete rows

    Glad I could help!

+ 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. Delete Rows hidden by either Auto Filter and Advanced Filter
    By lesoies in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-05-2013, 10:29 AM
  2. Delete double rows IF...
    By Turbobiker in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-29-2009, 08:12 AM
  3. Delete & Merge Columns,Delete Rows with filter, etc
    By traderindia in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-17-2009, 02:12 AM
  4. Delete function - Double (Same Information) Rows
    By SilverShadow in forum Excel - New Users/Basics
    Replies: 4
    Last Post: 06-04-2007, 05:43 AM
  5. how to filter data and delete double records
    By **dan** in forum Excel General
    Replies: 2
    Last Post: 10-17-2006, 06:07 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