Multiple IF statements in a column formula
Hi,
I’m new to Smartsheet and I trying to write a multiple IF statements that populate the cells in the column with a specific date depending on the value of the corresponding cell in a different column. For example, a column named “Target date value” will be updated to 12/31/2022 if “target date” column has the value Estimated 2022 in it. This is what I have so far
=IF([Target Date]@row = “TBD”, TODAY())
this works but when I try to add more statements, I get an error saying column formula isn’t quite right.
=IF([Target Date]@row = “TBD”, TODAY()), =IF([Target Date]@row = “Not Planned”, TODAY()).
How can I get this to work and how can I add specific dates instead of the today function. Apologies for the long text, I hope it is communicated effectively.
Thanks!
Answers
-
To write a nested IF, the second IF goes in the third portion of the first IF, the third IF goes in the third portion of the second IF, so on and so forth.
=IF(logical statement, value if statement is true, value if statement is false)
Basically you want to say if it is "TBD" then do this otherwise do something else. That "something else" is the next IF.
Then to insert an actual date, you would use a DATE function.
DATE(yyyy, mm, dd)
=IF([Target Date]@row = "TBD", DATE(yyyy, mm, dd), IF([Target Date]@row = "Not Planned", DATE(yyyy, mm, dd)))
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 65.1K Get Help
- 444 Global Discussions
- 142 Industry Talk
- 472 Announcements
- 5K Ideas & Feature Requests
- 83 Brandfolder
- 150 Just for fun
- 71 Community Job Board
- 489 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 301 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!