IF Function to return Yes or No depending on difference between two dates.
Hello,
I have two date columns; [First Date of Absence] and [Start Date].
I am trying to write a formula that returns "YES" if the difference between [First Date of Absence] and [Start Date] is less than or equal to 182 and returns "NO" if the difference between [First Date of Absence] and [Start Date] is more than than 182.
I have tried different variations but can't get it to work. Any help would be really appreciated.
Answers
-
Hi @Daniel_HR1
I hope you're well and safe!
Try something like this.
=IF(OR([First Date of Absence]@row = "", [Start Date]@row = ""), "", IF(NETDAYS([First Date of Absence]@row, [Start Date]@row) <= 182, "NO", "YES"))
Did that work/help?
I hope that helps!
Be safe and have a fantastic weekend!
Best,
Andrée Starå | Workflow Consultant / CEO @ WORK BOLD
✅Did my post(s) help or answer your question or solve your problem? Please support the Community by marking it Insightful/Vote Up or/and as the accepted answer. It will make it easier for others to find a solution or help to answer!
SMARTSHEET EXPERT CONSULTANT & PARTNER
Andrée Starå | Workflow Consultant / CEO @ WORK BOLD
W: www.workbold.com | E:andree@workbold.com | P: +46 (0) - 72 - 510 99 35
Feel free to contact me for help with Smartsheet, integrations, general workflow advice, or anything else.
-
Unfortunately no, that formula returns "NO" regardless of the dates.
-
Strange!
It works for me.
I'd be happy to take a quick look.
Can you maybe share the sheet(s)/copies of the sheet(s)? (Delete/replace any confidential/sensitive information before sharing) That would make it easier to help. (share too, andree@workbold.com)
SMARTSHEET EXPERT CONSULTANT & PARTNER
Andrée Starå | Workflow Consultant / CEO @ WORK BOLD
W: www.workbold.com | E:andree@workbold.com | P: +46 (0) - 72 - 510 99 35
Feel free to contact me for help with Smartsheet, integrations, general workflow advice, or anything else.
-
Hi Andree - I just wrote one like this but was attempting to string it as I have different values to return if it's over either 30 days, (return "60 Days) 60 days (Return 90 Days) or 90 days (Return "Peer)
Not getting it to work - just unparseable. Thoughts?
Thanks !
-
I think I answered you in another thread with the solution. (pasted below)
I hope you're well and safe!
Try something like this. (you had one "-" too many before the 90-Day part)
= IF([30-day process begin]@row = 1, "30-Day", IF([60-day process begin]@row = 1, "60-Day", IF([90-day process begin]@row = 1, "90-Day", "-")))
Did that work/help?
I hope that helps!
Be safe and have a fantastic week!
Best,
Andrée Starå | Workflow Consultant / CEO @ WORK BOLD
✅Did my post(s) help or answer your question or solve your problem? Please support the Community by marking it Insightful/Vote Up or/and as the accepted answer. It will make it easier for others to find a solution or help to answer!
SMARTSHEET EXPERT CONSULTANT & PARTNER
Andrée Starå | Workflow Consultant / CEO @ WORK BOLD
W: www.workbold.com | E:andree@workbold.com | P: +46 (0) - 72 - 510 99 35
Feel free to contact me for help with Smartsheet, integrations, general workflow advice, or anything else.
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.9K Get Help
- 441 Global Discussions
- 140 Industry Talk
- 472 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 68 Community Job Board
- 497 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!