When working with dates and time in Excel, the NETWORKDAYS function is a powerful tool for calculating the number of working days between two dates. However, one common question that arises is whether this function includes holidays in its calculations. Let's delve into this topic to provide a clear understanding.

Before we proceed, it's crucial to note that the NETWORKDAYS function in Excel does not inherently account for holidays. It calculates the number of working days based on a standard five-day week (Monday to Friday), excluding weekends. Holidays, however, are not automatically factored in.

Understanding Excel's NETWORKDAYS Function
The syntax for the NETWORKDAYS function is as follows:

NETWORKDAYS(start_date, end_date, [holidays])
As you can see, there is an optional parameter for 'holidays'. This parameter allows you to specify a range of cells containing holiday dates. If you include this parameter, the function will exclude these holidays from its calculation.

Including Holidays in NETWORKDAYS Calculation
To include holidays in your NETWORKDAYS calculation, you need to provide the function with a range of cells containing the holiday dates. For instance, if you have a list of holidays in cells A1:A10, you would use the function like this:
NETWORKDAYS(A1, B1, A1:A10)

In this example, the function will calculate the number of working days between the start date (A1) and the end date (B1), excluding the holidays listed in cells A1:A10.
Automatically Updating Holidays
If you want to automatically update your holiday list each year, you can use a combination of Excel's DATE, YEAR, and other functions. For example, to list all holidays in January for the next five years, you could use an array formula like this:

=DATE(YEAR(TODAY())+1:YEAR(TODAY())+5, 1, 1)
This formula will return an array of serial dates representing the first day of each January for the next five years. You can then copy this formula to other cells to generate the rest of your holiday list.




















Alternative Methods for Including Holidays
If you prefer not to use the NETWORKDAYS function, there are other methods for calculating working days that include holidays. One common approach is to use conditional formatting to highlight non-working days in your date range, then count the number of working days manually or using a formula like COUNTIF.
Using Conditional Formatting
To highlight weekends and holidays in your date range, you can use conditional formatting with a formula like this:
=OR(WEEKDAY(A1, 2)>5, COUNTIF($A$1:$A$10, A1)>0)
This formula will apply formatting to cells that represent weekends (WEEKDAY function) or holidays (COUNTIF function). You can then count the number of non-formatted cells to find the number of working days.
Using COUNTIF with Wildcards
Another method is to use the COUNTIF function with wildcards to count the number of working days. For instance, if your holiday list is in cells A1:A10, you could use a formula like this:
=COUNTIF(A1:B10, "<>"&TEXT(A1, "ddd"))
This formula will count the number of cells in the range A1:B10 that do not contain a three-letter day of the week (generated by the TEXT function). This effectively counts the number of working days, excluding weekends and holidays.
In conclusion, while the NETWORKDAYS function in Excel does not inherently include holidays, you can modify it to do so by providing a list of holiday dates. If you prefer not to use this function, there are other methods for calculating working days that include holidays. Understanding these methods can help you work more efficiently with dates and time in Excel.