+ Reply to Thread
Results 1 to 6 of 6

Deleting rows using Autofilter with multiple <> criteria

  1. #1
    Registered User
    Join Date
    10-14-2013
    Location
    Saturn
    MS-Off Ver
    Excel 2010
    Posts
    28

    Deleting rows using Autofilter with multiple <> criteria

    Please Login or Register  to view this content.
    This code is meant to find the column headed by "Status", then delete all rows with Status NOT EQUAL to "RET" and "LTD."
    I'm getting Run-time error '1004': AutoFilter Method of Range class failed on
    Please Login or Register  to view this content.
    Appreciate any help.
    Last edited by {=OR(value=array)}; 04-15-2014 at 04:27 PM.

  2. #2
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: Deleting rows using Autofilter with multiple <> criteria

    Try
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    10-14-2013
    Location
    Saturn
    MS-Off Ver
    Excel 2010
    Posts
    28

    Re: Deleting rows using Autofilter with multiple <> criteria

    Thanks PCI,

    I tried the code with EntireRow.Delete fixed.

    The macro deleted all non-1st row.

    I took out the delete row lines. It seems like the autofilter isn't working as intended, ei filter only non-"RET" and non-"LTD".

  4. #4
    Registered User
    Join Date
    10-14-2013
    Location
    Saturn
    MS-Off Ver
    Excel 2010
    Posts
    28

    Re: Deleting rows using Autofilter with multiple <> criteria

    Okay I just noticed where the problem may be. There is another column titled "Record Status Code," and the .Find method is picking that up instead of the field titled "Status."

  5. #5
    Registered User
    Join Date
    10-14-2013
    Location
    Saturn
    MS-Off Ver
    Excel 2010
    Posts
    28

    Re: Deleting rows using Autofilter with multiple <> criteria

    Okay so this is what ended up working (the original post code is the third section of this sub):
    Please Login or Register  to view this content.

  6. #6
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: Deleting rows using Autofilter with multiple <> criteria

    Thank you for the information back

+ 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. Deleting rows, multiple column criteria
    By Lift Off in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 06-24-2014, 09:40 PM
  2. [SOLVED] Deleting rows based on multiple criteria
    By weldo in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-02-2012, 08:02 AM
  3. Deleting rows, Multiple criteria
    By Wedge120 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-29-2011, 10:51 PM
  4. Deleting Multiple Criteria Rows / Data manipulation
    By SystemsAccountant in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-19-2008, 10:33 AM
  5. Deleting blanks rows based on multiple criteria
    By Pedros in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-27-2006, 12:44 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