I have a Date/Time table and now need to incorporate the week number in the month (starting on Mondays) to meet certain criteria for a look up algorithm.
Google searching online I've come across this:
= WEEKNUM(DATE(YEAR($A2),1,DAY($A2-WEEKDAY($A2,3))))
The problem is that my Table starts on 1/1/2010 and when it gets to the first Monday of the month (Jan 4th) the week number rolls to 2 instead of 1
It resolves itself when Feb hits
but then hits it again (and again and again) in April
Now if I edit the formula to ISOWEEKNUM
= ISOWEEKNUM(DATE(YEAR(A33),1,DAY(A33-WEEKDAY(A33,3))))
it gets even more wacked
How to resolve this issue? Thanks!
CodePudding user response:
Just divide the DAY return by 7. Return the INT() and add 1:
=INT((DAY($A2-WEEKDAY($A2,3)))/7) 1