Issue with formula (Contains, If and or)
Hi, I cannot seem to get this formula to work —
I want to flag any requests for rapid ads (ad request type contains "rapid" for two types of classifications (class type contains "mgr" or "sup"). This is what the formula looks like but it is not working properly so I know something is wrong… any help would be most appreciated?
=IF(CONTAINS([AD REQUEST TYPE]@row, "RAPID"), AND(OR(CONTAINS([CLASS TITLE]@row, "sup"), CONTAINS([CLASS TITLE]@row, "mgr"))),"do not rapid post unless specialist capacity"," "
Best Answers
-
There's an IF missing, the way you've written the formula. It appears to be where the AND currently is -
… "RAPID", IF(OR(CONTAINS(…
The way the formula is currently written, it's only evaluating "RAPID" in the Ad Request Type as TRUE or FALSE. More about the IF formula structure:
If this answer resolves your question, please help the Community by marking it as an accepted answer. I'd also be grateful for your response - "Insightful"or "Awesome" reactions are much appreciated. Thanks!
-
Hello @DHR Temp Assignment Team
Just rearranging the formula a bit
You can try:
=IF(AND(CONTAINS("RAPID",[AD REQUEST TYPE]@row),OR(CONTAINS("sup",[CLASS TITLE]@row),CONTAINS("mgr",[CLASS TITLE]@row))),"do not rapid post unless specialist capacity","")
Output:
The above checks to see if AD REQUEST TYPE contains "Rapid" AND the Class Title contains either "Sup" or "Mgr". You can change the True Statement "Do not Rapid Post Unless Specialist Capacity" as needed, along with the false statement right after. As a reminder CONTAINS Syntax is (Search_For, Search_Within).
Hope that helps!
Davin Vo - Sevan Technology
Smartsheet Platinum Partner
Answers
-
There's an IF missing, the way you've written the formula. It appears to be where the AND currently is -
… "RAPID", IF(OR(CONTAINS(…
The way the formula is currently written, it's only evaluating "RAPID" in the Ad Request Type as TRUE or FALSE. More about the IF formula structure:
If this answer resolves your question, please help the Community by marking it as an accepted answer. I'd also be grateful for your response - "Insightful"or "Awesome" reactions are much appreciated. Thanks!
-
Hello @DHR Temp Assignment Team
Just rearranging the formula a bit
You can try:
=IF(AND(CONTAINS("RAPID",[AD REQUEST TYPE]@row),OR(CONTAINS("sup",[CLASS TITLE]@row),CONTAINS("mgr",[CLASS TITLE]@row))),"do not rapid post unless specialist capacity","")
Output:
The above checks to see if AD REQUEST TYPE contains "Rapid" AND the Class Title contains either "Sup" or "Mgr". You can change the True Statement "Do not Rapid Post Unless Specialist Capacity" as needed, along with the false statement right after. As a reminder CONTAINS Syntax is (Search_For, Search_Within).
Hope that helps!
Davin Vo - Sevan Technology
Smartsheet Platinum Partner
-
PERFECT, THANK YOU
'
-
THANK YOU TOO!
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 64.3K Get Help
- 419 Global Discussions
- 221 Industry Talk
- 461 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 142 Just for fun
- 58 Community Job Board
- 462 Show & Tell
- 32 Member Spotlight
- 1 SmartStories
- 300 Events
- 39 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!