Explanation
The Excel NETWORKDAYS function calculates the number of working days between two dates. NETWORKDAYS automatically excludes weekends (Saturday and Sunday) and can optionally exclude a list of holidays supplied as dates.
For example, in the screenshot shown, the formula in D6 is:
=NETWORKDAYS(B6,C6) // returns 5
This formula returns 5 since there are 5 working days between December 23 and December 27, and no holidays have been provided. Note that NETWORKDAYS includes both the start and end dates in the calculation if they are workdays.
NETWORKDAYS can also exclude a custom list of holidays. In the next cell down, we use the same formula with the same dates, plus a list of holidays in B10:B11.
=NETWORKDAYS(B7,C7,B10:B11) // returns 3
This formula returns 3, since two of the 5 days are holidays.
Workdays remaining from today
To calculate the number of workdays remaining from today, you can use WORKDAY with the TODAY function like this:
=NETWORKDAYS(TODAY(),A1)
where cell A1 contains an end date in the future.
Custom weekends
If you need take into account custom weekends (i.e. weekends are Saturday only, Sunday and Monday, etc.) you'll need to switch to the more robust NETWORKDAYS.INTL function, which allows you to set what days of the week are considered are considered weekends, by supplying a weekend argument in the form of a numeric code.
Need a date?
If you need a date n workdays in the past or future, see the WORKDAY function.