Share via

Using the IF and WORKDAY function together

Anonymous
2024-06-05T19:24:34+00:00

How can I get my formula to only show WORKDAYS with the IF function I am currently using? My formula currently works but it calculates all days, and I need it calculate just work days.

Column B is the Due Date for assets

Column C is the date the assets were actually posted

Column D is the formula =IF(C2=B2,"On Time",IF(C2<B2,"Ahead of Schedule",(C2-B2)&" Days Past Due"))

Asset Due Date (Column B) Asset Posted Date (Column C) Assethub <br>Days Late (FORMULA)
23-Feb 20-Feb Ahead of Schedule
23-Feb 20-Feb Ahead of Schedule
1-Mar 4-Mar 3 Days Past Due

I tried using this formula =IF(WORKDAY(C2=B2,"On Time",IF(C2<B2,"Ahead of Schedule",(C2-B2)&" Days Past Due"))) but it says there is an error with my formula. I have tried NETWORKDAYS.INTL but it does not produce what I need (i.e. I don't want a number to be produced if something was delivered on the due date).

How can I get the formula to only show WORKDAYS with the IF function I am currently using?

Microsoft 365 and Office | Excel | For business | MacOS

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

HansV 462.6K Reputation points
2024-06-05T20:01:53+00:00

=IF(C2=B2,"On Time",IF(C2<B2,"Ahead of Schedule",NETWORKDAYS.INTL(B2,C2)&" Days Past Due"))

Was this answer helpful?

0 comments No comments

0 additional answers

Sort by: Most helpful