+ Reply to Thread
Results 1 to 10 of 10

Determine if a date falls between a range of two dates

  1. #1
    Registered User
    Join Date
    07-11-2017
    Location
    Atlanta GA
    MS-Off Ver
    2010
    Posts
    12

    Determine if a date falls between a range of two dates

    Greetings,

    I need help figuring this one out. For every row in Table 1, I need to check if the Service date falls between the EFF Date and TERM Date of every row in Table 2 based on the matching subscriber ID. Any help is appreciated. The result should be represented in a Y/N indicator.

    Regards

    TABLE 1
    Service_Date Subscriber_Name_First Subscriber_Name_Last Subscriber_ID_Code
    8/16/2016 SMITH JOHN 456981235
    5/10/2016 SMITH JOHN 456981235
    9/6/2017 SMITH JOHN 456981235
    7/16/2016 SMITH JOHN 456981235
    4/16/2016 SMITH JOHN 456981235
    12/16/2015 SMITH JOHN 456981235


    TABLE 2
    SBSB_ID SBSB_LAST_NAME SBSB_FIRST_NAME MEPE_ELIG_IND MEPE_EFF_DT MEPE_TERM_DT
    456981235 SMITH JOHN N 1/1/1920 5/31/2006
    456981235 SMITH JOHN Y 6/1/2006 7/31/2006
    456981235 SMITH JOHN N 8/1/2006 9/30/2013
    456981235 SMITH JOHN Y 10/1/2013 7/31/2016
    456981235 SMITH JOHN N 8/1/2016 12/31/2199

  2. #2
    Forum Expert leelnich's Avatar
    Join Date
    03-20-2017
    Location
    Delaware, USA
    MS-Off Ver
    Office 2016
    Posts
    2,807

    Re: Determine if a date falls between a range of two dates

    Do you want this as part of table 1, part of table 2, or some other arrangement?
    Last edited by leelnich; 07-12-2017 at 08:20 AM.

  3. #3
    Registered User
    Join Date
    07-11-2017
    Location
    Atlanta GA
    MS-Off Ver
    2010
    Posts
    12

    Re: Determine if a date falls between a range of two dates

    Table 1.

    Thank You

  4. #4
    Forum Expert leelnich's Avatar
    Join Date
    03-20-2017
    Location
    Delaware, USA
    MS-Off Ver
    Office 2016
    Posts
    2,807

    Re: Determine if a date falls between a range of two dates

    This (in Table 1) would indicate whether the associated date fell within ANY period listed in Table 2 for that subscriber.
    (The result was all "Y" with the sample):
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Is that what you wanted?

    Please click the Add Reputation star below any helpful posts, and if you have your answer, mark your thread as SOLVED (Thread Tools up top). Thanks!-Lee
    Last edited by leelnich; 07-12-2017 at 08:30 AM.

  5. #5
    Registered User
    Join Date
    07-11-2017
    Location
    Atlanta GA
    MS-Off Ver
    2010
    Posts
    12

    Re: Determine if a date falls between a range of two dates

    I think so. Normally both tables are in separate worksheets. Can you adjust the formula?

  6. #6
    Forum Expert leelnich's Avatar
    Join Date
    03-20-2017
    Location
    Delaware, USA
    MS-Off Ver
    Office 2016
    Posts
    2,807

    Re: Determine if a date falls between a range of two dates

    If the worksheets are in the same WORKBOOK, it shouldn't matter.
    If necessary, use the Name Manager on the Formula ribbon to change their Refers to: range.

    Please click the Add Reputation star below any helpful posts, and if you have your answer, mark your thread as SOLVED (Thread Tools up top). Thanks!-Lee

  7. #7
    Registered User
    Join Date
    07-11-2017
    Location
    Atlanta GA
    MS-Off Ver
    2010
    Posts
    12

    Re: Determine if a date falls between a range of two dates

    Do I insert the formula in a new table column? I am sorry, I keep trying and getting formula errors.

  8. #8
    Forum Expert leelnich's Avatar
    Join Date
    03-20-2017
    Location
    Delaware, USA
    MS-Off Ver
    Office 2016
    Posts
    2,807

    Re: Determine if a date falls between a range of two dates

    Yes, in a new column. I've attached a sample workbook. The problem is likely one or more incorrect names in the formula.

    To attach a workbook:
    Click Edit Post (or just start a new reply.)
    Click Go Advanced
    Scroll down to Manage Attachments and click.
    Now just Browse for your file, then click Upload. Simple!


    Please click the Add Reputation star below any helpful posts, and if you have your answer, mark your thread as SOLVED (Thread Tools up top). Thanks!-Lee
    Attached Files Attached Files
    Last edited by leelnich; 07-12-2017 at 11:36 AM.

  9. #9
    Registered User
    Join Date
    07-11-2017
    Location
    Atlanta GA
    MS-Off Ver
    2010
    Posts
    12

    Re: Determine if a date falls between a range of two dates

    WOW. Works
    Thank you. How can I repay you?

  10. #10
    Forum Expert leelnich's Avatar
    Join Date
    03-20-2017
    Location
    Delaware, USA
    MS-Off Ver
    Office 2016
    Posts
    2,807

    Re: Determine if a date falls between a range of two dates

    You're most welcome, happy to help. If you have your answer, please mark your thread as SOLVED (Thread Tools up top). Thanks!-Lee

    ps. Clicking on the Add Reputation star below any helpful posts is always a nice gesture.

+ 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. Bypass procedure if date falls within a given range of dates
    By Steelmyster in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-18-2016, 10:36 AM
  2. Determine if a month falls between two dates - YEARS OVERLAPPING
    By eekbubble in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 05-18-2015, 12:03 PM
  3. [SOLVED] Check a date to find if it falls between a range of dates
    By Kausch in forum Excel General
    Replies: 3
    Last Post: 10-21-2014, 07:56 AM
  4. [SOLVED] Returning a date from a range if date falls between two other dates
    By sdavison in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 06-25-2013, 03:59 AM
  5. [SOLVED] Value with Corresponding Date if Falls Within Range of Dates
    By ebdmbfan in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-26-2012, 09:14 AM
  6. Replies: 3
    Last Post: 07-31-2012, 04:44 PM
  7. Replies: 3
    Last Post: 05-30-2011, 01:37 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