+ Reply to Thread
Results 1 to 4 of 4

Delete every date out of an dateinterval

  1. #1
    Registered User
    Join Date
    04-20-2016
    Location
    Denmark
    MS-Off Ver
    2010
    Posts
    4

    Delete every date out of an dateinterval

    Hey guys

    Can anyone help make a macro that can delete every cell with a date out of an interval?

    I have a start and end date, but many more dates as you can see here:

    Udklip.JPG

    So the macro just has to delete every row with an date outside of the interval between my start and end date.

    Thank you
    Attached Images Attached Images
    Last edited by KasperDK; 04-20-2016 at 07:56 AM.

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Delete every date out of an dateinterval

    Use a helper column to flag rows to delete

    Sort by the helper column

    Delete

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window (or use the paperclip icon).
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

  3. #3
    Registered User
    Join Date
    04-20-2016
    Location
    Denmark
    MS-Off Ver
    2010
    Posts
    4

    Re: Delete every date out of an dateinterval

    Thank you for your answer.

    The problem is that i need to do the above for 100 sheets. Therefore it would be nice just to have my start and end date and then run the macro for each sheet.

  4. #4
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Delete every date out of an dateinterval

    Ok.

    We need to use a helper column

    What column is empty on each sheet?

    Are the dates in the same column in each sheet?

    Are there any dates which the macro should ignore?

+ 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. Macro to find Date Cells > Current Date and delete everything to left of that cell
    By LewisLonsdale in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-25-2015, 06:36 AM
  2. [SOLVED] VBA to loop through and delete all date except Yesterdays date.
    By shiva_reshs in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 07-09-2014, 11:30 AM
  3. Replies: 3
    Last Post: 11-23-2013, 06:21 AM
  4. RE: VBA Macro Needs Tweaking to Delete Rows Where Date As String is Less Than Today's Date
    By justinbelkin in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-05-2013, 04:54 PM
  5. Popup box asking the effective date, so macro can delete any dates < entered date.
    By shiva_reshs in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-07-2013, 07:40 AM
  6. [SOLVED] Extract date from cell and replace value with date then delete empty rows
    By jjislas in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-03-2013, 11:52 AM
  7. create macro to delete row with a date previous to current date
    By laserk7 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-25-2008, 12:36 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