Here’s a step-by-step example of Networkdays.Intl() in an Excel worksheet. We suggest using that improved function over the older NetworkDays() with less options.
As usual, you can select the formulas tab and Excel will guide you through the process. From Formulas | Date & Time choose NETWORKDAYS.INTL .
It will open a dialog box to select your function arguments.
As you probably know, Microsoft Excel stores dates as serial numbers so that they can be used in calculations. For instance, January 1, 1900 is serial number 1, and January 1, 2020 is serial number 43831 because it is 43,831 days after January 1,1900.
Simple Example of NetworkDays.Intl
Calculate the total number of working days by inputting the function arguments directly into the dialog box, as shown in this example:
Better way to use NetworkDays.Intl()
It is a lot easier to create a table within Excel with all required arguments (start date, end date, holiday dates), particularly if you would like to exclude holidays as well. That way you don’t have the mess about with the formula, just change the cells which control it.
This allows you to easily amend dates in future. For this example, we will calculate the number of working days within April.
*Excel should automatically convert to a date when you type into a cell something it recognizes as a date. If not the DATE function can do the job.
Start Date: 01 April 20 =DATE(2020,4,1)
End Date: 30 April 20 =DATE(2020,4,30)
Weekends: Saturday & Sunday (1)
Good Friday Fri 10-Apr-20
Holy Saturday Sat 11-Apr-20
Easter Sunday Sun 12-Apr-20
Easter Monday Mon 13-Apr-20
Anzac Day Sat 25-Apr-20 (Aussie version of Veterans Day)
Insert the NETWORKDAYS.INTL formula into the required cell and select the cells accordingly. We have calculated two different results, excluding weekends only and excluding weekends and public holidays.
Here’s the whole formula to count working days without weekends.
Better to define names for the main variables so the formula is more readable.
Weekend and Holidays
Where F2:F6 is all the holiday dates. It’s better to make the holiday list a table to take advantage of the auto-flexible listing and easier to understand.
Weekend and Holiday overlap
If a public holiday and weekend overlap it will only count as one non-working day. In the real world, when there’s an overlap between a public holiday and weekend, the following Monday may be declared a public holiday, so remember to add any ‘days in lieu’.
In this case, the two Saturday and one Sunday holidays don’t count because they are already ‘off’ days because of the weekend. There are only two ‘real’ holidays and that’s why the ‘working days with weekends and public holidays’ (D2) is 20, only 2 less than the weekends only value (C2).
- We’ve not forgotten about the Holiday option when it applies to ranges of dates like Vacations. It’s a lot more complicated than most NetworkDays() explanations would have you believe. We’re looking into it and will explain in an upcoming article.
- If any of the arguments you’ve provided are not entered as a valid date, NETWORKDAYS returns the dreaded #VALUE! error value. The function arguments dialog is an easy way to tell where the problem is.
- It’s easier to enter the holidays as a range of cells that contain the holiday dates (ie: F2:F6), however you can list the serial numbers too