+ Reply to Thread
Results 1 to 7 of 7

delete rows containing old dates/times

  1. #1
    Registered User
    Join Date
    12-17-2008
    Location
    edinburgh, uk
    Posts
    46

    delete rows containing old dates/times

    Hi guys,
    I need help deleting rows which contain a cell with date / time in the format dd/mm/yyyy hh:mm if the value is older than the current date / time

    any ideas?

    thanks
    Last edited by mattmac; 04-01-2009 at 11:10 AM.

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: delete rows containing old dates/times

    More info please...

    Where are the dates located (range-wise) ?

    Are the date time values listed in any sort of order ?

    Is the Current Date always listed ?

  3. #3
    Registered User
    Join Date
    12-17-2008
    Location
    edinburgh, uk
    Posts
    46

    Re: delete rows containing old dates/times

    Sorry,
    dates are in column S and there could be any number of rows.

    dates are in format dd/mm/yyyy hh:mm (all in one column) and they have not been soretd.

    The current date / time isn't listed, I just want to pull that from the system clock.

    Thanks

  4. #4
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: delete rows containing old dates/times

    One way.. possibly...

    Please Login or Register  to view this content.
    Assumes S1 is a header value and first datetime value appears in S2

  5. #5
    Registered User
    Join Date
    12-17-2008
    Location
    edinburgh, uk
    Posts
    46

    Re: delete rows containing old dates/times

    Acutally i'm getting an error:

    runtime error 1004

    autofilter method of range class failed

    at this bit:
    .AutoFilter Field:=1, Criteria1:="<" & CDbl(Now)
    Last edited by mattmac; 04-01-2009 at 10:22 AM.

  6. #6
    Forum Contributor
    Join Date
    09-18-2008
    Location
    india
    Posts
    158

    Re: delete rows containing old dates/times

    Hi,

    Try this :

    Please Login or Register  to view this content.
    Regards,
    Shekar.

  7. #7
    Registered User
    Join Date
    12-17-2008
    Location
    edinburgh, uk
    Posts
    46

    Re: delete rows containing old dates/times

    Ahh thats it cheers!!!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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