EDATE

Posted on 22-01-2020 , by: admin , in , 0 Comments

edate

The company decide not to end contracts on Saturday or Sunday. The =WEEKDAY() function has been used to identify the actaul weekday number of the end date. If the week day number is 6 or 7, (Sat or Sun), then 5 is subtracted from the =EDATE() to ensure the end of contract falls on a Friday.

Start Duration End
Tue 06-Jan-98 3 Mon 06-Apr-98
Mon 12-Jan-98 3 Fri 10-Apr-98
Fri 09-Jan-98 4 Fri 08-May-98
Fri 09-Jan-98 3 Thu 09-Apr-98
Mon 19-Jan-98 3 Fri 17-Apr-98
Mon 26-Jan-98 3 Fri 24-Apr-98
Mon 12-Jan-98 3 Fri 10-Apr-98


=EDATE(C48,D48)- IF(WEEKDAY(EDATE(C48,D48),2)>5, WEEKDAY(EDATE(C48,D48),2) -5,0)

Leave a comment