Explanation

First, this formula determines a “start date”.

In the generic form of the formula, n represents “nth”.

The next step is to calculate the adjustment required to reach the final result.

Excel formula: Get last working day in month

Day of week is abbreviated “dow” in the generic form of the formula.

Finally the calculated adjustment is subtracted from original start date to get the final result.

By default, WEEKDAY returns 1 for Sunday and 7 for Saturday, but this is configurable.

Excel formula: Get last weekday in month

you’re able to use the WEEKDAY function inside other formulas to check the day of week.

Excel DAY function

Excel WEEKDAY function