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
- 63K Get Help
- 379 Global Discussions
- 212 Industry Talk
- 442 Announcements
- 4.6K Ideas & Feature Requests
- 140 Brandfolder
- 129 Just for fun
- 130 Community Job Board
- 449 Show & Tell
- 30 Member Spotlight
- 1 SmartStories
- 304 Events
- 34 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!