Networkdays between multiple date ranges (without overlap and gaps)

Fathalla

New Member
Joined
Feb 16, 2021
Messages
8
Office Version
  1. 2016
Platform
  1. Windows
Can any one help me pls with an Excel formula to determine the networkdays between multiple date ranges, without overlap and gaps.
Example:
Task 1 : Starts 1/4/2023 Ends 16/4/2023
Task 2 : Starts 15/7/2023 Ends 5/8/2023
Task 3 : Starts 1/8/2023 Ends 10/8/2023
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
I'm not sure what you mean by "without overlaps or gaps", but this is how I set up a calculation for network days which excludes a list of holidays (found in cells F1:H1).

Assuming your dates exist in Columns A and B and the first row contains your headers, enter the following formula in cell C2:

Excel Formula:
=NETWORKDAYS($A2,$B2,$F$1:$H$1)

1686232544101.png


I hope this was what you were looking for.
 
Upvote 0
Thank you for your answer. Actually what I meant is the following: I need a formula/function to sum up the network days without calculating any overlapping between date ranges and without calculating any gaps between the date ranges. That is the, the result I think an our example should yield to 29 days.

Wookiee

 

Attachments

  • Screenshot 2023-06-10 041459.png
    Screenshot 2023-06-10 041459.png
    9.6 KB · Views: 7
Upvote 0
Thank you for your answer. Actually what I meant is the following: I need a formula/function to sum up the network days without calculating any overlapping between date ranges and without calculating any gaps between the date ranges. That is the, the result I think an our example should yield to 29 days.

Wookiee

I apologize for misunderstanding. I do not know of a way to calculate days wherein multiple date ranges may have overlap.
 
Upvote 0
T202306a.xlsm
BCDE
1
201-04-2316-04-232929
315-07-2305-08-23
401-08-2310-08-23
5
3d
Cell Formulas
RangeFormula
D2D2=NETWORKDAYS(B2,C2,1)+NETWORKDAYS(B3,C3,1)+NETWORKDAYS(MAX(C3,B4),C4,1)
E2E2=NETWORKDAYS(B2,C4,1)-NETWORKDAYS(C2,B3,1)
 
Last edited:
Upvote 0
T202306a.xlsm
BCDE
1
201-04-2316-04-232929
315-07-2305-08-23
401-08-2310-08-23
5
3d
Cell Formulas
RangeFormula
D2D2=NETWORKDAYS(B2,C2,1)+NETWORKDAYS(B3,C3,1)+NETWORKDAYS(MAX(C3,B4),C4,1)
E2E2=NETWORKDAYS(B2,C4,1)-NETWORKDAYS(C2,B3,1)
Thank you Dave, much appreciated, in case there are a big list of ranges, like of example a project schedule with 100 tasks each of which has a start date and an end date, is there a formula or perhaps an array formula to get the network days without the gaps and overlapping
 
Upvote 0
The formula in E2 might help.
It would help if you posted an informative example with say 20 rows. You can use the forum's tool named XL2BB.
Are you using Excel 2016?
 
Upvote 0
The formula in E2 might help.
It would help if you posted an informative example with say 20 rows. You can use the forum's tool named XL2BB.
Are you using Excel 2016?
Currently I am using Excel 365, Sorry i couldn't use the XL2BB add-in for security reasons i guess, (macros are not verified and hence disabled)
Attached a sample image !
 

Attachments

  • Book1.png
    Book1.png
    37.1 KB · Views: 4
Upvote 0
Excel has a variety of new functions that you may be able to use.

Expert users may provide much more advanced help but this may get you started.

T202306a.xlsm
CDEFGHIJKLM
1Workdays
22-Jan-2313-Jan-23102-Jan-234494344958450914496357
317-Jan-2323-Jan-2353-Jan-2344944449594509244964
41-Feb-2315-Feb-23114-Jan-2344945449604509344965
514-Jun-2317-Jul-23245-Jan-2344946449634509644966
65-Feb-2325-Feb-23156-Jan-2344949449644509744967
79-Jan-23449654509844970
810-Jan-23449664509944971
911-Jan-23449674510044972
1012-Jan-23449704510344973
1113-Jan-23449714510444974
12449724510544977
134510644978
144510744979
154511044980
164511144981
1745112
1845113
1945114
2045117
2145118
2245119
2345120
2445121
2545124
4dd
Cell Formulas
RangeFormula
G2:G11G2=WORKDAY.INTL(C2-1,SEQUENCE(10,,1.1),1)
H2:H6H2=WORKDAY.INTL(C3-1,SEQUENCE(E3,,1,1),1)
I2:I12I2=WORKDAY.INTL(C4-1,SEQUENCE(E4,,1,1),1)
J2:J25J2=WORKDAY.INTL(C5-1,SEQUENCE(E5,,1,1),1)
K2:K16K2=WORKDAY.INTL(C6-1,SEQUENCE(E6,,1,1),1)
M2M2=COUNT(UNIQUE(VSTACK(G2#,H2#,I2#,J2#,K2#)))
E2:E6E2=NETWORKDAYS.INTL(C2,D2,1)
Dynamic array formulas.
 
Upvote 0

Forum statistics

Threads
1,215,102
Messages
6,123,099
Members
449,096
Latest member
provoking

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top