Nested IF/OR Contains Function
Hi,
I'm trying to write a CONTAINS formula to auto-populate the project location column. There are 6 states to choose from. The Project Name is usually very long & descriptive but always contains the standard 2 letter code for the six states that the projects could be in. I came across the CONTAINS formula but cannot figure out how to write it so that it rolls through all of the options. Ex: If the Project Name column has a cell that contains "UT" it will spit out Utah in the Project Location column. If the Project Name has a WY in a cell it spits out Wyoming as the location etc. Each time I attempt to write the formula it gives me the Incorrect argument or the unparseable.
Thanks for any help!
Best Answer
-
Try something like this.
=IF(CONTAINS("CO", ColumnName:ColumnName, "Colorado", IF(CONTAINS("UT", ColumnName:ColumnName, "Utah")
Did it work?
I hope that helps!
Be safe and have a fantastic week!
Best,
Andrée Starå
Workflow Consultant / CEO @ WORK BOLD
✅Did my post(s) help or answer your question or solve your problem? Please help the Community by marking it as 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.
Answers
-
Try something like this.
=IF(CONTAINS("CO", ColumnName:ColumnName, "Colorado", IF(CONTAINS("UT", ColumnName:ColumnName, "Utah")
Did it work?
I hope that helps!
Be safe and have a fantastic week!
Best,
Andrée Starå
Workflow Consultant / CEO @ WORK BOLD
✅Did my post(s) help or answer your question or solve your problem? Please help the Community by marking it as 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.
-
One alternative would be to create a column to split the state name from the project name (since it appears you use "-" as a delimiter"). See here for a handy guide on how to split text in Smartsheet. You could then use a VLOOKUP for the state using a secondary sheet. Training on VLOOKUP is available in the Learning Center here.
This might be a bit cleaner in terms of data management and result in fewer mismatches.
Jennifer
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
- 141 Just for fun
- 58 Community Job Board
- 462 Show & Tell
- 32 Member Spotlight
- 1 SmartStories
- 299 Events
- 38 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!