I have a folmula but need help editing it. The way the formula works now is, I enter a start date and an end date and it give me the result as so: 3 years, 5 months, 17 days
What I am trying to accomplish is to put a bit more logic in so that it would read the dates and if the days were greater than 10, it would add another month. So, it would actually read: 3 years 6 months.
Below is the formula:
=YEAR(C10)-YEAR(B10)-IF(OR(MONTH(C10)<MONTH(C10),AND(MONTH(C10)=MONTH(B10),DAY(C10)<DAY(B10))),1,0)&" years, "&MONTH(C10)-MONTH(B10)+IF(AND(MONTH(C10)<=MONTH(B10),DAY(C10)<DAY(B10)),11,IF(AND(MONTH(C10)<MONTH(B10),DAY(C10)>=DAY(B10)),12,IF(AND(MONTH(C10)>MONTH(B10),DAY(C10)<DAY(B10)),-1)))&" months, "&NETWORKDAYS(C10-(C10-DATE(YEAR(C10),MONTH(C10)-IF(DAY(C10)<DAY(B10),1,0),DAY(B10))),C10)&" days"
If you enter March 7, 1971 as a start date in B10 and August 29, 1974 in C10 you will get the result.
Any help would be greatly appreciated.
Bookmarks