The Excel Networkdays function calculates the number of whole work days between two supplied dates. This includes all weekdays (Mon – Fri), excluding a supplied list of holidays.
Syntax: NETWORKDAYS( start_date, end_date, [holidays] )
|start_date||–||The start of the period for which we are counting days
(the start date is counted in the returned number of days)
|end_date||–||The end of the period for which we are counting days
(the end date is counted in the returned number of days)
|[holidays]||–||An optional argument, which specifies an array of dates (in addition to weekends) that are not to be counted as working days|
Note that the start_date, end_date and [holidays] arguments should be input as either references to cells containing dates or dates returned from formulas. If you attempt to input these date arguments as text, Excel may misinterpret them, due to different date systems, or date interpretation settings.
Warning: Although you can input date arguments as date serial numbers, this is not recommended as date serial numbering does vary across different computer systems.
Networkdays Function Examples
The spreadsheets below show simple examples of the Excel Networkdays function calculating the number of work days between the two dates 01-Dec-2010 and 05-Jan-2011. The format of the function is shown in the top spreadsheet and the results are shown below.
In the above spreadsheet :
- The holidays array has been omitted from the calculation in cell A8. Therefore this result excludes Saturdays and Sundays but includes all other weekdays, including the holidays at Christmas and New Year.
- In the examples in cells A9 and A10 the holidays array (in cells B3 – B5) is provided to the Networkdays function. Therefore the calculation excludes Saturdays and Sundays and the listed Christmas and New Year holidays.
Networkdays Function Errors
If you get an error from the Excel Networkdays function this is likely to be one of the following :
#VALUE! – Occurs if any of the supplied arguments are not valid dates
#NAME? – Occurs when Analysis ToolPak add-in is not enabled in your Excel. You will need to enable this if you want to use the Excel Networkdays function.