You need to sign in to do that
Don't have an account?

Case function not working because it's going over 3900 character limit
Hello,
I am trying to assign a Region value to an Account based on the Shipping Address of the Account. My Case function (sample below) works when it does not go over the 3900 character limit:
CASE(ShippingCountry,
"Afghanistan", "EMEA",
"Åland Islands", "EMEA",
"Albania", "EMEA",
"Algeria", "EMEA",
"American Samoa", "APAC",
...)
However, with over 300 different countries, the complete function is over 8000 characters and will not save. How would I optimize this formula to work for all 300 different countries and keep the same functionality?
Please respond with specific formulas to help.
Thanks.
Hello,
I don't think you will be able to do this in formula - or at least with one formula.
One - not so nice workaround - would be to:
1) create first formula for first 150 countries
2) create second formula for second 150 countries
3) create a workflow rule that sets the region field based on result of formula_field_1 OR result of formula_field_2
Otherwise your alternative could also be implementing the trigger where you would put this logic.
Btw: we usualy put countries in separate object country (country name, region,....) and then do lookups to those countries, when we have some attributes that accompanies country.
Maybe you could find some help here...
https://na1.salesforce.com/help/doc/en/salesforce_formula_size_tipsheet.pdf