In this article, we will learn How to use the NETWORKDAYS.INTL function in Excel.
What are working and non working days ?
Usually Saturdays and Sundays are weekends meaning non working days. Sometimes calculating the total work days between two dates, we can manually calculate the number of days between the days and subtract the number of days. This doesn't look easy and can lead to mistakes if the two given dates are too much apart. So for this we usually use NETWORKDAYS Function in Excel. NETWORKDAYS function has the fixed type of weekend which is Saturday and Sunday. So now we learn the extended version of NETWORKDAYS function which lets you edit the weekends as per choice.
NETWORKDAYS.INTL Function in Excel
NETWORKDAYS.INTL function is a date and time function which returns the number of working days as a number. It takes start_date, end_date the two given dates. There are two optional arguments along given dates.
NETWORKDAYS.INTL Function syntax:
|=NETWORKDAYS.INTL (start_date, end_date, [weekend], [holidays])|
start_date : counting start date
end_date : counting end date
[weekend] : days of week considered as weekends. Default is 1 (Saturday & Sunday)
[holidays] : array reference of days considered as non working days.
More about Weekend argument :
Weekend argument takes the number argument which denotes the pattern of non working days in a week. Default is 1 (Sat & Sun as weekend). For more inspect the below table
|Weekend argument||Non-working days in week|
|1 (default)||Saturday, Sunday|
The above shown shows the default numbers which can be selected from the popular non working days. You can customize the type of non working days using masking week days. Provide the 7 digit weekend argument with quotes representing 1 means weekend and 0 means workday. For Example if the non-working days in the week are Tuesday, Wednesday, Saturday and Sunday then mask argument will be "0101011" starting from monday.
All of these might be confusing to understand. Let's understand how to use the function using an example. Here we have some sample dates where we need to find the total working days between the two given dates where Saturday and Sunday are non working days and considering national holidays as working days.
Use the formula:
As you see there are 28 working days between the dates taking Sat & Sun as default non working days.
Now we want to take the only Sunday as non working day in the week and considering national holidays as non working days. Here national holidays are called as holidays using named range.
Use the formula:
|=NETWORKDAYS.INTL(B5, C5, 11, holidays)|
11 : argument for the Sunday as only non working days in a week
As you can see the formula returns 68 days. This formula is very useful for the government employees as per conditions explained.
Now an example is explained using the masking days in week. Considering all working days in a week and all national holidays as working.
Use the formula:
|=NETWORKDAYS.INTL(B6, C6, "0000000")|
1 means non workday and 0 means workday
As you can see, there are 50 working days between the two dates. Similarly you can find the working days between any two given dates. Below are some more examples.
In the D7 cell, Tuesday, Thursday, Saturday and Sunday are taken as non work days. But in the D8 cell you must be curious to know how the number of days can be negative. Yes you are right, days cannot be negative. The negative sign denotes that the end_date and start date are not in correct order whereas the magnitude 11 denotes the number of working days between the two dates.
You can use the NETWORKDAYS Function if the weekend days are fixed as Saturday and Sunday.
Here are all the observational notes using the NETWORKDAYS.INTL function in Excel
Hope this article about How to use the NETWORKDAYS.INTL function in Excel is explanatory. Find more articles on date and time formulas and related Excel functions here. If you liked our blogs, share it with your friends on Facebook. And also you can follow us on Twitter and Facebook. We would love to hear from you, do let us know how we can improve, complement or innovate our work and make it better for you. Write to us at firstname.lastname@example.org.
Related Articles :
How to use the NETWORKDAYS function in Excel : Returns the working days between the two given dates using the NETWORKDAYS function.
How to use the WORKDAYS function in Excel : Returns a workday date value after days added to the start_date using the WORKDAYS function in Excel.
Count holidays between dates in Excel : count non working days between the two given dates using the DATEDIF and NETWORKDAYS function in Excel.
Extract days between dates ignoring years in Excel : count the days between the two dates using different functions and mathematical operation in Excel
Count Birth Dates By Month in Excel : count the number of dates lying in a particular month using the SUMPRODUCT and MONTH function in Excel.
SUM price by weekdays in Excel : sum price values corresponding to the number of dates in a particular weekday using the SUMPRODUCT and WEEKDAY function in Excel.
Popular Articles :
How to use the IF Function in Excel : The IF statement in Excel checks the condition and returns a specific value if the condition is TRUE or returns another specific value if FALSE.
How to use the VLOOKUP Function in Excel : This is one of the most used and popular functions of excel that is used to lookup value from different ranges and sheets.
How to Use SUMIF Function in Excel : This is another dashboard essential function. This helps you sum up values on specific conditions.
How to use the COUNTIF Function in Excel : Count values with conditions using this amazing function. You don't need to filter your data to count specific values. Countif function is essential to prepare your dashboard.
The applications/code on this site are distributed as is and without warranties or liability. In no event shall the owner of the copyrights, or the authors of the applications/code be liable for any loss of profit, any problems or any damage resulting from the use or evaluation of the applications/code.