Results 1 to 10 of 10

Return value of 1 when the start date still running up to the end date or cancelled date

Threaded View

  1. #1
    Registered User
    Join Date
    03-24-2013
    Location
    Quezon City, Philippines
    MS-Off Ver
    Excel 2010/2013
    Posts
    83

    Return value of 1 when the start date still running up to the end date or cancelled date

    Hi,

    1.) I'm having a problem in my file which is I want to return a value of 1 when the contract start date is still running up to the contract end date -- it will exclude the all dates and consider only the dates in between.

    For example:
    The start date (column I) is November 20, 2014 and the end date (column K) is March 4, 2015. In this example, the month-year: November 2014 up to March 2015 will have a corresponding value of 1 and 0 to the other dates.

    September 2014 October 2014 November 2014 December 2014 January 2015 February 2015 March 2015 April 2015 May 2015
    0 0 1 1 1 1 1 0 0

    I used this formula which is I think is correct however I think this is too complicated. Is there anyway to simplify this code:
    =IF(OR(AND(MONTH(TEXT(DATEVALUE(INDEX(data!$I$2:$I$89,MATCH(Sheet1!$A3,data!$C$2:$C$89,0))),"MMMM YYYY"))<=MONTH(TEXT(DATEVALUE($B$2:$AK$2),"mmm YYY")),YEAR(TEXT(DATEVALUE(INDEX(data!$I$2:$I$89,MATCH(Sheet1!$A3,data!$C$2:$C$89,0))),"MMMM YYYY"))>=YEAR(TEXT(DATEVALUE($B$2:$AK$2),"mmm YYY"))),AND(MONTH(TEXT(DATEVALUE(INDEX(data!$K$2:$K$89,MATCH(Sheet1!$A3,data!$C$2:$C$89,0))),"MMMM YYYY"))>=MONTH(TEXT(DATEVALUE($B$2:$AK$2),"mmm YYY")),YEAR(TEXT(DATEVALUE(INDEX(data!$K$2:$K$89,MATCH(Sheet1!$A3,data!$C$2:$C$89,0))),"MMMM YYYY"))=YEAR(TEXT(DATEVALUE($B$2:$AK$2),"mmm YYY")))),1,0)
    2.) The other problem is that I have a cancellation date (column M) -- date when the client cancelled the contract. This will be the new contract end date instead of the old contract end date.

    For example:
    The start date (column I) is November 20, 2014 and the end date (column K) is March 4, 2015 and there has a cancellation date (column M) of January 12, 2015. In this example, the month-year: November 2014 up to January 2015 will have a corresponding value of 1 instead of November 2014 up to March 2015.

    September 2014 October 2014 November 2014 December 2014 January 2015 February 2015 March 2015 April 2015 May 2015
    0 0 1 1 1 0 0 0 0

    3.) If the cancellation date column doesn't have any value, the date that will be considered will be the contract end date.

    For the 2nd and 3rd question, I'm having a hard time thinking of the formula that can be used.


    **Kindly disregard any duplicates in the raw data for now.
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] subset of range defined by start date and date date in dedicated cells
    By Pragmaticite in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-23-2015, 05:30 PM
  2. Counting if data falls on date between Start Date, End Date or Possible End Date
    By JessHasQuestions in forum Hello..Introduce yourself
    Replies: 2
    Last Post: 07-26-2014, 08:01 AM
  3. Replies: 1
    Last Post: 10-02-2012, 02:42 PM
  4. Return cell value on calendar for all dates between start date & end date
    By mmctague in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-23-2012, 02:11 PM
  5. Replies: 2
    Last Post: 01-04-2012, 09:15 AM
  6. date between start & end date and return period
    By christy1125 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-04-2011, 03:08 PM
  7. Replies: 7
    Last Post: 11-16-2008, 05:48 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