Within X amount of time from Today
Hello,
I am trying to find a formula that will tell me if a date is within 4 Years of today's date and populate "YES" or "NO" in a separate column. (Example: To help specify if a product is in warranty that lasts 4 years, and populate "Yes" in another column if the date entered is within 4 years)
Best Answer
-
This would be it then:
=IF([Date Column Name]@row>= DATE(YEAR(TODAY()) - 4, MONTH(TODAY()), DAY(TODAY())), "Yes", "No")
Answers
-
Try something like this:
=IF([Date Column Name]@row<= DATE(YEAR(TODAY()) + 4, MONTH(TODAY()), DAY(TODAY())), "Yes", "No")
-
It's showing each entry as in range, even if it is not. Any suggestions on an adjustment?
Thanks!
-
Can you provide a screenshot of some of the dates that should not be within range?
-
Here is one example of each. Let me know if anything else would be helpful, Thanks!
-
That date is not more than 4 years in the future, so that is functioning as expected. Did you want something that functioned differently? Are you looking for something that flags "Yes" when the date is less than 4 years old instead?
-
Yes, I am looking for dates that are less than or equal to 4 years older than today's date (warranty is valid 4 years from the date of manufacture). Sorry for the confusion!
-
This would be it then:
=IF([Date Column Name]@row>= DATE(YEAR(TODAY()) - 4, MONTH(TODAY()), DAY(TODAY())), "Yes", "No")
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 63.5K Get Help
- 402 Global Discussions
- 213 Industry Talk
- 450 Announcements
- 4.7K Ideas & Feature Requests
- 141 Brandfolder
- 135 Just for fun
- 56 Community Job Board
- 454 Show & Tell
- 31 Member Spotlight
- 1 SmartStories
- 296 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!