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
olkeitholkeith 

CASE Formula not working. Please Help!

I have a formula i am writing to apply a time zone lead records based on their state.  I have tried using the standard State field, as well as a State__c field which is a picklist.  I get the same result each time:
 

CASE(  State,

"AL", "CST",

"AR", "CST",

"IL", "CST",

"IA", "CST",

"KS", "CST",

"AZ”, "MST",

"CO”, "MST",

"ID”, "MST",

"MT”, "MST",

"NM”, "MST",

"OR”, "MST",

"MN”, "CST",

"LA”, "CST",

"MS”, "CST",

"MO”, "CST",

"NE”, "CST",

"ND”, "CST",

"OK”, "CST",

"SD”, "CST",

"TX”, "CST",

"WI”, "CST",

"UT”, "MST",

"WY”, "MST",

"WA", "PST",

"CT”, "EST",

"DE”, "EST",

"FL”, "EST",

"GA”, "EST",

"IN”, "EST",

"KY”, "EST",

"ME”, "EST",

"MD”, "EST",

"MA”, "EST",

"MI", "EST",

"NH", "EST",

"NJ", "EST",

"NY","EST",

"NC","EST",

"OH","EST",

"PA","EST",

"RI", ”EST",

"SC", "EST",

"TN", "EST",

"VA", "EST",

"VT", "EST",

"WV", "EST", "NA")
 
I always recieve an error that says i am missing a ")", and it highlights the first "MST". 
 
Please let me know if i am doing something wrong here...
 
thanks!
 
keith
 
ksadler@orangelake.com
AMartinAMartin

You are using two different styles of quote marks:  ” and " .  Replace the ” with " and you'll be fine.

Aiden

 
 
CASE( State__c,
"AL", "CST",
"AR", "CST",
"IL", "CST",
"IA", "CST",
"KS", "CST",
"AZ", "MST",
"CO", "MST",
"ID", "MST",
"MT", "MST",
"NM", "MST",
"OR", "MST",
"MN", "CST",
"LA", "CST",
"MS", "CST",
"MO", "CST",
"NE", "CST",
"ND", "CST",
"OK", "CST",
"SD", "CST",
"TX", "CST",
"WI", "CST",
"UT", "MST",
"WY", "MST",
"WA", "PST",
"CT", "EST",
"DE", "EST",
"FL", "EST",
"GA", "EST",
"IN", "EST",
"KY", "EST",
"ME", "EST",
"MD", "EST",
"MA", "EST",
"MI", "EST",
"NH", "EST",
"NJ", "EST",
"NY","EST",
"NC","EST",
"OH","EST",
"PA","EST",
"RI", "EST",
"SC", "EST",
"TN", "EST",
"VA", "EST",
"VT", "EST",
"WV", "EST", "NA")
olkeitholkeith
Thank you very much!  Worked like a charm :robothappy: