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 at Smartsheet ENGAGE 2024 🎉
October 8 - 10, Seattle, WA | Register now
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 62.3K Get Help
- 364 Global Discussions
- 200 Industry Talk
- 428 Announcements
- 4.4K Ideas & Feature Requests
- 136 Brandfolder
- 127 Just for fun
- 128 Community Job Board
- 446 Show & Tell
- 28 Member Spotlight
- 1 SmartStories
- 283 Events
- 35 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!