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.
Bookmarks