Find a date stamp

Posted on 2014-08-07
Last Modified: 2014-08-07
Im looking for a piece of code to find a date stamp in a worksheet and then clear all contents in that row

Question by:Seamus2626
    LVL 47

    Expert Comment


    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
        End If
    End Sub

    LVL 14

    Accepted Solution

    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?

    Author Closing Comment

    Thats the one!


    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    Sometimes we don't want to show zeros in our Excel spreadsheets. This is sometimes most evident in our charts. Look at the chart below, all the zero values are visible. I think that all will agree with the fact that zero values are not looking nice …
    Workbook link problems after copying tabs to a new workbook? David Miller (dlmille) Intro Have you either copied sheets to a new workbook, and after having saved and opened that workbook, you find that there are links back to the original sou…
    This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
    This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

    729 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now