How to Use NETWORKDAYS Function in Excel (3 Suitable Examples)

In Microsoft Excel, the NETWORKDAYS function is used to count the number of dates between two specific dates. In this article, you’ll get to learn how to use this NETWORKDAYS function efficiently in Excel.

networkdays function overview

The above screenshot is an overview of the article which represents an application of the NETWORKDAYS function in Excel. You’ll learn more about the dataset as well as the methods and functions to count dates under different criteria in the following sections of this article.


Download Practice Workbook

You can download the Excel Workbook that we’ve used to prepare this article.


Introduction to NETWORKDAYS Function

  • Function Objective:

Returns the number of whole workdays between two dates.

  • Syntax:

=NETWORKDAYS(start_date, end_date, [holidays])

  • Arguments Explanation:
Arguments  Compulsory/Optional Explanation
start_date Compulsory Starting date between two specified dates.
end_date Compulsory End date between two specified dates.
[holidays] Optional Range of cells containing holidays as date format.
  • Return Parameter:

The number of days in numerical value.


3 Suitable Examples of Using NETWORKDAYS Function in Excel

1. NETWORKDAYS Function to Count Dates between Two Dates Excluding Weekends Only

In the picture below, Column B and Coumn C have a few start dates and end dates. Column D represents the total number of days between two dates from the previous two columns. In Column E, we’ll find out the number of working days excluding weekends (Saturday and Sunday).

networkdays function to exclude weekends only

📌 Steps:

➤ Select the output Cell E5 and type:

=NETWORKDAYS(B5,C5)

➤ Press Enter, use the Fill Handle to autofill the rest of the cells in Column E and you’re done.

You’ll get the number of working days between two dates excluding weekends at once.

networkdays function to exclude weekends only

Read more: How to Use NETWORKDAYS.INTL Function in Excel


2. NETWORKDAYS Function to Count Dates between Two Dates Excluding Weekends & Holidays

Now, we’ll include holidays in our function and the function will return with the number of working days between two dates excluding both weekends and the selected holidays from the range of cells D10:D18.

📌 Steps:

➤ Select Cell E5 and type:

=NETWORKDAYS(B5,C5,$D$10:$D$18)

➤ Press Enter, autofill the rest of the column with the Fill Handle and you’ll find the expected results right away.

networkdays function to exclude weekends and holidays in excel

Here, we have used absolute cell references for the range of cells containing holidays. If you don’t use absolute cell references here, then the cell references will change while auto-filling the cells in Column E, and the counting days will be incorrect.

Read more: How to Use DATE Function in Excel


3. NETWORKDAYS Function to Count Dates between Two Dates Formatted as Text Strings

Sometimes we may have to count the number of working days between two dates that are in text format. In the picture below, Column B and Column C are representing a few start dates and end dates but they are not in number or date format. So, what we have to do is convert these text dates into the date codes by using the DATEVALUE function and then the NETWORKDAYS function will find the number of working dates between two dates.

networkdays function to count days between two dates formatted as texts

📌 Steps:

➤ In Cell D5, the related formula will be:

=NETWORKDAYS(DATEVALUE(B5),DATEVALUE(C5),$D$10:$D$18)

➤ After pressing Enter and auto-filling the rest of the cells in Column D, you’ll get the number of days between two dates excluding weekends and holidays for each case in Columns B and C.

networkdays function to count days between two dates formatted as texts

Read more: How to Use DAY Function in Excel


💡 Things to Keep in Mind

🔺 By default, the NETWORKDAYS function recognizes only Saturday and Sunday as weekends and you cannot customize these weekends. In this case, you have to use NETWORKDAYS.INTL function to customize weekends.

🔺 You have to be careful about inputting the start_date and end_date arguments sequences. Otherwise, the function will return with a negative value.

🔺 While inputting a range of cells containing holidays, make sure to use absolute cell references for holidays argument.


Concluding Words

I hope all of the methods mentioned above to use the NETWORKDAYS function will now allow you to apply them in your Excel spreadsheets more effectively. If you have any questions or feedback, please let me know in the comment section. Or you can check out our other articles related to Excel functions on this website.


You May Also Like to Explore

Nehad Ulfat

Hello, Welcome to my profile. I'm a Technical Content Creator as well as a Naval Architect & Marine Engineer. I have preferences to do analytical reasoning & writing articles on various statistical data. Here, you'll find my published articles on Microsoft Excel & other topics related to my interests!

We will be happy to hear your thoughts

Leave a reply

ExcelDemy
Logo