IF formula with multiple options
Good morning-
Wondering if someone might be able to help me with this. I have a dropdown list column that has three options. If option A is selected, I want to automatically populate another column in the sheet with a specific message, but if option B is selected, I want to populate that same column but with a different message. (And if option C is selected, I do not want anything to happen.) Is this possible? I am able to do this for option A alone using IF, but not sure how to add a different formula for option B. (Hope this makes sense?) Any thoughts would be appreciated!
Thank you!
John
Best Answer
-
@brewhaha - Hi John!
You can nest a string of IFs together. :) For example:
IF([Your Column]@row="Option A", "Your Option A message", IF([Your Column]@row="Option B", "Your Option B message", ""))
If Option A is selected, the option A message will be shown. If not, the formula moves to the next condition - i.e., the next If statement. If Option B is selected, the option B message is shown. If that's false, the cell will be blank. (Note that you don't actually need to tell Smartsheet to leave the cell blank - "" - if both statements are false. You could just leave that out! But I included it in to be complete.)
Does that help?
Answers
-
@brewhaha - Hi John!
You can nest a string of IFs together. :) For example:
IF([Your Column]@row="Option A", "Your Option A message", IF([Your Column]@row="Option B", "Your Option B message", ""))
If Option A is selected, the option A message will be shown. If not, the formula moves to the next condition - i.e., the next If statement. If Option B is selected, the option B message is shown. If that's false, the cell will be blank. (Note that you don't actually need to tell Smartsheet to leave the cell blank - "" - if both statements are false. You could just leave that out! But I included it in to be complete.)
Does that help?
-
Thank you… much appreciated! This worked.
-
Awesome - happy to help! :)
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 64.3K Get Help
- 423 Global Discussions
- 221 Industry Talk
- 461 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 144 Just for fun
- 59 Community Job Board
- 463 Show & Tell
- 32 Member Spotlight
- 1 SmartStories
- 300 Events
- 39 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!