You can get the same results from
=INT((DAY(A1)+(7-WEEKDAY(A1)))/7)+1
I don't believe that will always give the required results, Jason
My suggested formula, quoted in this thread, works like WEEKNUM within each month so that 1st of the month is always in week 1 and then week 2 starts on the next Sunday. The above formula doesn't do that if the month starts on a Sunday (it assigns 2 to the 1st of the month so 1st May 2011, for example, would be in week 2).
The original thread where I posted that formula was from 2008 - more recently I have posted a shorter version which gives exactly the same results, i.e.
=INT((13-WEEKDAY(A1)+DAY(A1))/7)
see
this thread for example
As for how it works......
.....I'll try to explain the shorter version
Assigning 1 to the 1st of the month and then incrementing by 1 every subsequent Sunday is actually
the same as counting Sundays in a period including the last 6 days of the previous month up to the A1 date.
I already have a formula for counting Sundays in a period......which goes like this
=INT((8-WEEKDAY(date2)+date2-date1)/7)
see
this thread for an explanation of that......[in fact it's a slightly different formula but I quote the above version as an alternative at the end]
so if the period includes the last 6 days from the previous month up to A1 then date2 = A1 and date1 = A1-DAY(A1)-5.....so the above formula becomes
=INT((8-WEEKDAY(A1)+A1-(A1-DAY(A1)-5))/7)
which can be further simplified to this
=INT((8-WEEKDAY(A1)+DAY(A1)+5)/7)
and then you can add the 5 to the 8 to get 13 and this version
=INT((13-WEEKDAY(A1)+DAY(A1))/7)
Note that Jason's suggestion is the equivalent of exactly the same formula but with 14 instead of 13 (hence including the last
7 days of the previous month) which is why it mis-performs on months beginning on Sunday