2

I want My formula to show Tier 0 if lifetime account Revenue is between 0 and 999, Tier 1 if Lifetime Account revenue is between 1000 and 10000 and so on.

Here is the formula I have:

IF (Lifetime_Account_Revenue__c >= 0, <= 999, "Tier 0",
IF (Lifetime_Account_Revenue__c >= 1000, <= 10000, "Tier 1",
IF (Lifetime_Account_Revenue__c >= 10001, <= 25000, "Tier 2",
IF (Lifetime_Account_Revenue__c >= 25001, <=50000, "Tier 3",
IF (Lifetime_Account_Revenue__c >= 50001, "Tier 4",
"")))))

I get a syntax error that says

Error: Syntax error. Found '<='

Please Help!

6

You are trying to put in two conditions in your IF statements, if you want to do that, then you need to use an AND() statement. This should work for you

IF (AND(Lifetime_Account_Revenue__c >= 0, Lifetime_Account_Revenue__c <= 999), "Tier 0",
IF (AND(Lifetime_Account_Revenue__c >= 1000, Lifetime_Account_Revenue__c <= 10000), "Tier 1",
IF (AND(Lifetime_Account_Revenue__c >= 10001, Lifetime_Account_Revenue__c <= 25000), "Tier 2",
IF (AND(Lifetime_Account_Revenue__c >= 25001, Lifetime_Account_Revenue__c <= 50000), "Tier 3",
IF (Lifetime_Account_Revenue__c >= 50001, "Tier 4",
"")))))

For more information on formulas and operators, take a look here

1

There were some syntax errors with the formula (obviously). I find it easiest to format complex formulas like code, as it highlights missing statements etc. This should work:

IF (
    AND (
        Lifetime_Account_Revenue__c >= 0, 
        Lifetime_Account_Revenue__c <= 999
    ), 
    "Tier 0",
    IF (
        AND (
            Lifetime_Account_Revenue__c >= 1000, 
            Lifetime_Account_Revenue__c <= 10000 
        ),
        "Tier 1",
        IF (
            AND (
                Lifetime_Account_Revenue__c >= 10001, 
                Lifetime_Account_Revenue__c <= 25000
            ),
            "Tier 2",
            IF (
                AND (
                    Lifetime_Account_Revenue__c >= 25001, 
                    Lifetime_Account_Revenue__c <=50000
                ), 
                "Tier 3",
                IF (
                    Lifetime_Account_Revenue__c >= 50001, 
                    "Tier 4",
                    ""
                )
            )
        )
    )
)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.