How to use multiple if not or statements
I am receiving an "invalid data type" result when I run this:
=IF(NOT(ISBLANK([Start Date]@row)), NETWORKDAYS([Due Date]@row, IF([Date Completed]@row <> "", [Date Completed]@row, TODAY())))
and there is a null value for Due date.
How can I add OR statement to this so that if either Start Date OR Due date are (not) blank then it will continue the function?
Answers
-
You are getting that because Smartsheet is writing a date to that field, which is not a Date field. There is a way you can write a "date" to that field if this really what you want to do, basically explode the date into date parts and then reconstruct them as a string.
The answer to the question you ask is:
=IF(OR(NOT(ISBLANK([Start Date]@row)), NOT(ISBLANK([Due Date]@row))) = true, "True", "False")
-
Thanks for your help!
Right. I am not looking for a date to be written to the "days overdue" field. If either the start date or the due date are null, I just want to ignore the formula so that there's not an error in that cell.
If there are both a start date and a due date, the formula should then provide me a "days overdue" value (either positive or negative value).
So:
IF(NOT(ISBLANK([Start Date]@row))
AND
IF(NOT(ISBLANK([Due Date]@row))
Then
NETWORKDAYS([Due Date]@row, IF([Date Completed]@row <> "", [Date Completed]@row, TODAY())))
How do I put all of that together in a formula that will work?
-
Actually I got it! I should have been using AND instead of OR
=IF(AND(NOT(ISBLANK([Start Date]@row)), NOT(ISBLANK([Due Date]@row))), NETWORKDAYS([Due Date]@row, IF([Date Completed]@row <> "", [Date Completed]@row, TODAY())))
Works great. Thank you!
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 64.2K Get Help
- 419 Global Discussions
- 221 Industry Talk
- 461 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 142 Just for fun
- 58 Community Job Board
- 462 Show & Tell
- 32 Member Spotlight
- 1 SmartStories
- 300 Events
- 39 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!