
I have a picklist of country names and I want a fomrula to give me the region but my formula is not working as exected.
IF(CONTAINS(TEXT(Country__c), "Australia:Iraq"),"EU","ASIA")
Its not firing correctly and showing EU if I selected Australia or Iraq, it just shows ASIA.
(the above is an example I am testing out before adding in all countries and correct regions...
Thanks
5 respuestas
The colon (:) style of writing will ONLY work if you just 2 letter ISO-codes. In your case, you are out of options. You will have to write a lengthy Formula like -
CASE(
Country__c,
"Iraq", "EU",
"Spain", "EU",
"China", "ASIA",
....
)
You could, however, write it like this =
IF(CONTAINS("Australia:Iraq", TEXT(Country__c)), "EU", "ASIA")
It could work for your example.
But if the Country__c was us, then this same IF block will be fired since Australia has 'US' in it.