You indicated that your MS-Off Ver is google planilhas, but there is no MS-Off Ver with that name.
If you need a solution for Google sheets please move your thread to the forum for Google sheets (by reporting your own post).
This solution works in Excel 2021 en Excel 365.
Please enter a date of the month in A2, the holidays in column D and try in B2:
Formula:
=LET(b,WORKDAY(EOMONTH(A2,-1),1),l,EOMONTH(A2,0),fb,WORKDAY.INTL(b-1,1,"1111011"),mb,fb-4,s,SEQUENCE(5,,mb,7),
h,NETWORKDAYS(IF(b>s,b,s),IF(l<s+4,l,s+4),D2:D99),FILTER(HSTACK(SEQUENCE(5),h),h>0))
Bookmarks