+ Reply to Thread
Results 1 to 11 of 11

Remove rows where value is not between two dates

  1. #1
    Registered User
    Join Date
    09-24-2011
    Location
    Australia
    MS-Off Ver
    Excel 2003
    Posts
    6

    Remove rows where value is not between two dates

    Hi Guys,

    I have an spreadsheet where I would like to run an macro that will delete rows where the dates are not between to dates (WHS Dashboard C3) and (WHS Dashboard H3).

    The table of data is stored in an WB called Open Incidents and the dates are stored in Coll C

    Thanks for your help

  2. #2
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Remove rows where value is not between two dates

    attach please a sample file with data and desired result
    If solved remember to mark Thread as solved

  3. #3
    Registered User
    Join Date
    09-24-2011
    Location
    Australia
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Remove rows where value is not between two dates

    The file can be found at
    HTML Code: 
    All incidents between the to dates (WHS Dashboard C3) and (WHS Dashboard H3) should be removed...
    Attached Files Attached Files
    Last edited by tbourne; 07-13-2013 at 02:32 AM.

  4. #4
    Forum Expert Solus Rankin's Avatar
    Join Date
    05-24-2013
    Location
    Hollywood, CA
    MS-Off Ver
    Win7 Office 2010 VS Express 2012
    Posts
    2,655

    Re: Remove rows where value is not between two dates

    tbourne,

    If you click the 'Go Advance' button below, and then the paper clip in the toolbar you can attached your work to your posts here.

    No need to use a cloud.
    Thanks,
    Solus


    Please remember the following:

    1. Use [code] code tags [/code]. It keeps posts clean, easy-to-read, and maintains VBA formatting.
    Highlight the code in your post and press the # button in the toolbar.
    2. Show appreciation to those who have helped you by clicking below their posts.
    3. If you are happy with a solution to your problem, mark the thread as [SOLVED] using the tools at the top.

    "Slow is smooth, smooth is fast."

  5. #5
    Forum Expert Solus Rankin's Avatar
    Join Date
    05-24-2013
    Location
    Hollywood, CA
    MS-Off Ver
    Win7 Office 2010 VS Express 2012
    Posts
    2,655

    Re: Remove rows where value is not between two dates

    Your ws has July 1st in both cells. No dates fall between July 1st and july 1st.

  6. #6
    Registered User
    Join Date
    09-24-2011
    Location
    Australia
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Remove rows where value is not between two dates

    Thanks for that XeRo... I will me more then happy if you change the dates 01 June 2013 - 01 July 13

  7. #7
    Forum Expert Solus Rankin's Avatar
    Join Date
    05-24-2013
    Location
    Hollywood, CA
    MS-Off Ver
    Win7 Office 2010 VS Express 2012
    Posts
    2,655

    Re: Remove rows where value is not between two dates

    so you want to remove all rows in sheet 2 if the date in column b falls in between the dates in cells c3 and h3 on sheet 1?

  8. #8
    Registered User
    Join Date
    09-24-2011
    Location
    Australia
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Remove rows where value is not between two dates

    Hi XeRo... that's Correct

  9. #9
    Forum Expert Solus Rankin's Avatar
    Join Date
    05-24-2013
    Location
    Hollywood, CA
    MS-Off Ver
    Win7 Office 2010 VS Express 2012
    Posts
    2,655

    Re: Remove rows where value is not between two dates

    try

    Please Login or Register  to view this content.

  10. #10
    Registered User
    Join Date
    09-24-2011
    Location
    Australia
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Remove rows where value is not between two dates

    Hi,

    That does nothing... Could you maybe place this in the work book and then upload that?

  11. #11
    Forum Expert Solus Rankin's Avatar
    Join Date
    05-24-2013
    Location
    Hollywood, CA
    MS-Off Ver
    Win7 Office 2010 VS Express 2012
    Posts
    2,655

    Re: Remove rows where value is not between two dates

    It works on your example spreadsheet if you change the dates.

    Make sure you add data to your worksheet and that the dates fall between your dates on cover sheet.WHS Reporting Dashboard.xlsm

+ 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