Return different value based on date
Hi, I'm trying to write a formula to return different values based on the reference date ([Next Calibration/PM Date]@row) compared to today's date. I want the equation to:
- If the cell is blank, return as "Pending",
- If the date is < = today, return as "Overdue",
- If the date is > today, return as "Current",
- If the date is between today and today(30), return as "Upcoming"
This is the equation that I have so far:
=IF([Next Calibration/PM Date]@row = "", "Pending", IF([Next Calibration/PM Date]@row <= TODAY(30), "Overdue", IF([Next Calibration/PM Date]@row > TODAY(), "Current", IF((TODAY(29) > [Next Calibration/PM Date]<TODAY(), "Upcoming")))))
But I can't seem to get the "Upcoming" condition right.
Thank you!!
Answers
-
Hey @vaue try this
=IF([Next Calibration/PM Date]@row = "", "Pending", IF([Next Calibration/PM Date]@row <= TODAY(), "Overdue", IF([Next Calibration/PM Date]@row <= TODAY(30), "Upcoming", "Current")))
Mostly you just needed to switch the current condition and the upcoming condition because the current condition you had would have applied always before the upcoming condition
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 64.1K Get Help
- 414 Global Discussions
- 221 Industry Talk
- 461 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 141 Just for fun
- 58 Community Job Board
- 462 Show & Tell
- 32 Member Spotlight
- 1 SmartStories
- 299 Events
- 38 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!