+ Reply to Thread
Results 1 to 4 of 4

Help Edit Loop that deletes Rows based on Date condition.

  1. #1
    Forum Contributor
    Join Date
    03-14-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    491

    Help Edit Loop that deletes Rows based on Date condition.

    hi , I want to enter a date in cell M1 and go through a table in column C and if that Date is the same as or less than the date in column M1, I want to delete the row.


    I found this code but I am having trouble understanding the logic with the
    Please Login or Register  to view this content.
    ) part of it.

    Here is the code I need help with



    Please Login or Register  to view this content.
    not sure how to check against cell M1

  2. #2
    Forum Contributor
    Join Date
    03-14-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    491

    Re: Help Edit Loop that deletes Rows based on Date condition.

    ok, So I set
    Please Login or Register  to view this content.
    Now the problem is that I set the condition as


    Please Login or Register  to view this content.
    But it is deleting all the rows when i have a date in there that is greater

  3. #3
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Help Edit Loop that deletes Rows based on Date condition.

    Use filter, it is easier and faster than looping.
    Please Login or Register  to view this content.

  4. #4
    Forum Contributor
    Join Date
    03-14-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    491

    Re: Help Edit Loop that deletes Rows based on Date condition.

    This works Perfect now, Thank You I am marking as solved.

+ 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. 60 USD Need to insert rows based on conditions up to a certain date. Re-run For Loop? Help
    By treschouette in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-03-2015, 06:31 PM
  2. Need to insert rows based on conditions up to a certain date. Re-run For Loop? Help?
    By treschouette in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-03-2015, 03:04 PM
  3. [SOLVED] Loop that Deletes Rows
    By mkeys4 in forum Excel Programming / VBA / Macros
    Replies: 23
    Last Post: 07-29-2013, 02:29 PM
  4. A loop to delete rows based on condition
    By Josh_123456 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-21-2007, 05:51 PM
  5. Useful code that deletes entire rows based on formatting
    By Ralfie in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-20-2007, 01:02 PM
  6. Help With a Loop That Deletes Rows
    By Vecchia in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-21-2005, 06:10 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