Tuesday, May 22, 2012

NETWORKDAYS Function

Requests for various workbooks have come in over the years that included the need to determine the number of billing or invoicing days in the period selected by the user.  If the company invoices every workday then this can be done using the NETWORKDAYS function.  This function counts the number of days between two dates inclusive and excludes weekends.  Holidays and/or any specified day off can also be excluded.


The syntax for the NETWORKDAYS function is:
=NETWORKDAYS(Start_date, End_date,Holidays)

Where:
"Start_date" = The first day of the selected Period
"End_date" = The last day of the selected Period
"Holidays" = The date or range of dates to be excluded from the Period.  The "Holidays" argument is optional.


The data could be entered into a table similar to the one here.  This would usually be done on a hidden worksheet



If =NETWORKDAYS(B1, B2, B4:B11) is entered using the data above the result will be 22.  This result is then available for other calculations in the workbook.

NOTE:  If this function is not available, and returns the #NAME? error, install and load the Analysis ToolPak add-in.

No comments:

Post a Comment