I'm trying to assign a territory based on BillingState field in Salesforce and getting syntax error message Error: Syntax error. Missing "

    IF(ISBLANK(BillingState), "None",
    IF(CONTAINS("CA:WA:NV:OR:AK:HI”, BillingState), “Pacific”,
    IF(CONTAINS("AZ:CO:MT:NM:UT:WY:ID", BillingState), “Mountain”,
    IF(CONTAINS("AL:AR:IL:LA:MN:MS:MO:OK:WI:KS:NE:ND:SD:TX:TN", BillingState), “Central”,
    BillingState), “East”,

1 Answer 1


It looks like in this line


The closing quote is not actually the right character. Replace it with this

  • Thank you you that solved it. For future reference this formula assigns a time zone to an account based on the billing state.
    – Xperez
    Mar 28, 2020 at 22:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .