Forum Discussion
nav101
Jul 06, 2022Copper Contributor
Days Calculation Between Dates by Month where start date to end date spans several months
I'm trying to work out the number of working days between two dates but split out to show how many days in each month. Have many variations to work through Start Date End Date Work days Dura...
mtarler
Jul 06, 2022Silver Contributor
nav101 in the attached I used this formula to do what you want. You may want to customize weekends and holidays in the NETWORKDAYS.INTL() function:
=LET(start,A2,end,B2,
monthCount,12*(YEAR(end)-YEAR(start))+MONTH(end)-MONTH(start)+1,
s,SEQUENCE(,monthCount,0),
BYCOL(s,LAMBDA(i,
NETWORKDAYS.INTL( MAX(start,EOMONTH(start,i-1)+1),
MIN(end,EOMONTH(start,i)))
))
)