---
schema_version: "1"
id: 096962bad3633d7d71d61902d6285da45e17b022af2a14a70debee1fe609025d
title: Sample Account Management Formulas
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/platform/264-0-0/useful_advanced_formulas_acct_mgmt.md
canonical_url: https://help.salesforce.com/s/articleView?id=platform.useful_advanced_formulas_acct_mgmt.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 1f4ce9b7d6c428086b9b5f362efd6e745c52a830dc1e2c8d26aa130f85e61964
description: Rate an account, assign sales regions based on billing state, and track the age of active contracts.
products:
  - Salesforce Platform
  - Security
release: "264"
---
# Sample Account Management Formulas

Rate an account, assign sales regions based on billing state, and track the age of active contracts.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: both Salesforce Classic and Lightning Experience</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: <strong>Essentials</strong>, <strong>Group</strong>, <strong>Professional</strong>, <strong>Enterprise</strong>, <strong>Performance</strong>, <strong>Unlimited</strong>, and <strong>Developer</strong> Editions</td></tr></tbody></table>

For details about using the functions included in these samples, see [Formula Operators and Functions by Context](https://help.salesforce.com/s/articleView?id=platform.customize_functions.htm&release=264.0.0&type=5 "Use these operators and functions when building formulas. All functions are available everywhere that you can include a formula, such as formula fields, validation rules, approval processes, and workflow rules, unless otherwise specified.").

## Account Rating

This formula evaluates Annual Revenue, Billing Country, and Type, and assigns a value of “Hot,” “Warm,” or “Cold.”

`IF (AND (AnnualRevenue > 10000000,  CONTAINS (CASE (BillingCountry, "United States", "US", "America", "US", "USA", "US", "NA"), "US")),  IF(ISPICKVAL(Type, "Manufacturing Partner"), "Hot",  IF(OR (ISPICKVAL (Type, "Channel Partner/Reseller"),  ISPICKVAL(Type, "Installation Partner")), "Warm", "Cold")),  "Cold")`

In addition, you can reference this Account Rating formula field from the contact object using cross-object formulas.

```
Account.Account_Rating__c
```

## Account Region

This formula returns a text value of “North,” “South,” “East,” “West,” or “Central” based on the Billing State/Province of the account.

`IF(ISBLANK(BillingState), "None", IF(CONTAINS("AK:AZ:CA:HA:NV:NM:OR:UT:WA", BillingState), "West", IF(CONTAINS("CO:ID:MT:KS:OK:TX:WY", BillingState), "Central", IF(CONTAINS("CT:ME:MA:NH:NY:PA:RI:VT", BillingState), "East", IF(CONTAINS("AL:AR:DC:DE:FL:GA:KY:LA:MD:MS:NC:NJ:SC:TN:VA:WV", BillingState), "South", IF(CONTAINS("IL:IN:IA:MI:MN:MO:NE:ND:OH:SD:WI", BillingState), "North", "Other"))))))`

## Contract Aging

This formula calculates the number of days since a contract with an account was activated. If the contract Status isn’t “Activated,” this field is blank.

`IF(ISPICKVAL(Contract_Status__c, "Activated"),  NOW() - Contract_Activated_Date__c, null)`