Checking Boxes if Date is Current Week
I am trying to develop a formula to check the box if the Date is today or within the last week(6 days). The formula that I have so far is
=IFERROR(IF(AND(Date@row >= TODAY() - WEEKDAY(TODAY(), 1), Date@row <= TODAY() + (6 - WEEKDAY(TODAY(), 7))), 1, 0), "")
However, the box is not checking.
Answers
-
hi, @ldavies95 -
I wonder if you may want to use the WORKDAY function (instead of WEEKDAY.
The WORKDAY function returns a date within a specified number of work days, and does not count Saturday and Sunday. The WEEKDAY function is different - it will return a number representing the day of the week. If you're looking to identify dates within the past 6 working days, the WORKDAY function should do the trick. :)
You could try something like this:
=IF(AND([Date@row < TODAY(), Date@row >= WORKDAY(TODAY(), -6)), 1, 0)
This formula will check a box if the Date cell is in the past (<TODAY) and is in the last 6 working days.
Does this help?
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.9K Get Help
- 440 Global Discussions
- 138 Industry Talk
- 471 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 68 Community Job Board
- 488 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!