Why is my Friday considered as next week?
Hello Smartsheet Community,
I'm currently setting up few formulas for Admin Dashboard. So I would a certain date period be counted as This Week or Next Week.
This Week:
=IF(WEEKDAY([Start Date]@row) = 1, IF(AND(YEAR(TODAY()) = YEAR([Start Date]@row), WEEKNUMBER(TODAY()) = WEEKNUMBER([Start Date]@row + 1)), "Current Week"), IF(WEEKDAY([End Date]@row) > 1, IF(AND(YEAR(TODAY()) = YEAR([End Date]@row), WEEKNUMBER(TODAY()) = WEEKNUMBER([End Date]@row)), "Current Week")))
Next Week:
=IF(WEEKDAY([Start Date]@row) = 1, IF(AND(YEAR(TODAY()) = YEAR([Start Date]@row), WEEKNUMBER(TODAY()) = WEEKNUMBER([Start Date]@row)), "Next Week"), IF(WEEKDAY([End Date]@row) > 1, IF(AND(YEAR(TODAY()) = YEAR([End Date]@row), WEEKNUMBER(TODAY()) + 1 = WEEKNUMBER([End Date]@row)), "Next Week")))
My Today() is 23/5/2024
Everything works well, but when I tried 24/5/2024 - 28/05/2024, it considered that as Next Week instead.
Answers
-
It is because of how you have your formula written. Since the weekday of [Start Date] is not 1, it moves on to evaluating the [End Date] weekday. The [End Date] weekday is greater than 1 and the year matches, but the week number is not the same as today's week number.
In your next week formula, the same is true in that it is evaluating the [ENd DAte]. Since that week number is today's week number plus 1, it is outputting "Next Week".
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 67.8K Get Help
- 474 Global Discussions
- 204 Use Cases
- 515 Announcements
- 5.5K Ideas & Feature Requests
- 87 Brandfolder
- 157 Just for fun
- 82 Community Job Board
- 521 Show & Tell
- 36 Member Spotlight
- 3 SmartStories
- 309 Events
- 37 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!