Welcome to the Smartsheet Forum Archives
The posts in this forum are no longer monitored for accuracy and their content may no longer be current. If there's a discussion here that interests you and you'd like to find (or create) a more current version, please Visit the Current Forums.
Nested If using Date
Hi all, I have looked through the discussions and cannot find the answer, if it is a previously answered question, my apologies.
I have three columns relevant to the question:
Due Date
Status
Completed Date
Status has conditional formatting, red, yellow and green corresponding to Awaiting resolution, overdue and completed, all basic stuff.
Just to add, conditional formatting is based on cell values from dropdown box, awaiting resolution, overdue, completed.
In Status I have this formula :
=IF([Due Date]4 < TODAY(), "Overdue", "Awaiting Resolution")
And it works perfectly.
I then change to this formula:
=IF(ISBLANK([Completed date]4), "Awaiting resolution", "Completed")
Which as a stand alone formula also works perfectly.
What I want to do is combine the formulas so that if due date is earlier than today, "awaiting resolution" but if "completed date has a value then "completed. I have tried this:
=IF([Due Date]4 < TODAY(), "Overdue", "Awaiting Resolution"), IF(ISBLANK([Completed date]4), "Awaiting resolution", "Completed")) and that fails!
So, let me try and put into words what I would like to acheive, mabe it helps you experts?
From the 3 columns above I want to populate "status" depending on comparing "due date" to Today().
However, if "Completed date" is a value (date), then that overrides the status and forces it to show "completed"
I have temporarily got around this buy having conditional format all the row green if the "date completed" has value. However, I would really like this at cell value as I have tried to describe.
Please help my frustration, thanks
Thanks
David
Comments
-
Hi David,
Try this:
=IF(ISBLANK([Completed date]4), "Completed", IF([Due Date]4 < TODAY(), "Overdue", "Awaiting Resolution")))
When nesting IF statements, you nest one inside of another and close the parens at the very end of the formula.
IF Completed date is blank, return "Completed," IF Due Date is less than TODAY, return "Overdue," otherwise (if neither condition is met), return "Awaiting Resolution."
-
Thanks a million
i will try ov the weekend and revert Monday
Thanks
-
#unparsable.
But let me delve a little to make sure it is not me!
-
I think I added an extra paren to the end of the formula by mistake, try deleting that and see what happens.
-
I answered a question very similar to this one on another thread. Using my equations would require you to have slightly different columns than you mentioned here, but I think it would serve your needs.
-
Hi Shaine,
You were right, there was an additional parenthis and it now works but not quite as I want.
Let me try and descirbe:
If there is no data (date) in "completed date" then return "Awaiting resolution". However, if today() is greater than "due date" then return "Overdue". In otherwords, if the due date has passed.
If there is a date in "completed date" then that overrides "Overdue" or "awaiting resolution".
Thank you
David
-
Dear Shaine,
I have fixed it:
=IF(NOT(ISBLANK([Completed date]4)), "Completed", IF([Due Date]4 < TODAY(), "Overdue", "Awaiting Resolution"))
Thanks to you and Mike.
I have learned the subtilies of nesting If statements.
Kind regards,
David
-
Glad you got it working!
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 63.7K Get Help
- 406 Global Discussions
- 218 Industry Talk
- 456 Announcements
- 4.7K Ideas & Feature Requests
- 141 Brandfolder
- 136 Just for fun
- 57 Community Job Board
- 459 Show & Tell
- 31 Member Spotlight
- 1 SmartStories
- 297 Events
- 37 Webinars
- 7.3K Forum Archives