Forum Discussion
brookesmoore
Aug 16, 2023Copper Contributor
Calculating the number of weeks but count partial weeks towards previous month
Hello All, I am looking to calculate the number of weeks in a given month. Weeks run from Sunday to Saturday. If the month ends during the middle of the week, then that week needs to be included ...
- Aug 17, 2023
In A2, enter 1-Jan-23, and in A3, enter 1-Feb-23.
Select A2 and A3, then use the fill handle in the lower right corner of A3 to fill down as far as you want.
In B2, enter the formula
=SUM(--(WEEKDAY(SEQUENCE(DAY(EOMONTH(A2,0)),,A2))=1))
Fill down.
HansVogelaar
Aug 17, 2023MVP
In A2, enter 1-Jan-23, and in A3, enter 1-Feb-23.
Select A2 and A3, then use the fill handle in the lower right corner of A3 to fill down as far as you want.
In B2, enter the formula
=SUM(--(WEEKDAY(SEQUENCE(DAY(EOMONTH(A2,0)),,A2))=1))
Fill down.
- brookesmooreAug 17, 2023Copper ContributorThis worked. Thank you for the help!