# I am having trouble with creating a number range IF formula

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 '<='

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 (Lifetime_Account_Revenue__c >= 50001, "Tier 4",
"")))))
``````

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 (
),
"Tier 0",
IF (
AND (
),
"Tier 1",
IF (
AND (
),
"Tier 2",
IF (
AND (