+ Reply to Thread
Results 1 to 4 of 4

Clear content based on date?

  1. #1
    Forum Contributor
    Join Date
    06-29-2005
    Location
    TN
    MS-Off Ver
    Microsoft 365
    Posts
    327

    Clear content based on date?

    Hello All, I'm looking for some help on a formula that would clear the content of a cell based on a date. In column B, I have some currency data, and other data. In column C, I have certain due dates. Once the due date has passed, I'd like to have the data in column B clear itself.

    COL B COL C
    $100.00 04/07/2012 Clear $100.00 on 04/07 or later
    $100.00 04/10/2012 No action until 04/10

    Any ideas?

    Thanx....LT

  2. #2
    Valued Forum Contributor
    Join Date
    02-09-2012
    Location
    Mauritius
    MS-Off Ver
    Excel 2007
    Posts
    1,055

    Re: Clear content based on date?

    Hi
    Try this:

    Sub CLEARCONTENT()
    Dim rcnt As Long

    rcnt = Range("B" & Rows.Count).End(xlUp).Row

    For i = 1 To rcnt
    If Date >= Range("C" & i).Value Then
    Range("B" & i).ClearContents
    End If
    Next
    End Sub
    Regards...

  3. #3
    Forum Contributor
    Join Date
    06-29-2005
    Location
    TN
    MS-Off Ver
    Microsoft 365
    Posts
    327

    Re: Clear content based on date?

    Thanx, I'll give this a try and reply back.

    LT

  4. #4
    Valued Forum Contributor
    Join Date
    02-09-2012
    Location
    Mauritius
    MS-Off Ver
    Excel 2007
    Posts
    1,055

    Re: Clear content based on date?

    Ya sure...
    If it helps u then pls click the star below...

    Regards..

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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