Share via

Workday Formula Question

Anonymous
2024-11-21T20:49:12+00:00

This is my formula:

=IF($F13="","", If($E13="Annual", Workday(Edate($F13,12)-1,1,Control!$A$12:$A$68),If($E13="Every Two Years", Workday(Edate($F13,24)-1,1,Control!$A$12:$A$68),If($E13="Every Three Years", Workday(Edate($F13,36)-1,1,Control!$A$12:$A$68),If($E13="Every Four Years", Workday(Edate($F13,48)-1,1,Control!$A$12:$A$68),If($E13="Every Five Years", Workday(Edate($F13,60)-1,1,Control!$A$12:$A$68),""))))))

I would like to modify this formula so if a due date falls on a Saturday or Sunday, the due date will roll back to Friday.

Thank you for the help.

Microsoft 365 and Office | Excel | For business | Windows

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

2 answers

Sort by: Most helpful
  1. Ashish Mathur 102K Reputation points Volunteer Moderator
    2024-11-21T23:04:50+00:00

    Hi,

    This formula in cell F6 will return the date of the Friday in the previous week if the date in cell D6 is a Sat/Sun

    =D6-CHOOSE(WEEKDAY(D6,2),0,0,0,0,0,1,2)

    Hope this helps.

    Was this answer helpful?

    0 comments No comments
  2. HansV 462.6K Reputation points
    2024-11-21T22:52:08+00:00

    I'd create a two-column range with the descriptions in the first column and the number of months in the second column:

    Let's say it is Control!C12:D16.

    =IF($F13="", "", LET(n, XLOOKUP($E13, Control!$C$12:$C$16, Control!$D$12:$D$16, ""), IF(n="", "", WORKDAY(EDATE($F13, n)+1, -1, Control!$A$12:$A$68))))

    Was this answer helpful?

    0 comments No comments