adam_neb
Board Regular
- Joined
- Jun 9, 2002
- Messages
- 101
I am using Barry Houdini's Week Number Formula:
=INT((WEEKDAY(DATE(YEAR(B4011-WEEKDAY(B4011+1,3)+3),1,-3))+B4011-DATE(YEAR(B4011-WEEKDAY(B4011+1,3)+3),1,-2))/7)
The formula returns the Week Number in the format I need. However, I need the output to be YYYY-WW where WW is the Week Number.
Using 12/31/2006 as an example, Barry's formua gives week number 1. This would be Year 2007 Week 1. Does anyone have an idea of how to get the Year of the corresponding week (when the year of the Week Number does not match the Year of the Date)?
=INT((WEEKDAY(DATE(YEAR(B4011-WEEKDAY(B4011+1,3)+3),1,-3))+B4011-DATE(YEAR(B4011-WEEKDAY(B4011+1,3)+3),1,-2))/7)
The formula returns the Week Number in the format I need. However, I need the output to be YYYY-WW where WW is the Week Number.
Using 12/31/2006 as an example, Barry's formua gives week number 1. This would be Year 2007 Week 1. Does anyone have an idea of how to get the Year of the corresponding week (when the year of the Week Number does not match the Year of the Date)?