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
- 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!