I have a calculated column that will get the date difference between the two columns.
Conditions:
- Difference between Completed Date and Created Date.
- Weekend should not be counted.
- If Completed Date is blank it should get the difference between Modified Date and Created Date.
- Status column value should be Completed, else the output should be blank.
I have this and everything is working except if the Status column has any value other than Completed. It shows #NUM!
.
Been trying to use ISERROR but to no avail. Hope Anyone can help.
=IF(AND(ISBLANK([Completed Date]),[Status]="Completed"),(DATEDIF([Created],[Modified],"D"))-INT(DATEDIF([Created],[Modified],"D")/7)*2-
IF(WEEKDAY([Modified])<WEEKDAY([Created]),2,
IF(OR(WEEKDAY([Modified])=7,WEEKDAY([Created])=1),1,0)),(DATEDIF([Created],[Completed Date],"D"))-INT(DATEDIF([Created],[Completed Date],"D")/7)*2-
IF(WEEKDAY([Completed Date])<WEEKDAY([Created]),2,
IF(OR(WEEKDAY([Completed Date])=7,WEEKDAY([Created])=1),1,0)))