IF CONTAINS Formula to return different text values in second column
Hi! I am looking for some help in creating a formula where if a certain word is found in one column, another word is returned in a second column. For example if "Head", "Nasal", or "Spine" is contained in the Procedure column, "Neuro" is returned in the Clinical Specialty column.
I've tried different variations of this and none were working properly.
=IF(PROCEDURE@row, CONTAINS(" NASAL"), "Neuro")
Ultimately, I'd like to have a 5 or 6 different words in the Clinical Specialty column.
If "Head", "Nasal", or "Spine" in the Procedure column return "Neuro" in Clinical Specialty.
If "Chest" or "Cardiac" in Procedure column return "Cardiothoracic" in Clinical Specialty.
If "Extremity", "Forearm", "Ankle", "Foot" in Procedure column return "MSK" in Clinical Specialty.
Thank you!
Best Answer
-
See if this works for you.
=IF(OR(CONTAINS("Head", [PROCEDURE]@row), CONTAINS("Nasal", [PROCEDURE]@row), CONTAINS("Neuro", [PROCEDURE]@row)), "Neuro", IF(OR(CONTAINS("Chest", [PROCEDURE]@row), CONTAINS("Cardiac", [PROCEDURE]@row)), "Cardiothoracic", IF(OR(CONTAINS("Extremity", [PROCEDURE]@row), CONTAINS("Forearm", [PROCEDURE]@row), CONTAINS("Ankle", [PROCEDURE]@row), CONTAINS("Foot", [PROCEDURE]@row)), "MSK")))
Answers
-
See if this works for you.
=IF(OR(CONTAINS("Head", [PROCEDURE]@row), CONTAINS("Nasal", [PROCEDURE]@row), CONTAINS("Neuro", [PROCEDURE]@row)), "Neuro", IF(OR(CONTAINS("Chest", [PROCEDURE]@row), CONTAINS("Cardiac", [PROCEDURE]@row)), "Cardiothoracic", IF(OR(CONTAINS("Extremity", [PROCEDURE]@row), CONTAINS("Forearm", [PROCEDURE]@row), CONTAINS("Ankle", [PROCEDURE]@row), CONTAINS("Foot", [PROCEDURE]@row)), "MSK")))
-
This worked, thanks so much!
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 63.7K Get Help
- 406 Global Discussions
- 218 Industry Talk
- 456 Announcements
- 4.7K Ideas & Feature Requests
- 141 Brandfolder
- 136 Just for fun
- 57 Community Job Board
- 459 Show & Tell
- 31 Member Spotlight
- 1 SmartStories
- 297 Events
- 37 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!