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
- Customer Resources
- 64.9K Get Help
- 439 Global Discussions
- 138 Industry Talk
- 471 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 68 Community Job Board
- 486 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!