Forum Discussion

brookesmoore's avatar
brookesmoore
Copper Contributor
Aug 16, 2023
Solved

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 ...
  • HansVogelaar's avatar
    Aug 17, 2023

    brookesmoore 

    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.

Resources