Forum Discussion
Networkdays formula to calculate specific date range for start and end date
- Apr 01, 2022
Paddy2803 Perhaps you can specify the error rather than just mention that there is "an error".
Edit: attached an updated file.
Paddy2803 Perhaps the approach demonstrated in the attached file will help.
The picture shows the formula that uses named ranges. Cell E1 contains the date for the 1st of March, formatted to display the month name only.
Riny_van_Eekelen Hi Thanks for your response, just have 1 doubt the formula which you used has EOMONTH function but what if end date is for example 15th March and start date is 15 february 2022. How it can calculate only March working days in same formula which you shared earlier below I am sharing few cases for better understanding.
Start Date End Date
2022/3/1 2022/3/31
2022/3/1 2022/3/20
2022/3/15 2022/3/31
2022/2/15 2022/3/15
2022/2/1 2022/4/15
With above cases I am looking to count actual working days for March excluding weekeds and Holiday
Appreciate if you can help.
- Riny_van_EekelenApr 01, 2022Platinum Contributor
Paddy2803 Sorry about that. I place EOMONTH in the wrong place.
Try this one:
=NETWORKDAYS(MAX(start,DATE(2022,MONTH(mth),1)),MIN(end,EOMONTH(DATE(2022,MONTH(mth),1),0)),holidays)
- Paddy2803Apr 01, 2022Copper ContributorRiny_van_Eekelen Thank you but not sure above formula is giving an error. Its not giving a expected result.
- Riny_van_EekelenApr 01, 2022Platinum Contributor
Paddy2803 Perhaps you can specify the error rather than just mention that there is "an error".
Edit: attached an updated file.