Excel for Microsoft 365 Excel for Microsoft 365 for Mac Excel for the web Excel 2021 Excel 2021 for Mac Excel 2019 Excel 2019 for Mac Excel 2016 Excel 2016 for Mac Excel 2013 Excel 2010 Excel 2007 Excel for Mac 2011 Excel Starter 2010 More…Less
This article describes the formula syntax and usage of the WORKDAY function in Microsoft Excel.
Description
Returns a number that represents a date that is the indicated number of working days before or after a date (the starting date). Working days exclude weekends and any dates identified as holidays. Use WORKDAY to exclude weekends or holidays when you calculate invoice due dates, expected delivery times, or the number of days of work performed.
Tip: To calculate the serial number of the date before or after a specified number of workdays by using parameters to indicate which and how many days are weekend days, use the WORKDAY.INTL function.
Syntax
WORKDAY(start_date, days, [holidays])
The WORKDAY function syntax has the following arguments:
-
Start_date Required. A date that represents the start date.
-
Days Required. The number of nonweekend and nonholiday days before or after start_date. A positive value for days yields a future date; a negative value yields a past date.
-
Holidays Optional. An optional list of one or more dates to exclude from the working calendar, such as state and federal holidays and floating holidays. The list can be either a range of cells that contain the dates or an array constant of the serial numbers that represent the dates.
Important: Dates should be entered by using the DATE function, or as results of other formulas or functions. For example, use DATE(2008,5,23) for the 23rd day of May, 2008. Problems can occur if dates are entered as text.
Remarks
-
Microsoft Excel stores dates as sequential serial numbers so they can be used in calculations. By default, January 1, 1900 is serial number 1, and January 1, 2008 is serial number 39448 because it is 39,448 days after January 1, 1900.
-
If any argument is not a valid date, WORKDAY returns the #VALUE! error value.
-
If start_date plus days yields an invalid date, WORKDAY returns the #NUM! error value.
-
If days is not an integer, it is truncated.
Example
Copy the example data in the following table, and paste it in cell A1 of a new Excel worksheet. For formulas to show results, select them, press F2, and then press Enter. If you need to, you can adjust the column widths to see all the data.
Data |
||
10/1/2008 |
Start date |
|
151 |
Days to completion |
|
11/26/2008 |
Holiday |
|
12/4/2008 |
Holiday |
|
1/21/2009 |
Holiday |
|
Formula |
Description (Result) |
Result |
=WORKDAY(A2,A3) |
Date 151 workdays from the start date (4/30/2009) |
4/30/2009 |
=WORKDAY(A2,A3,A4:A6) |
Date 151 workdays from the start date, excluding holidays (5/5/2009) |
5/5/2009 |
Need more help?
Want more options?
Explore subscription benefits, browse training courses, learn how to secure your device, and more.
Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.
Explanation
The Excel NETWORKDAYS function calculates the number of working days between two dates. NETWORKDAYS automatically excludes weekends (Saturday and Sunday) and can optionally exclude a list of holidays supplied as dates.
For example, in the screenshot shown, the formula in D6 is:
=NETWORKDAYS(B6,C6) // returns 5
This formula returns 5 since there are 5 working days between December 23 and December 27, and no holidays have been provided. Note that NETWORKDAYS includes both the start and end dates in the calculation if they are workdays.
NETWORKDAYS can also exclude a custom list of holidays. In the next cell down, we use the same formula with the same dates, plus a list of holidays in B10:B11.
=NETWORKDAYS(B7,C7,B10:B11) // returns 3
This formula returns 3, since two of the 5 days are holidays.
Workdays remaining from today
To calculate the number of workdays remaining from today, you can use WORKDAY with the TODAY function like this:
=NETWORKDAYS(TODAY(),A1)
where cell A1 contains an end date in the future.
Custom weekends
If you need take into account custom weekends (i.e. weekends are Saturday only, Sunday and Monday, etc.) you’ll need to switch to the more robust NETWORKDAYS.INTL function, which allows you to set what days of the week are considered are considered weekends, by supplying a weekend argument in the form of a numeric code.
Need a date?
If you need a date n workdays in the past or future, see the WORKDAY function.
WORKDAY function is designed to determine the start or end date of an event relative to a given starting or ending date based on the number of weekends and holidays, and returns the corresponding value in the form of Date data.
Function WORKDAY.INTL is designed to determine the date equal to the sum of the current date and the duration of the event, and returns the corresponding numeric value in the Excel time code.
Examples of using the functions WORKDAY and WORKDAY.INTL in Excel
Example 1. According to calculations, an employee of a company would need 236 hours of continuous work to complete the project. The project start is 08/18/2018. Determine the date of completion of the project. In the next 30 days there are no holidays, weekends — Saturday and Sunday.
View source data table:
To solve use the formula:
Argument Description:
- B5 — the date the event began (work on the project);
- B6 / B8 — the number of working days required for the project, provided that the working day lasts 8 hours
Result of calculations:
Automatically determined the number for delivery of the implemented project on the key.
How to calculate the number of working days between dates
To calculate the number of working days or holidays between two dates in Excel, you should use the NETWORKDAYS.INTL function:
As you can see, the total number of working days per year and 103 days off (262 + 103 = 365) is only in a non-pending 2019.
Example 2. The course of the subject in the school is designed for 46 classes, which are held on Monday, Wednesday and Friday. The beginning of the study of the subject — 03.09.2018 Upcoming holidays: 09/17/2018, 09/28/2018, 7/10/2018. Determine the date of the last class.
View source data table:
The formula for calculating:
The result of the calculations:
The last lesson will be December 24, 2018.
Formula for the optimal calculation of number of working days between dates
Example 3. To perform work on time, two options were proposed: to increase the hours in working days to 10 hours per day or enter a six-day working week. The estimated duration of the work is 127 hours. Choose the best option if the project start is 08/20/2018.
View of data table:
To solve, use the following formula:
IF function checks the values returned by the functions WORKDAY.INTL and returns the corresponding result. The longer the date, the longer it will take to complete the project.
The result of the calculations:
That is, in order to complete work faster, it is better to increase the duration of the working day to 10 hours.
Features of using the functions WORKDAY and WORKDAY.INTL in Excel
WORKDAY function has the following syntax:
=WORKDAY(Start_date,Days,[Holidays])
Argument Description:
- Start_date is a required argument that characterizes the values of the Date format, which is the starting point (the beginning of an event).
- Days is a required argument that accepts data of a numeric type, which characterizes the number of working days that have passed since the start of any event or preceding it. It is believed that this number does not contain days that are holidays or weekends. For the countdown relative to the date specified as the first argument, this argument should be rendered as a negative number.
- [Holidays] is an optional argument that accepts Date data format, indicating one or more dates corresponding to holidays. As an argument, an array of cells can be passed.
WORKDAY.INTL function has the following syntax:
=WORKDAY.INTL(Start_date,Days,[Weekend],[Holidays])
Argument Description:
- Start_date is a required argument that characterizes the start date of any event in the form of data;
- Days is a required argument in the form of numerical data characterizing the number of days that precede the start of an event (a negative number) or denote a future date (a positive number);
- [Weekend] is an optional argument that takes one or more Date values that indicate dates of holidays;
- [Holidays] — optional argument in the form of a string of 7 consecutively recorded values from the range from 0 to 1, characterizing the number of days off and their position by days of the week, or a numerical value from the range from 1 to 17. Examples of some options for writing this argument:
- 1 (or not explicitly specified) — weekends are Saturday and Sunday.
- 2 — Sunday and Monday.
- 3 — Monday and Tuesday (and so on).
- 11 — only Monday.
- 12 — only Tuesday (and so on).
- «0000011» — Saturday and Sunday.
- «1000001» — Sunday and Monday (and so on).
Notes:
- When using both of the functions in question, it must be borne in mind that Excel supports dates from January 1, 1900 to December 31, 9999. If the first argument or the date of any holiday is presented as a date that does not belong to the range of valid values, both functions will return a code errors #NUM!
- If, as a result of adding the date represented by the first argument of any of the functions in question, as well as the number of days specified by the second argument of the function, taking into account a certain number of holidays and weekends, a value outside the valid date range will be returned, the error code #NUM!
- If the “Days” argument is represented as a fractional number, the fractional part will be automatically truncated.
- The function WORKDAY.INTL returns the error code #NUM! If a number not in the range of valid values or a string containing invalid characters, only units («1111111») or consisting of less than seven characters was passed as an argument [output].
- When entering dates, it is recommended to use not text representations of dates (for example, “February 10, 2017”) as arguments for the functions in question, but functions that return data in format (for example, =DATE(02,10,2017)).
Download examples WORKDAY function to calculate days in Excel
Note: Unlike the WORKDAY function, which provides the ability to specify only the dates of holidays, the WORKDAY.INTL function. Allows you to determine the number of weekends per week and specify which days in the week are the weekend (for example, instead of the usual Saturday and Sunday, you can specify Tuesday and Wednesday).
Get the number of workdays between two given dates
How to Calculate Working Days in Excel
The NETWORKDAYS Function[1] calculates the number of workdays between two dates in Excel. When using the function, the number of weekends are automatically excluded. It also allows you to skip specified holidays and only count business days. It is categorized in Excel as a Date/Time Function. You can use this formula to calculate working days in Excel between two dates.
In finance and accounting, the net workdays function is useful in calculating employee benefits that accrue based on days worked, the number of working days available during a project, or the number of business days required to resolve a ticket raised by a customer, etc.
Formula
=NETWORKDAYS(start_date, end_date, [holidays])
The function uses the following arguments:
- Start_date (required argument) – Start_date can either be earlier than end_date, later than end_date, or same as end_date.
- End_date (required argument) – The end date.
- Holidays (optional argument) – This specifies the list of holidays that should be excluded from the work days calculation. We can enter it as a range of cells that contain the holiday dates (that is F2:F4) or as a list of serial numbers that represent the holiday dates.
It is recommended that the start_date, end_date and [holidays] arguments are entered as either:
- References to cells containing dates; or
- Dates returned from formulas.
How to calculate NETWORKDAYS Function in Excel?
Let’s see a few examples to understand how the NETWORKDAYS function to calculate working days in Excel.
Example 1 – Working days between two dates
Suppose we wish to calculate the workdays or business days from January 15, 2017 to January 21, 2018. The holidays in between are:
- November 23, 2017 – Thanksgiving Day
- December 25, 2017 – Christmas Day
- January 1, 2018 – New Year’s Day
To calculate the number of working days, we use the following function:
Using the formula above, we will get the number of working days as 262, as shown below.
Pointers about the NETWORKDAYS function
- Negative return value – If the start date is later than the end date, the function will return a negative value.
- The NETWORKDAYS function will include both the start date and end date when calculating work days. So, if we give NETWORKDAYS the same date for start date and end date, it will return 1.
- #VALUE! error – Occurs when any of the given arguments is not a valid date.
- If we wish to use weekends other than Saturday and Sunday, we need to use the NETWORKDAYS.INTL function.
Click here to download the sample Excel file
Additional Resources
Thank you for reading CFI’s guide on NETWORKDAYS Function. To keep learning and advancing your career, the following resources will be helpful:
- Excel Functions for Finance
- Advanced Excel Formulas Course
- Advanced Excel Formulas You Must Know
- Excel Shortcuts for PC and Mac
- See all Excel resources
Содержание
- Get workdays between dates
- Related functions
- Summary
- Generic formula
- Explanation
- Workdays remaining from today
- Custom weekends
- Need a date?
- WORKDAY function
- Description
- Syntax
- Remarks
- Example
- NETWORKDAYS Function
- How to Calculate Working Days in Excel
- Formula
- How to calculate NETWORKDAYS Function in Excel?
- Example 1 – Working days between two dates
- Pointers about the NETWORKDAYS function
- Additional Resources
- Count your working days in Excel with NETWORKDAYS()
- Share:
- NetworkDays syntax
- NetworkDays.Intl is better
- NetworkDays.Intl syntax
- Define Weekend or non-working days
- How to Calculate the Number of Days Between Two Dates in Excel
- Calculating the Total Number of Days Between Two Dates in Excel
- Using the DAYS Function
- Using the DATEDIF Function
- Number of Working Days Between Two Dates in Excel
- Number of Weekends Between Two Dates in Excel
- Number of Work Days in a Part-time Job
- Number of Mondays Between Two Dates
Get workdays between dates
Summary
To calculate the number of workdays between two dates, you can use the NETWORKDAYS function. In the example shown, the formula in D7 is:
The result is a count of workdays, excluding the holidays in B10:B11.
Generic formula
Explanation
The Excel NETWORKDAYS function calculates the number of working days between two dates. NETWORKDAYS automatically excludes weekends (Saturday and Sunday) and can optionally exclude a list of holidays supplied as dates.
For example, in the screenshot shown, the formula in D6 is:
This formula returns 5 since there are 5 working days between December 23 and December 27, and no holidays have been provided. Note that NETWORKDAYS includes both the start and end dates in the calculation if they are workdays.
NETWORKDAYS can also exclude a custom list of holidays. In the next cell down, we use the same formula with the same dates, plus a list of holidays in B10:B11.
This formula returns 3, since two of the 5 days are holidays.
Workdays remaining from today
To calculate the number of workdays remaining from today, you can use WORKDAY with the TODAY function like this:
where cell A1 contains an end date in the future.
Custom weekends
If you need take into account custom weekends (i.e. weekends are Saturday only, Sunday and Monday, etc.) you’ll need to switch to the more robust NETWORKDAYS.INTL function, which allows you to set what days of the week are considered are considered weekends, by supplying a weekend argument in the form of a numeric code.
Need a date?
If you need a date n workdays in the past or future, see the WORKDAY function.
Источник
WORKDAY function
This article describes the formula syntax and usage of the WORKDAY function in Microsoft Excel.
Description
Returns a number that represents a date that is the indicated number of working days before or after a date (the starting date). Working days exclude weekends and any dates identified as holidays. Use WORKDAY to exclude weekends or holidays when you calculate invoice due dates, expected delivery times, or the number of days of work performed.
Tip: To calculate the serial number of the date before or after a specified number of workdays by using parameters to indicate which and how many days are weekend days, use the WORKDAY.INTL function.
Syntax
WORKDAY(start_date, days, [holidays])
The WORKDAY function syntax has the following arguments:
Start_date Required. A date that represents the start date.
Days Required. The number of nonweekend and nonholiday days before or after start_date. A positive value for days yields a future date; a negative value yields a past date.
Holidays Optional. An optional list of one or more dates to exclude from the working calendar, such as state and federal holidays and floating holidays. The list can be either a range of cells that contain the dates or an array constant of the serial numbers that represent the dates.
Important: Dates should be entered by using the DATE function, or as results of other formulas or functions. For example, use DATE(2008,5,23) for the 23rd day of May, 2008. Problems can occur if dates are entered as text.
Microsoft Excel stores dates as sequential serial numbers so they can be used in calculations. By default, January 1, 1900 is serial number 1, and January 1, 2008 is serial number 39448 because it is 39,448 days after January 1, 1900.
If any argument is not a valid date, WORKDAY returns the #VALUE! error value.
If start_date plus days yields an invalid date, WORKDAY returns the #NUM! error value.
If days is not an integer, it is truncated.
Example
Copy the example data in the following table, and paste it in cell A1 of a new Excel worksheet. For formulas to show results, select them, press F2, and then press Enter. If you need to, you can adjust the column widths to see all the data.
Источник
NETWORKDAYS Function
Get the number of workdays between two given dates
How to Calculate Working Days in Excel
The NETWORKDAYS Function[1] calculates the number of workdays between two dates in Excel. When using the function, the number of weekends are automatically excluded. It also allows you to skip specified holidays and only count business days. It is categorized in Excel as a Date/Time Function. You can use this formula to calculate working days in Excel between two dates.
In finance and accounting, the net workdays function is useful in calculating employee benefits that accrue based on days worked, the number of working days available during a project, or the number of business days required to resolve a ticket raised by a customer, etc.
Formula
=NETWORKDAYS(start_date, end_date, [holidays])
The function uses the following arguments:
- Start_date (required argument) – Start_date can either be earlier than end_date, later than end_date, or same as end_date.
- End_date (required argument) – The end date.
- Holidays (optional argument) – This specifies the list of holidays that should be excluded from the work days calculation. We can enter it as a range of cells that contain the holiday dates (that is F2:F4) or as a list of serial numbers that represent the holiday dates.
It is recommended that the start_date, end_date and [holidays] arguments are entered as either:
- References to cells containing dates; or
- Dates returned from formulas.
How to calculate NETWORKDAYS Function in Excel?
Let’s see a few examples to understand how the NETWORKDAYS function to calculate working days in Excel.
Example 1 – Working days between two dates
Suppose we wish to calculate the workdays or business days from January 15, 2017 to January 21, 2018. The holidays in between are:
- November 23, 2017 – Thanksgiving Day
- December 25, 2017 – Christmas Day
- January 1, 2018 – New Year’s Day
To calculate the number of working days, we use the following function:
Using the formula above, we will get the number of working days as 262, as shown below.
Pointers about the NETWORKDAYS function
- Negative return value – If the start date is later than the end date, the function will return a negative value.
- The NETWORKDAYS function will include both the start date and end date when calculating work days. So, if we give NETWORKDAYS the same date for start date and end date, it will return 1.
- #VALUE! error – Occurs when any of the given arguments is not a valid date.
- If we wish to use weekends other than Saturday and Sunday, we need to use the NETWORKDAYS.INTL function.
Additional Resources
Thank you for reading CFI’s guide on NETWORKDAYS Function. To keep learning and advancing your career, the following resources will be helpful:
Источник
Count your working days in Excel with NETWORKDAYS()
by Annabelle Almer 21 February 2020
The NETWORKDAYS function in Microsoft Excel will calculate the number of working days between two dates. It will automatically exclude weekends (e.g. Saturday and Sunday) plus you can exclude public holidays and personal vacations.
Most people read the function as ‘Network Days’ but it’s really ‘Net Work Days’.
Figure out employee benefits from total working days accrued during a specific period. Calculating annual or long-service leave entitlements. We know one Excel user who used NetworkDays() to figure out exactly how many days he had to work until he could retire.
Alternatively, it may be used to calculate the total number of working days during a project.
Like many Office features and Excel functions, they work fine in theory but there are complications when used in the Real World™.
We’ll start by explaining the basics of Networkdays() and it’s smarter brother Networkdays.Intl() then see how to use them in a workbook.
NetworkDays syntax
The official setup of NetworkDays() in Excel is:
- start_date – the start date
- end_date – the end date
- holidays – a range or array of one or more dates that require to be excluded from the working day’s calculation (optional)
NetworkDays.Intl is better
A newer, more flexible version called NETWORKDAYS.Intl function was introduced in Excel 2010 for Windows and Excel 2011 for Mac. According to Microsoft’s docs, NetworkDays.Intl isn’t available for the Excel Mobile apps, but we’ve used it on both Excel for iOS and Android.
We recommend using NETWORKDAYS.INTL, it will give you more options both now and in the future.
This function will still default the weekend as Saturday & Sunday; although it provides the flexibility to change the days of the week to whatever you wish to consider ‘weekend’ or even just working/non-working days of the week.
Microsoft originally added NetworkDays.Intl to support a global audience who have different definitions of ‘weekend’. These days it’s useful to everyone as the world changes to more flexible working arrangements.
NetworkDays.Intl syntax
The NetworkDays.Intl syntax in Excel is:
- start_date – the start date
- end_date – the end date
- weekend – which days of the week that should be considered weekends (optional)
- holidays – a range or array of one or more dates that require to be excluded from the working day’s calculation (optional)
Define Weekend or non-working days
The weekend argument is most easily set using the codes listed in this table.
OR you can use a binary string to define a specific set of working and non-working days. This is the ultimate flexibility and great for part-time or shared jobs.
It’s seven characters (zero or one) with each position for a day of the week, starting on Monday. Zero / 0 means work day, One / 1 mean non-working day.
0000011 – is a ‘normal’ work week Mon-Fri working, Sat and Sun weekend. Same as ‘1’ in the list above.
0000110 – Friday/Saturday are days off, working Sun-Thurs. Same as ‘7’ in the above list.
0010011 – working Mon, Tues, Thurs, Fri. Off Wed, Sat and Sun.
0101010 – not working Tues, Thurs and Sat.
0000000 – a seven-day work week.
This string can be hardcoded into the function or smarties could setup a separate table of choices to control it.
Источник
How to Calculate the Number of Days Between Two Dates in Excel
Watch Video – Calculate the Number of Workdays Between Two Dates
Excel has some powerful functions to calculate the number of days between two dates in Excel. These are especially useful when you’re creating Gantt charts or timelines for a proposal/project.
In this tutorial, you’ll learn how to calculate the number of days between two dates (in various scenarios):
This Tutorial Covers:
Calculating the Total Number of Days Between Two Dates in Excel
Excel has multiple ways to calculate the days between two dates.
Using the DAYS Function
Excel DAYS function can be used to calculate the total number of days when you have the start and the end date.
You need to specify the ‘Start Date’ and the ‘End Date’ in the Days function, and it will give you the total number of days between the two specified dates.
For example, suppose you have the start date is in cell B1 and End Date is in cell B2 (as shown below):
The following formula will give you the total number of days between the two dates:
Note that you can also manually specify the dates in the Days function by putting it in double-quotes. Just make sure these dates in double-quotes is in an accepted date format in Excel.
Using the DATEDIF Function
DATEDIF function (derived from Date Difference) also allows you to quickly get the number of days between two dates. But unlike the DAYS function, it can do more than that.
You can also use the DATEDIF function to calculate the number of months or years that have elapsed in the two given dates.
Suppose you have the below dataset and you want to get the number of days between these two dates:
You can use the below DATEDIF formula to do this:
The above DATEDIF formula takes three arguments:
- The start date – B1 in this example
- The end date – B2 in this example
- “D” – the text string that tells the DATEDIF function what needs to be calculated.
Also note that unline the other Excel functions, when you type the DATEDIF function in Excel, it will not show the IntelliSense (the autocomplete option that helps you with the formula arguments).
If you only want to calculate the number of days between two given dates, then it’s better to use the DAYS function. DATEDIF is more suited when you want to calculate the total number of years or months that have passed in between two dates.
For example, the below formula would give you the total number of months between the two dates (in B1 and B2)
Similarly, the below formula will give you the total number of years between the two dates:
You can read more about the DATEDIF function here. One of the common uses of this function is when you need to calculate age in Excel.
Number of Working Days Between Two Dates in Excel
Excel has two functions that will give you the total number of working days between two dates and will automatically account for weekends and specified holidays.
- Excel NETWORKDAYS function – you should use this when the weekend days are Saturday and Sunday.
- Excel NETWORKDAYS INTERNATIONAL function – use this when the weekend days are not Saturday and Sunday.
Let’s first quickly have a look at NETWORKDAYS Function syntax and arguments.
Excel NETWORKDAYS Function – Syntax & Arguments
=NETWORKDAYS(start_date, end_date, [holidays])
- start_date – a date value that represents the start date.
- end_date – a date value that represents the end date.
- [holidays] – (Optional) It is a range of dates that are excluded from the calculation. For example, these could be national/public holidays. This could be entered as a reference to a range of cells that contains the dates, an array of serial numbers that represent the dates, or a named range.
Let’s first look at an example where you want to calculate the number of working days (business days) between two dates with Saturday and Sunday as weekends.
To calculate the number of working days (Column D) – when the start date, end date, and holidays are specified – use the below formula in D3 and copy for all cells:
This function works great in most cases, except the ones where the weekends are days other than Saturday and Sunday.
For example, in middle-eastern countries, the weekend is Friday and Saturday, or in some jobs, people may have a six-day workweek.
To tackle such cases, Excel has another function – NETWORKDAYS.INTL (introduced in Excel 2010).
Before I take you through the example, let’s quickly learn about the syntax and arguments of Excel NETWORKDAY INTERNATIONAL function
Excel NETWORKDAYS INTERNATIONAL Function – Syntax & Arguments
=NETWORKDAYS.INTL(start_date, end_date, [weekend], [holidays])
- start_date – a date value that represents the start date.
- end_date – a date value that represents the end date.
- [weekend] – (Optional) Here, you can specify the weekend, which could be any two days or any single day. If this is omitted, Saturday and Sunday are taken as the weekend.
- [holidays] – (Optional) It is a range of dates that are excluded from the calculations. For example, these could be national/public holidays. This could be entered as a reference to a range of cells that contains the dates or could be an array of serial numbers that represent the dates.
Now let’s see an example of calculating the number of working days between two dates where the weekend days are Friday and Saturday.
Suppose you have a dataset as shown below:
To calculate the number of working days (Column D) with the weekend as Friday and Saturday, use the following formula:
The third argument in this formula (the number 7) tells the formula to consider Friday and Saturday as the weekend.
Number of Weekends Between Two Dates in Excel
We can use the NETWORKDAYS function to calculate the number of weekends between two dates.
While the Networkdays function calculates the number of working days, we can also use to get the number of weekend days between two dates.
Suppose we have a dataset as shown below:
Here is the formula that will give you the total number of weekends days between the two dates:
Number of Work Days in a Part-time Job
You can use Excel NETWORKDAYS.INTL function to calculate the number of workdays in a part-time job as well.
Let’s take an example where you are involved in a project where you have to work part-time (Tuesday and Thursday only).
Here is the formula that will get this done:
Note that instead of choosing the weekend from the drop-down that’s inbuilt in the function, we have used “1010111” (in double quotes).
- 0 indicates a working day
- 1 indicates a non-working day
The first number of this series represents Monday and the last number represents Sunday.
So “0000011“ would mean that Monday to Friday are working days and Saturday and Sunday are non-working (weekend).
With the same logic, “1010111” indicates that only Tuesday and Thursday are working, and rest 5 days are non-working.
In case you have holidays (which you don’t want to get counted in the result), you can specify these holidays as the fourth argument.
Number of Mondays Between Two Dates
To find the number of Mondays between two dates (or any other day), we can use the same logic as used above in calculating part-time jobs.
Suppose you have a dataset as shown below:
Here is the formula that will give you the number of Mondays between the two dates:
In this formula, ‘0’ means a working day and ‘1’ means a non-working day.
This formula gives us the total number of working days considering that Monday is the only working day of the week.
Similarly, you can also calculate the number of any day between two given dates.
You May Also Like the Following Tutorials:
Источник