+ Reply to Thread
Results 1 to 8 of 8

Read date value and delete if...

  1. #1
    Forum Contributor
    Join Date
    03-09-2010
    Location
    Oslo, Norway
    MS-Off Ver
    Excel 2003
    Posts
    173

    Read date value and delete if...

    Hello!

    Does anyone have a the coding for a macro which does the following:
    Reads date in column A, and delete entire row if the date is less or equal todays date + 2 days. Saturdays and mondays should not be included.

    Cheers
    Last edited by Hjahren; 11-22-2010 at 06:58 AM.

  2. #2
    Registered User
    Join Date
    11-12-2010
    Location
    Pisek, Czech republic
    MS-Off Ver
    Excel 2003
    Posts
    15

    Re: Read date value and delete if...

    Hi,
    what about this?

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    03-09-2010
    Location
    Oslo, Norway
    MS-Off Ver
    Excel 2003
    Posts
    173

    Re: Read date value and delete if...

    Thanks! I Believe this is working perfect. But I have to give my final verdict on thursday

  4. #4
    Forum Contributor
    Join Date
    03-09-2010
    Location
    Oslo, Norway
    MS-Off Ver
    Excel 2003
    Posts
    173

    Re: Read date value and delete if...

    I meant saturdays and sundays should not be included, I see that I wrote mondays. Does that differ? or did you expect it...

  5. #5
    Forum Contributor
    Join Date
    03-09-2010
    Location
    Oslo, Norway
    MS-Off Ver
    Excel 2003
    Posts
    173

    Re: Read date value and delete if...

    But I wrote exclude saturdays and mondays, but meant sundays....

  6. #6
    Registered User
    Join Date
    11-12-2010
    Location
    Pisek, Czech republic
    MS-Off Ver
    Excel 2003
    Posts
    15

    Re: Read date value and delete if...

    I did not see it :-D
    I expected Saturday + Sunday.
    Anyway, You can change the code as You wish. See vba help for the Weekday function

  7. #7
    Registered User
    Join Date
    11-12-2010
    Location
    Pisek, Czech republic
    MS-Off Ver
    Excel 2003
    Posts
    15

    Re: Read date value and delete if...

    However, if You want to test it, change the 7th line of the code to:
    Please Login or Register  to view this content.
    This will pretend, that it is friday, 26.11.2010 today and show You another result right now.

  8. #8
    Forum Contributor
    Join Date
    03-09-2010
    Location
    Oslo, Norway
    MS-Off Ver
    Excel 2003
    Posts
    173

    Re: Read date value and delete if...

    Thanks for your help and have a nice day.

+ 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