4 Replies Latest reply on Nov 18, 2016 12:50 PM by Chris McClellan

# Question regarding Syntax Error

For the below formula i am geeting syntax error...Please help

IIF([Arrears]<=0,"Not due",IIF(AND([Arrears]>0,[Arrears]<=30),"Overdue 1-30",IIF(AND([Arrears]>30,[Arrears]<=60),

"Overdue 31-60",IIF(AND([Arrears]>60,[Arrears]<=90),"Overdue 61-90",IIF(AND([Arrears]>90,[Arrears]<=180),

"Overdue 91-180",IIF(AND([Arrears]>180,[Arrears]<=360),"Overdue 181-360","Overdue > 360")))))))

Regards,

Johnson Stalen

• ###### 1. Re: Question regarding Syntax Error

There is no AND function how you're using it

The AND should be used as .... IF x AND y THEN (this is when x & y are true) ELSE (either or both are false) END

• ###### 2. Re: Question regarding Syntax Error

Try this, it should work the way you want

IF [Arrears]<=0

THEN "Not due"

ELSEIF [Arrears]<=30 then "Overdue 1-30"

ELSEIF [Arrears]<=60 then "Overdue 31-60"

ELSEIF [Arrears]<=90 then "Overdue 61-90"

ELSEIF [Arrears]<=120 then "Overdue 91-120"

ELSEIF [Arrears]<=150 then "Overdue 121-150"

ELSEIF [Arrears]<=180 then "Overdue 151-180"

ELSEIF [Arrears]<=360 then "Overdue 181-360"

ELSE "Overdue > 360"

END

• ###### 3. Re: Question regarding Syntax Error

Thank you Chris.. it worked!!!

• ###### 4. Re: Question regarding Syntax Error

Awesome, can you mark the answer as correct please ?