IF statement for Status updates based on dates
Hello!
So far, I have this as working formula:
=IF(AND([Start Date]@row < TODAY(), [Due Date]@row < TODAY()), "Completed", IF(AND([Start Date]@row <= TODAY(), [Due Date]@row > TODAY()), "In Progress", IF(AND([Start Date]@row >= TODAY(), [Due Date]@row > TODAY()), "Not Started")))
However, I want to add in a condition that if the start date is blank and the due date is today, the status is "In Progress". I would also like to add in another condition that if both the start date and due date are blank, then leave the status blank, because currently it is showing "Completed" if they are both blank and I do not want that.
I have tried several variations and keep getting an #UNPARSEABLE error. Does anyone know how I might add these extra conditions?
Thank you!
Best Answer
-
=IF(AND(ISBLANK([Start Date]@row), ISBLANK([Due Date]@row)), "", IF(AND(ISBLANK([Start Date]@row), [Due Date]@row = TODAY()), "In Progress", IF(AND([Start Date]@row < TODAY(), [Due Date]@row < TODAY()), "Completed", IF(AND([Start Date]@row <= TODAY(), [Due Date]@row > TODAY()), "In Progress", IF(AND([Start Date]@row >= TODAY(), [Due Date]@row > TODAY()), "Not Started")))))
Regards,
Jeff Reisman, IT Business Analyst & Project Coordinator, Mitsubishi Electric Trane US
Link: Smartsheet Functions Help Pages Link: Smartsheet Formula Error Messages
If my answer helped solve your issue, please mark it as accepted so that other users can find it later. Thanks!
Answers
-
Sure. You want to add those criteria as the first conditions to check for, using ISBLANK instead of comparing to today's date, since technically a blank date is "less than" today:
=IF(AND(ISBLANK([Start Date]@row), ISBLANK([Due Date]@row)), "", IF(AND([Start Date]@row < TODAY(), [Due Date]@row < TODAY()), "Completed", IF(AND([Start Date]@row <= TODAY(), [Due Date]@row > TODAY()), "In Progress", IF(AND([Start Date]@row >= TODAY(), [Due Date]@row > TODAY()), "Not Started"))))
(And don't forget to add one more closing parentheses at the end!)
Regards,
Jeff Reisman, IT Business Analyst & Project Coordinator, Mitsubishi Electric Trane US
Link: Smartsheet Functions Help Pages Link: Smartsheet Formula Error Messages
If my answer helped solve your issue, please mark it as accepted so that other users can find it later. Thanks!
-
Thank you, Jeff! This worked; however, I'm still missing "If Start Date is blank and Due Date is Today, show as In Progress". I will fiddle with it. Currently, it is treated as a blank. I appreciate your help!
-
=IF(AND(ISBLANK([Start Date]@row), ISBLANK([Due Date]@row)), "", IF(AND(ISBLANK([Start Date]@row), [Due Date]@row = TODAY()), "In Progress", IF(AND([Start Date]@row < TODAY(), [Due Date]@row < TODAY()), "Completed", IF(AND([Start Date]@row <= TODAY(), [Due Date]@row > TODAY()), "In Progress", IF(AND([Start Date]@row >= TODAY(), [Due Date]@row > TODAY()), "Not Started")))))
Regards,
Jeff Reisman, IT Business Analyst & Project Coordinator, Mitsubishi Electric Trane US
Link: Smartsheet Functions Help Pages Link: Smartsheet Formula Error Messages
If my answer helped solve your issue, please mark it as accepted so that other users can find it later. Thanks!
-
THANK YOU SO MUCH! :)
Help Article Resources
Categories
Check out the Formula Handbook template!