+ Reply to Thread
Results 1 to 3 of 3

Can you remove redundant date entry?

  1. #1
    Registered User
    Join Date
    04-03-2006
    Posts
    15

    Can you remove redundant date entry?

    Hi

    I want to write a macro which allowed me to automatically remove data which had expired past today's date?

    Has anyone got a clue as to how this is done?

  2. #2
    Toppers
    Guest

    RE: Can you remove redundant date entry?

    this compares dates in column A and removes rows where the date is less than
    Today's date

    For r = 100 To 2 Step -1
    If Cells(r, "A") < Date Then Rows(r).Delete
    Next r

    I am assuming you mean expiry dates earlier than today.

    HTH

    "simoncottle" wrote:

    >
    > Hi
    >
    > I want to write a macro which allowed me to automatically remove data
    > which had expired past today's date?
    >
    > Has anyone got a clue as to how this is done?
    >
    >
    > --
    > simoncottle
    > ------------------------------------------------------------------------
    > simoncottle's Profile: http://www.excelforum.com/member.php...o&userid=33122
    > View this thread: http://www.excelforum.com/showthread...hreadid=529323
    >
    >


  3. #3
    Registered User
    Join Date
    04-03-2006
    Posts
    15

    Hi Toppers

    Can you help

    At the moment the macro you suggest does not differentiate between dates, do i have to have my dates in a particular format?

    Cheers Simon

    PS even if I use the clear contents command which is more what I want it removes all the data regardless of whether it is out of date or not

+ 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