+ Reply to Thread
Results 1 to 4 of 4

Delete Entire Row on Every Sheet if Date Condition Matches

  1. #1
    Registered User
    Join Date
    12-28-2011
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    4

    Delete Entire Row on Every Sheet if Date Condition Matches

    What I am trying to do is filter 2nd column(B) for every row for every sheet and delete if the condition matches; ">11/12/2019" in case of the following code.

    The code would run into 1004 on the first sheet where the condition was matched.


    Please Login or Register  to view this content.
    Sample Data:

    Blah Date AnotherBlah BlahAgain Woof WoofAgain WoofWoof LastOne
    Blah1 10/12/2019 AnotherBlah1 BlahAgain1 Woof1 WoofAgain1 WoofWoof1 LastOne1
    Blah2 09/12/2019 AnotherBlah2 BlahAgain2 Woof2 WoofAgain2 WoofWoof2 LastOne2
    Blah3 13/12/2019 AnotherBlah3 BlahAgain3 Woof3 WoofAgain3 WoofWoof3 LastOne3


    Can you please help me spot what went wrong and why?
    Last edited by c052463; 01-16-2020 at 11:52 AM.

  2. #2
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,810

    Re: Delete Entire Row on Every Sheet if Date Condition Matches

    Try:
    Please Login or Register  to view this content.
    You can say "THANK YOU" for help received by clicking the Star symbol at the bottom left of the helper's post.
    Practice makes perfect. I'm very far from perfect so I'm still practising.

  3. #3
    Registered User
    Join Date
    12-28-2011
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Delete Entire Row on Every Sheet if Date Condition Matches

    Thanks man my head is mush right now and you helped me get through this.

    Here's the final code I did to do it to all sheets.

    Please Login or Register  to view this content.

  4. #4
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,810

    Re: Delete Entire Row on Every Sheet if Date Condition Matches

    Are you sure that it worked properly? I would think the macro should be something like this:
    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. Delete entire row based on certain condition
    By roberco30 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-04-2017, 10:41 PM
  2. delete empty entire row with condition
    By ash3angel in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 06-29-2015, 08:29 AM
  3. [SOLVED] VBA to delete entire row based on condition met
    By shiva_reshs in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 06-17-2014, 05:48 PM
  4. Replies: 5
    Last Post: 11-03-2012, 04:22 PM
  5. [SOLVED] Macro to delete entire row on a condition
    By kgonzalbo in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-30-2011, 12:39 AM
  6. Delete entire row on condition
    By bouitac in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-06-2009, 04:58 PM
  7. Can I delete an entire row if condition is not met?
    By Christine in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 05-04-2006, 04:50 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