Search
Twitter
« Sync and Share your Google Calendar | Main | Add Word Document Link to Sidebar »
Tuesday
Jul242012

Return State Region based on Billing State

This code will return reagions of states based on teh billing state in your salesforce. 

IF(AND(CONTAINS("AR:AZ:UT:LA:CO:HI:NM:TX:KS:OK:MS", billingState),(Tier__c= "CORPORATE")),              "West / South", IF(AND(CONTAINS("NV:NE:OR:MN:WA:IA:ID:IL:MT:WI:WY:AK:ND:SN", billingState), (Tier__c= "CORPORATE")), "West /North", IF(AND(CONTAINS("ME:NH:VT:MA:RI:CT:NY", billingState), (Tier__c= "CORPORATE")), "East/North", IF(AND(CONTAINS("PA:NJ:MD:DE:DC:IN:VA:WV:KY:OH:MI", billingState), (Tier__c= "CORPORATE")), "East /Mid", IF(AND(CONTAINS("TN:AL:NC:SC:MS:GA:FL", billingState), (Tier__c= "CORPORATE")), "East /South", IF(AND(Region__c = "East", Tier__c= "Enterprise"), "East", IF(AND(Region__c = "West", Tier__c= "Enterprise"), "West", IF(Region__c = "Canada", "Canada", "Other"))))))))

PrintView Printer Friendly Version

EmailEmail Article to Friend

Reader Comments

There are no comments for this journal entry. To create a new comment, use the form below.

PostPost a New Comment

Enter your information below to add a new comment.

My response is on my own website »
Author Email (optional):
Author URL (optional):
Post:
 
All HTML will be escaped. Hyperlinks will be created for URLs automatically.