+ Reply to Thread
Results 1 to 3 of 3

Filtering on date range, but capturing items that 'straddle' the range

  1. #1
    Registered User
    Join Date
    08-20-2013
    Location
    NZ
    MS-Off Ver
    Excel 2010
    Posts
    17

    Filtering on date range, but capturing items that 'straddle' the range

    Hi All, I have posted this previously, but I have rephrased it. Hopefully I have explained it more clearly and someone can help me.

    I need to filter items based on a date range, but it is more complex than just >= & <=.

    The items being filtered were ‘cooked’ over a period of days. Throughout the cook process, they are contributing to the finished product.

    So for example, if it was cooked 01/01/01 to 03/01/01, would be contributing on 01, 02 & 03/01/01.

    I need to filter on the ‘batch’ of finished product (product type, start and end date), to generate a list of contributing product.

    I originally did:
    Product = product type
    Start of cook date >= start of batch date
    End of cook date <= end of batch date

    This works up to a point, BUT, it does not capture any items with start/finish dates that ‘straddle’ the batch dates.

    Example:
    Batch dates 02/01/01 - 05/01/01
    Filter would not pick up product example above, cooked 01/01/01 to 03/01/01 (start date is not >= batch start), but it would have contributed on 02 & 03/01/01.

    I have attached a cut down version of the s/s I’ve been working on. Filters are in VBA module, run from sheet1 buttons (Source Document Report), list of items to be filtered sheet2 (Incoming EDs).

    Any help would be greatly appreciated. Can it be done?? Let me know if you need more information.
    Book2.zip
    Last edited by Kite3; 08-28-2013 at 10:29 PM. Reason: Solved

  2. #2
    Registered User
    Join Date
    08-20-2013
    Location
    NZ
    MS-Off Ver
    Excel 2010
    Posts
    17

    Re: Filtering on date range, but capturing items that 'straddle' the range

    Solution at http://www.mrexcel.com/forum/excel-q...dle-range.html

  3. #3
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Filtering on date range, but capturing items that 'straddle' the range

    Thank you for posting the solution.

    Remember this for future reference - Do not crosspost your question on multiple forums without including links here to the other threads on other forums. This should be done when you post the question itself so others know that it has been posted in multiple forums.

    Cross-posting is when you post the same question in other forums on the web. The last thing you want to do is waste people's time working on an issue you have already resolved elsewhere. We prefer that you not cross-post at all, but if you do (and it's unlikely to go unnoticed), you MUST provide a link (copy the url from the address bar in your browser) to the cross-post.

    Expect cross-posted questions without a link to be closed and a message will be posted by the moderator explaining why. We are here to help so help us to help you!

    Read this to understand why we ask you to do this, and then please edit your first post to include links to any and all cross-posts in any other forums (not just this site).
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

+ 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. [SOLVED] Filtering a date range within a date range?
    By Kite3 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 08-29-2013, 12:03 AM
  2. [SOLVED] Dynamic Named Range not capturing the whole range
    By nickmax1 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-26-2013, 12:34 PM
  3. Replies: 4
    Last Post: 10-10-2012, 03:38 PM
  4. filtering date range in excel
    By martinz in forum Excel General
    Replies: 5
    Last Post: 10-10-2009, 12:26 AM
  5. [SOLVED] Filtering a Date Range
    By Leslie P via OfficeKB.com in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-11-2005, 12:05 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