+ Reply to Thread
Results 1 to 10 of 10

Fortnights between 2 specific dates

  1. #1
    Forum Contributor Portuga's Avatar
    Join Date
    02-20-2004
    Location
    Portugal
    MS-Off Ver
    365
    Posts
    852

    Fortnights between 2 specific dates

    Hi guys, it´s been a while and I could use some help.

    I would like a formula that returns "1" if the fortnight in question is within 2 specific dates "0" if it´s not.

    Please see the attached sheet for clarification.
    Any pointers would be awesome

    Thanks
    Attached Files Attached Files

  2. #2
    Forum Expert José Augusto's Avatar
    Join Date
    10-29-2014
    Location
    Portugal
    MS-Off Ver
    2013-2016
    Posts
    3,329

    Re: Fortnights between 2 specific dates

    Hi

    Use in G2 the following formula and copy down and forward
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  3. #3
    Forum Contributor Portuga's Avatar
    Join Date
    02-20-2004
    Location
    Portugal
    MS-Off Ver
    365
    Posts
    852

    Re: Fortnights between 2 specific dates

    Obrigado José!

    The formula works fine for the inputed values but I´ve encountered an issue when I change the dates.
    For example if I change the "Out date" to "16/01/2018", there should be another "1" on the second January section, but it remains "0".

  4. #4
    Forum Contributor Portuga's Avatar
    Join Date
    02-20-2004
    Location
    Portugal
    MS-Off Ver
    365
    Posts
    852

    Re: Fortnights between 2 specific dates

    This said, the formula will work fine for what I am looking for. My dataset will always start and end at the start/end of a fortnight an never in between so this solves my problem. Thanks again!

  5. #5
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Fortnights between 2 specific dates

    Try array entering this in G2 filling down and across. (There has to be a simpler way, but I have not found one.)

    If you aren’t familiar with array-entered formulas array enter means the formula must be committed from edit mode by simultaneously pressing and holding down Ctrl and Shift while hitting Enter.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Dave

  6. #6
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,901

    Re: Fortnights between 2 specific dates

    Quote Originally Posted by Portuga View Post
    Obrigado José!

    The formula works fine for the inputed values but I´ve encountered an issue when I change the dates.
    For example if I change the "Out date" to "16/01/2018", there should be another "1" on the second January section, but it remains "0".
    Edit:
    =IF(AND(INDEX($A$2:$A$49,2*COLUMNS($A$1:A$1)-1)>=$D2,INDEX($A$2:$A$49,2*COLUMNS($A$1:A$1)-1)<=$E2),1,0)

  7. #7
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,901

    Re: Fortnights between 2 specific dates

    Or:

    =(INDEX($A$2:$A$49,2*COLUMNS($A$1:A$1)-1)>=$D2)*(INDEX($A$2:$A$49,2*COLUMNS($A$1:A$1)-1)<=$E2)
    Last edited by Phuocam; 01-18-2018 at 12:24 AM.

  8. #8
    Forum Contributor Portuga's Avatar
    Join Date
    02-20-2004
    Location
    Portugal
    MS-Off Ver
    365
    Posts
    852

    Re: Fortnights between 2 specific dates

    Quote Originally Posted by FlameRetired View Post
    Try array entering this in G2 filling down and across
    This is so cool! It identifies the values without looking at columns A:B

    The only possible issue is when the "In Date" starts the year before the "Out Date".
    Actually, it´s not an issue it just means that the formula looks at the "In Date" year as its base calculation.

    Awesome

  9. #9
    Forum Contributor Portuga's Avatar
    Join Date
    02-20-2004
    Location
    Portugal
    MS-Off Ver
    365
    Posts
    852

    Re: Fortnights between 2 specific dates

    Quote Originally Posted by Phuocam View Post
    Or:

    =(INDEX($A$2:$A$49,2*COLUMNS($A$1:A$1)-1)>=$D2)*(INDEX($A$2:$A$49,2*COLUMNS($A$1:A$1)-1)<=$E2)
    Works like a charm. Thank you!

  10. #10
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Fortnights between 2 specific dates

    Thank you for the feedback, rep and marking your thread Solved.

+ 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. Replies: 13
    Last Post: 05-02-2016, 06:03 AM
  2. Need a minimum (earliest) date of 4 dates, but only of dates > a specific date.
    By HarvardMajesty in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-30-2016, 02:38 AM
  3. If dates are specific days, keep in specific cells
    By Cremorneguy in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 11-17-2015, 02:41 AM
  4. returning dates in between dates that matches a specific name
    By dpons in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-13-2015, 08:28 PM
  5. [SOLVED] Working with specific dates against Week Commencing dates
    By daveb86 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 04-11-2015, 05:36 AM
  6. Replies: 2
    Last Post: 12-17-2013, 06:30 AM
  7. Pulling specific dates out of a list of dates
    By bohodgman in forum Excel General
    Replies: 3
    Last Post: 08-07-2013, 01:09 AM

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