Results 1 to 14 of 14

Thread: Delete row based upon Date

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #2
    VBAX Sage SamT's Avatar
    Joined
    Oct 2006
    Location
    Near Columbia
    Posts
    7,709
    Location
    Sub VBAX_SamT_DeleteWeekOld()
    Dim r As Long
    
    'Must delete Rows from bottom up
    For r = Cells(Rows.Count, "F").End(xlUp).Row to 11 Step - 1
       If CDate(Cells(r, "F")) < Date - 7 Then Rows(r).Delete
    Next r
    End Sub
    Last edited by Aussiebear; 02-20-2016 at 01:33 AM. Reason: Added hash tag to code
    Please take the time to read the Forum FAQ

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •