function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Ken FuiopKen Fuiop 

Error: Syntax error. Missing ')' for custom field

Hi all,
I am working on a custom region field formula and getting Error: Syntax error. Missing ')'  for the formula below.  The formula works fine until I add the two IF Contains lines for Central America and South America (in bold below) The highlighted area for the error is on "Central America" and on "South America".  Really got me this one!
Thanks

IF(ISBLANK( BillingCountry ), "None",
IF(CONTAINS("Belize:Costa Rica:El Salvador:Guatemala:Honduras:Nicaragua:Panama”,BillingCountry), "Central America”,
IF(CONTAINS("Argentina:Boliva:Brazil:Chile:Colombia:Ecuador:Guyana:Paraguay:Peru:Suriname:Uruguay:Venezuela:Falkland Islands (malvinas)​:French Guiana:South Georgia and The South Sandwich Islands”, BillingCountry), "South America",

IF(CONTAINS("Bouvet Island:Comoros:Sao Tome and Principe:Algeria:Angola:Benin:Botswana:Burkina Faso:Burundi:Cameroon:Cape Verde:Central African Republic:Chad:Congo:Congo, The Democratic Republic of The:Côte D'ivoire:Djibouti:Egypt:Equatorial Guinea:Eritrea:Ethiopia:Gabon:Gambia:Ghana:Guinea:Guinea-bissau:Kenya:Lesotho:Liberia:Libya:Madagascar:Malawi:Mali:Mauritania:Mauritius:Mayotte:Mozambique:Namibia:Niger:Nigeria:Réunion:Rwanda:Senegal:Seychelles:Sierra Leone:Somalia:South Africa:South Sudan:Sudan:Swaziland:Tanzania, United Republic of:Togo:Tunisia:Uganda:Western Sahara:Zambia:Zimbabwe:Morocco:Bahrain:Iran, Islamic Republic of:Iraq:Israel:Jordan:Kuwait:Lebanon:Oman:Pakistan:Palestinian Territory, Occupied:Qatar:Saudi Arabia:Syrian Arab Republic:United Arab Emirates:Yemen ", BillingCountry ), "AfriME",
IF(CONTAINS("Faroe Islands:Svalbard and Jan Mayen:Malta:Åland Islands:Albania:Andorra:Armenia:Austria:Azerbaijan:Belarus:Belgium:Bosnia and Herzegovina:Bulgaria:Croatia:Cyprus:Czech Republic:Denmark:Estonia:Finland:France:French Southern Territories:Georgia:Germany:Gibraltar:Greece:Greenland:Guernsey:Holy See (vatican City State):Hungary:Iceland:Ireland:Isle of Man:Italy:Jersey:Kazakhstan:Kyrgyzstan:Latvia:Liechtenstein:Lithuania:Luxembourg:Macedonia, The Former Yugoslav Republic of:Moldova, Republic of:Monaco:Montenegro:Netherlands:Norway:Poland:Portugal:Romania:Russian Federation:San Marino:Serbia:Slovakia:Slovenia:Spain:Sweden:Switzerland:Tajikistan:Turkmenistan:Ukraine:United Kingdom:Uzbekistan:Turkey", BillingCountry ), "Europe", "Other")))
Martha VMartha V
I counted 12  (  and only 11 )   so you are missing one ) somewhere in there. Add one more at the end would be my guess.
Ken FuiopKen Fuiop
Thanks for the reply, added one more but still not working! Cheers
 
Martha VMartha V
Ok, I put the formula in an editor, and according to the editor you should have )))))     --- 5 )  --- at the end of the formula


IF(ISBLANK( BillingCountry ), "None",
  IF(CONTAINS("Belize:Costa Rica:El Salvador:Guatemala:Honduras:
               Nicaragua:Panama”,BillingCountry), "Central America”,
    IF(CONTAINS("Argentina:Boliva:Brazil:Chile:Colombia:Ecuador:Guyana:
                 Paraguay:Peru:Suriname:Uruguay:Venezuela:
                 Falkland Islands (malvinas)​:French Guiana:
                 South Georgia and The South Sandwich Islands”, BillingCountry), "South America",                 
       IF(CONTAINS("Bouvet Island:Comoros:Sao Tome and Principe:Algeria:Angola:Benin:
                    Botswana:Burkina Faso:Burundi:Cameroon:Cape Verde:Central African Republic:
                    Chad:Congo:Congo, The Democratic Republic of The:Côte D'ivoire:Djibouti:
                    Egypt:Equatorial Guinea:Eritrea:Ethiopia:Gabon:Gambia:Ghana:Guinea:
                    Guinea-bissau:Kenya:Lesotho:Liberia:Libya:Madagascar:Malawi:Mali:
                    Mauritania:Mauritius:Mayotte:Mozambique:Namibia:Niger:Nigeria:Réunion:
                    Rwanda:Senegal:Seychelles:Sierra Leone:Somalia:South Africa:South Sudan:
                    Sudan:Swaziland:Tanzania, United Republic of:Togo:Tunisia:Uganda:
                    Western Sahara:Zambia:Zimbabwe:Morocco:Bahrain:Iran, Islamic Republic of:
                    Iraq:Israel:Jordan:Kuwait:Lebanon:Oman:Pakistan:
                    Palestinian Territory, Occupied:Qatar:Saudi Arabia:Syrian Arab Republic:
                    United Arab Emirates:Yemen ", BillingCountry ), "AfriME",
          IF(CONTAINS("Faroe Islands:Svalbard and Jan Mayen:Malta:Åland Islands:Albania:
                       Andorra:Armenia:Austria:Azerbaijan:Belarus:Belgium:
                       Bosnia and Herzegovina:Bulgaria:Croatia:Cyprus:Czech Republic:
                       Denmark:Estonia:Finland:France:French Southern Territories:Georgia:
                       Germany:Gibraltar:Greece:Greenland:Guernsey:Holy See (vatican City State):
                       Hungary:Iceland:Ireland:Isle of Man:Italy:Jersey:Kazakhstan:
                       Kyrgyzstan:Latvia:Liechtenstein:Lithuania:Luxembourg:
                       Macedonia, The Former Yugoslav Republic of:Moldova, 
                       Republic of:Monaco:Montenegro:Netherlands:Norway:Poland:Portugal:
                       Romania:Russian Federation:San Marino:Serbia:Slovakia:Slovenia:Spain:
                       Sweden:Switzerland:Tajikistan:Turkmenistan:Ukraine:United Kingdom:
                       Uzbekistan:Turkey", BillingCountry ), "Europe", "Other"))))) 
Ken FuiopKen Fuiop
Thanks for the latest, I'm still getting syntax error. I'm going to rebuild from the beginning again. Cheers