Forum Discussion

Paddy2803's avatar
Paddy2803
Copper Contributor
Apr 01, 2022
Solved

Networkdays formula to calculate specific date range for start and end date

Dear All,

 

I am currently trying to figure out formula to calculate specific period of working days for each month excluding week end and holidays. For example

 

Start Date     End date   

2022/3/1       2022/3/31    this I can calculate by workdays or networkdays formula.

2022/3/1       2022/4/15    To calculate working days for March only I use networkdays formula like =Networkdays(A"",eonmonth(A"",0),B"")  this formula help me calculate exact working days excluding weekend and holiday.

 

My main pain point is below scenario.

 

Start date : 2022/2/1 and End date 2022/4/15

By which formula I can calculate total working days only for March which exclude weekends and holiday?

 

Any help is highly appreciate.

Regarda,

Paddy

 

6 Replies

  • Riny_van_Eekelen's avatar
    Riny_van_Eekelen
    Platinum Contributor

    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.

    • Paddy2803's avatar
      Paddy2803
      Copper Contributor

      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_Eekelen's avatar
        Riny_van_Eekelen
        Platinum 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)

         

Resources