[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 150
  • Last Modified:

Find a date stamp

Im looking for a piece of code to find a date stamp in a worksheet and then clear all contents in that row

Thanks
0
Seamus2626
Asked:
Seamus2626
1 Solution
 
Rgonzo1971Commented:
Hi,

is the time stamp in definite column is a date or a text

for example

Sub macro()

For Each c In Range(Range("A1"), Range("A" & Cells.Rows.Count).End(xlUp))
    If c < Date - 2 And c > 0 Then
        c.EntireRow.ClearContents
    End If
Next
End Sub

Regards
0
 
theruckCommented:
just to be clear. enable automatic filters sort by date then select that time stamp and delete manually. you want that to be automated? how do you want to specify the date to delete? is it a static value or everytime something different?
0
 
Seamus2626Author Commented:
Thats the one!

Thanks
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now