Excel - NETWORKDAYS Function



NETWORKDAYS Function

The Excel NETWORKDAYS function will retrieve the number of working days between start_date and end_date, excluding the federal/state holidays. It is listed under the Date & Time function category in Microsoft Excel. This function is very beneficial in incident response management, where you may evaluate the number of working days, excluding company holidays, when the incident response team is fully available to resolve multiple incidents.

Compatibility

This advanced Excel function is compatible with the following versions of MS-Excel −

  • Excel for Microsoft 365
  • Excel for Microsoft 365 for Mac
  • Excel for the web
  • Excel 2024
  • Excel 2024 for Mac
  • Excel 2021
  • Excel 2021 for Mac
  • Excel 2019
  • Excel 2016
  • Excel 2013
  • Excel 2010
  • Excel 2007

Syntax

The syntax of the NETWORKDAYS function is as follows −

=NETWORKDAYS(start_date, end_date, [holidays])

Arguments

You can use the following arguments with the NETWORKDAYS function −

Argument Description Required/ Optional
Start_date It specifies the date serial number or the Date invalid date format, which denotes the beginning date. Required
End_date It specifies the end date in the serial number or the Date. Required
Holidays It indicates a cell range comprised of the holiday dates, which will be excluded when evaluating the NETWORKDAYS function. Optional

Points to Remember

  • In Microsoft Excel, Dates are stored as serial numbers that ease the analyst's use in complex calculations. By default, serial number 1 indicates January 1, 1900, and serial number 40990 indicates March 3, 2012.
  • If the invalid date is specified in the arguments, NETWORKDAYS returns the #VALUE! error.

How to use the NETWORKDAYS Function in Excel?

Various steps are written below −

Step 1 − Open a desired Excel worksheet and select a cell where the NETWORKDAYS function's result will be displayed.

Step 2 − Double-click on the targeted cell and type the formula =NETWORKDAYS(select the cell reference that points to the start date and the other cell reference that refers to the end date).

Step 3 − Write the comma (,) and select the cell range containing the dates to be excluded.

Step 4 − Enclose the bracket ) and hit the Enter tab.

Examples of NETWORKDAYS Function

Practice the following examples to learn how to execute the NETWORKDAYS function in Excel.

Example 1: How to Calculate the Working Days between Start Date and End Date in Excel?

In this example, we will use the NETWORKDAYS function to extract the working days between the start and end dates.

Solution

Step 1 − First, assume the sample dataset, where the different serial numbers specifying the Start and End Date are defined in the B and C columns.

Calculate Working Days between Start and End Date1

Step 2 − Afterward, select the cell range D2:D5 and write the formula =NETWORKDAYS(B2,D2)

Calculate Working Days between Start and End Date2

Moreover, press the Ctrl+Enter tab to compute the NETWORKDAYS function.

Calculate Working Days between Start and End Date3

If the invalid date is provided in the Start date and End date arguments, the NETWORKDAYS function retrieves the #VALUE! error.

Example 2: Using Conditional Statement

In this example, we will evaluate the working days of a graduate engineering trainee by setting the criteria using an if statement. If the end date is empty, GET is still working in the company; otherwise, the number of working days would be evaluated. The start date denotes the candidate's joining date, and the End Date denotes the completion of their training.

Solution

Consider the sample dataset, which comprises four columns named "Trainee name", "Start Date", "End Date", "Total number of working days", and "Company holidays". Select the cell range E3:E6 and type the formula =IF(ISBLANK(D3), "Still working", NETWORKDAYS(C3, D3, $F$3:$F$6)) in the formula bar.

In this expression, we will first verify whether the D3 cell is blank. If this condition is TRUE, the text "Still working" will be displayed. Otherwise the expression NETWORKDAYS(C3, D3, $F$3:$F$6)) is evaluated.

Using Conditional Statement1

After that, hit the "Ctrl+Enter" to get the computed result.

Using Conditional Statement2

Download Practice Sheet

You can download and use the sample data sheet to practice the NETWORKDAYS function.

Advertisements