+ Reply to Thread
Results 1 to 7 of 7

Delete old dates

  1. #1
    Valued Forum Contributor
    Join Date
    03-03-2009
    Location
    UK
    MS-Off Ver
    MS365 Subscription Excel for Mac
    Posts
    1,017

    Delete old dates

    In column B I have a bunch of dates. I want a macro to search the column from row 2 down to the last used row and find the first instance of today's date. When it finds it I want to delete the column above where it was found all the way up to row 2. I then want to find the date 14 days from today and search for that date in column B. When it finds that date, delete the row where it is found and all rows below it. Thanks in advance!
    Last edited by ScabbyDog; 04-16-2015 at 01:59 PM.

  2. #2
    Forum Expert JasperD's Avatar
    Join Date
    05-07-2013
    Location
    Netherlands
    MS-Off Ver
    Excel 2016
    Posts
    1,393

    Re: Delete old dates

    Please Login or Register  to view this content.
    Since I wasn't sure if you want to delete the cells and move the data up, delete the entire rows or delete just the content, I went for the safest solution and deleted the content.
    Enjoy
    Last edited by JasperD; 04-16-2015 at 02:37 PM.
    Please click the * below if this helps

  3. #3
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Delete old dates

    Maybe:

    Please Login or Register  to view this content.

  4. #4
    Valued Forum Contributor
    Join Date
    11-12-2014
    Location
    Nottingham
    MS-Off Ver
    2013
    Posts
    383

    Re: Delete old dates

    Im Slightly late but maybe this:

    Please Login or Register  to view this content.

  5. #5
    Valued Forum Contributor
    Join Date
    03-03-2009
    Location
    UK
    MS-Off Ver
    MS365 Subscription Excel for Mac
    Posts
    1,017

    Re: Delete old dates

    They all work but they just delete the content. I want to delete the entire row. Easy change?

  6. #6
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Delete old dates

    Add Entirerow.

    Please Login or Register  to view this content.

  7. #7
    Valued Forum Contributor
    Join Date
    03-03-2009
    Location
    UK
    MS-Off Ver
    MS365 Subscription Excel for Mac
    Posts
    1,017

    Re: Delete old dates

    Thanks John and everyone else. All worked fantastic. Great help! Have left you all positive feedback!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Delete rows outside of two dates
    By cossie2k in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-01-2014, 08:04 AM
  2. [SOLVED] Delete Non matching dates
    By Trevasaurus in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-15-2013, 04:04 PM
  3. Delete Duplicates According to dates
    By mccreaso in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-27-2006, 11:39 AM
  4. delete rows with dates between
    By dan in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-30-2006, 04:40 PM
  5. [SOLVED] Delete rows between two dates
    By jocker in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 12-02-2005, 02:10 PM

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