If statement with an OR... HELP
I have looked at this for hours now. I have a cell where I want to calculate in a column [project age] in days. I have a cell for [start date] and [end date]. When I use =today() - [start date]@row, I get the right answer. I also have a [project status] cell with a drop down list of: preliminary, active, cancelled, closed/complete, on hold. I don't want to calculate the age of the cell [project age] if the cell [project status] is canceled or closed/complete and do want to calculate it if is is pending, active or on hold. I used this formula
=IF(OR([Project Status]@row = "cancelled", "", [Project Status]@row = "closed/cancelled", ""), TODAY() - [Start DAte]@row) and get # invalid data type
When I use this formula, I get the right answer =IF([Project Status]@row = "cancelled", "", TODAY() - [Start DAte]@row)
What am I doing wrong?
Answers
-
Oh, shoot, I got it.
-
Hi @scott.95
I hope you're well and safe!
Excellent! Glad you got it working!
Feel free to share more details on how you solved it if you'd like.
Be safe, and have a fantastic weekend!
Best,
Andrée Starå | Workflow Consultant / CEO @ WORK BOLD
✅Please support the Community by marking your post with the accepted answer/helpful. 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.
-
Oh, shoot, I got it.
This didn't work as the ) was in the wrong place
=IF(OR([Project Status]@row = "cancelled", "", [Project Status]@row = "closed/cancelled", ""), TODAY() - [Start DAte]@row) and get # invalid data type
This worked as the ) is now after "cancelled" and not after the null " " return.
=IF(OR([Project Status]@row = "closed/complete", [Project Status]@row = "cancelled"), "", TODAY() - [Start Date]@row)
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.8K Get Help
- 434 Global Discussions
- 138 Industry Talk
- 470 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 65 Community Job Board
- 486 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!