If the text field contains both "A" and "B", then it should result in "AB".

My formula:

Text_Field__c, "A" & "B" 
), "AB", 

It goes through; there are no syntax errors. But it doesn´t work.

Any ideas?


You need to use && operator :

if((contains(Text_Field__c, "A") && contains(Text_Field__c, "B")), "AB", "")

Or use AND operator :

IF(AND(contains(Text_Field__c, "A"), contains(Text_Field__c, "B")), "AB", "")
  • 1
    Remove the semicolon as this is being used in a formula. – TSmith Nov 2 '16 at 12:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy