checkbox formula for last 30 days
Hi,
I have a date column which lists down all the dates in the year and a checkbox formula. In the checkbox column, I would like to insert a formula that would perform the following function for me:
If the date in the date column (row@cell) is in the last 30 days then checkbox.
Best Answer
-
@95766 Try something like this:
=IF(AND([Date Column]@row >= TODAY(), [Date Column]@row <= TODAY(30)), 1)
Answers
-
Try something along the lines of...
=IF(AND([Date Column]@row >= TODAY(-30), [Date Column]@row <= TODAY()), 1)
This is assuming there will be dates that are also in the future.
If ALL dates are in the past and you want to just grab the past 30 days, you could remove the AND and the second argument.
=IF([Date Column]@row >= TODAY(-30), 1)
-
@Paul Newcome That worked like a charm. Thank you as always!
-
Happy to help. 👍️
-
I need the opposite.... Check the box IF the date is WITHIN the next 30 days. I can't seem to reverse engineer the formula.
-
@95766 Try something like this:
=IF(AND([Date Column]@row >= TODAY(), [Date Column]@row <= TODAY(30)), 1)
-
@Paul Newcome Thank you!!!!!
-
Happy to help. 👍️
-
Looking for some additional help @Paul Newcome
I'm trying this formula, and it works to check the box if the date is in 2024, but if the date is older year, it doesn't check the box.
For example, the date 1/5/24, works and checks the box. 1/5/23, does not work, the box is not checked.
The formula I'm using: =IF([Volunteer Service Agreement (per term)]@row >= TODAY(-365), 1)
-
@allisonwat That's how the formula is supposed to work. It will check the box for any date that is within the past 356 days. If you wanted a formula that will check the box for dates that are more than 365 days in the past, you will need to reverse your argument.
>=
changes to
<=
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 65.1K Get Help
- 444 Global Discussions
- 142 Industry Talk
- 472 Announcements
- 5K Ideas & Feature Requests
- 83 Brandfolder
- 150 Just for fun
- 71 Community Job Board
- 489 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 301 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!