Weeknumber transition from end of year to new year
I currently utilize a formula to calculate items due this week, next week, week 3, etc. Because of the transition to the new year, the formula I use is no longer counting from January 1, 2022 & beyond.
Can someone please assist me with a formula update that will (hopefully) provide a seamless EOY transition, moving forward?
=COUNTIFS({Sheet XYZ Employee}, [Column3]3, {Sheet XYZ DueDate}, ISDATE(@cell), {Sheet XYZ DueDate}, WEEKNUMBER(@cell) = WEEKNUMBER(TODAY()) + 1)
=COUNTIFS({Sheet XYZ Employee}, [Column3]3, {Sheet XYZ DueDate}, ISDATE(@cell), {Sheet XYZ DueDate}, WEEKNUMBER(@cell) = WEEKNUMBER(TODAY()) + 2)
=COUNTIFS({Sheet XYZ Employee}, [Column3]3, {Sheet XYZ DueDate}, ISDATE(@cell), {Sheet XYZ DueDate}, WEEKNUMBER(@cell) = WEEKNUMBER(TODAY()) + 3)
Answers
-
Hi @HMcD
We can add an IF statements around each of your formulas to account for the three different possibilities:
One Week:
=IF(WEEKNUMBER(TODAY()) = 52, COUNTIFS({Sheet XYZ Employee}, [Column3]@row, {Sheet XYZ DueDate}, ISDATE(@cell), {Sheet XYZ DueDate}, WEEKNUMBER(@cell) = 1), COUNTIFS({Sheet XYZ Employee}, [Column3]@row, {Sheet XYZ DueDate}, ISDATE(@cell), {Sheet XYZ DueDate}, WEEKNUMBER(@cell) = WEEKNUMBER(TODAY()) + 1))
Two Weeks:
=IF(WEEKNUMBER(TODAY()) = 51, COUNTIFS({Sheet XYZ Employee}, [Column3]@row, {Sheet XYZ DueDate}, ISDATE(@cell), {Sheet XYZ DueDate}, WEEKNUMBER(@cell) = 1), IF(WEEKNUMBER(TODAY()) = 52, COUNTIFS({Sheet XYZ Employee}, [Column3]@row, {Sheet XYZ DueDate}, ISDATE(@cell), {Sheet XYZ DueDate}, WEEKNUMBER(@cell) = 2), COUNTIFS({Sheet XYZ Employee}, [Column3]@row, {Sheet XYZ DueDate}, ISDATE(@cell), {Sheet XYZ DueDate}, WEEKNUMBER(@cell) = WEEKNUMBER(TODAY()) + 2)))
Three Weeks:
=IF(WEEKNUMBER(TODAY()) = 50, COUNTIFS({Sheet XYZ Employee}, [Column3]@row, {Sheet XYZ DueDate}, ISDATE(@cell), {Sheet XYZ DueDate}, WEEKNUMBER(@cell) = 1), IF(WEEKNUMBER(TODAY()) = 51, COUNTIFS({Sheet XYZ Employee}, [Column3]@row, {Sheet XYZ DueDate}, ISDATE(@cell), {Sheet XYZ DueDate}, WEEKNUMBER(@cell) = 2), IF(WEEKNUMBER(TODAY()) = 52, COUNTIFS({Sheet XYZ Employee}, [Column3]@row, {Sheet XYZ DueDate}, ISDATE(@cell), {Sheet XYZ DueDate}, WEEKNUMBER(@cell) = 3), COUNTIFS({Sheet XYZ Employee}, [Column3]3, {Sheet XYZ DueDate}, ISDATE(@cell), {Sheet XYZ DueDate}, WEEKNUMBER(@cell) = WEEKNUMBER(TODAY()) + 3))))
Cheers,
Genevieve
Join us for Jumpstart 2025 with Community on 23 January (in two time zones)! 🎉 Register here.
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 65.2K Get Help
- 445 Global Discussions
- 143 Industry Talk
- 476 Announcements
- 5K Ideas & Feature Requests
- 84 Brandfolder
- 150 Just for fun
- 71 Community Job Board
- 488 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 301 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!