Ever needed to calculate working days between two dates in Excel? While Excel doesn't have a built-in function for this, you can create a formula using NETWORKDAYS and other functions. Let's dive into how to do this, step by step.

Before we start, ensure you have the Analysis ToolPak add-in enabled. Go to File > Options > Add-Ins, select 'Excel Add-Ins' in the Manage box, then click Go... and check 'Analysis ToolPak'.

Understanding NETWORKDAYS Function
The NETWORKDAYS function calculates the number of whole workdays between two dates. It excludes weekends and holidays. Here's the syntax:

NETWORKDAYS(start_date, end_date, [holidays])
The 'holidays' argument is optional and allows you to specify a range of dates to exclude from the calculation.

Basic Working Days Calculation
Let's start with a simple example. Suppose you want to find the number of working days between January 1, 2022, and December 31, 2022. In cell A1, enter NETWORKDAYS("1/1/2022", "12/31/2022"). Press Enter, and you'll see the result.
This formula calculates the number of working days between the two dates, excluding weekends. If you want to exclude specific holidays, you can do so by adding a range of holiday dates as the third argument.

Including Holidays in the Calculation
Suppose you want to exclude New Year's Day (January 1, 2022) and Christmas Day (December 25, 2022). In cell A2, enter NETWORKDAYS("1/1/2022", "12/31/2022", {"1/1/2022","12/25/2022"}). Press Enter, and you'll see the updated result.
In this formula, {"1/1/2022","12/25/2022"} is an array of holiday dates. You can add more holidays by separating them with commas.

Calculating Working Days for Multiple Date Ranges
Now, let's say you want to calculate working days for multiple date ranges. You can use the NETWORKDAYS function in combination with other functions like IF and SUM.




















Using IF and NETWORKDAYS
Suppose you have two date ranges: January 1, 2022, to March 31, 2022, and April 1, 2022, to June 30, 2022. In cell A3, enter IF(A1>="1/1/2022",NETWORKDAYS("1/1/2022","3/31/2022"),0). In cell A4, enter IF(A1<="6/30/2022",NETWORKDAYS("4/1/2022","6/30/2022"),0). In cell A5, enter SUM(A3:A4).
This formula calculates the number of working days for each date range and sums them up. The IF function ensures that the NETWORKDAYS function only calculates the days within the specified date range.
Using SUMIFS and NETWORKDAYS
If you have a large dataset with multiple date ranges, you can use SUMIFS and NETWORKDAYS to calculate the total working days. Suppose you have dates in column A and corresponding end dates in column B. In cell A6, enter SUMIFS(NETWORKDAYS(A2:A100,B2:B100),A2:A100,">="&A$1,NETWORKDAYS(A2:A100,B2:B100),"<="&A$2).
This formula calculates the number of working days for each date range and sums them up. The SUMIFS function ensures that only the date ranges within the specified start and end dates are included in the calculation.
And there you have it! You now know how to calculate working days in Excel using the NETWORKDAYS function. Happy calculating!