+ Reply to Thread
Results 1 to 6 of 6

Delete rows with Start date greater than 30 days

  1. #1
    Registered User
    Join Date
    09-11-2012
    Location
    UK
    MS-Off Ver
    Excel 2003
    Posts
    81

    Delete rows with Start date greater than 30 days

    Hi

    I am new to VBA programming. I am looking to add a macro that does as below:

    compares the start date if it is greater than 30 days, delete the entire row.

    Please find attached the sample datasheet.

    Thanks
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    11-26-2011
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    159

    Re: Delete rows with Start date greater than 30 days

    Hi try dis code in sample file
    Please Login or Register  to view this content.

  3. #3
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Delete rows with Start date greater than 30 days

    option:

    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    09-11-2012
    Location
    UK
    MS-Off Ver
    Excel 2003
    Posts
    81

    Re: Delete rows with Start date greater than 30 days

    What are D2 and C2 here???? IF this is calculation the diffrence between start and finish dates, thats not what I wanted. I wanted to see if the start date which is column C is older than 30 days then I wanted to delete the entire row.

    Please advice, thanks

  5. #5
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Delete rows with Start date greater than 30 days

    ok, so I assume we compare today's date. Then it could be done this way:

    Please Login or Register  to view this content.
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    09-11-2012
    Location
    UK
    MS-Off Ver
    Excel 2003
    Posts
    81

    Re: Delete rows with Start date greater than 30 days

    THanks very much, its working great

+ 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