4 Replies Latest reply on Nov 13, 2014 2:45 AM by DavidJoséMartins

# If statement -> HELP

### Title

If statement -> HELP

### Post

Hello i'm new using filemaker and now i need to do a calculation. I have a variable "Age" that calculate in years the age of the person and now i want to do an if statment for this:

if age <= 10 , "Sub 10",

else if age >10 and <= 12 , "sub 12",

else if age >12 and <= 14 , "sub 14",

else if age >14 and <= 16 , "sub 16",

else if age >16 and <= 18 , "sub 18",

else if age >18 and <= 35 , "Sénior",

else if age >35, "Veteran"

I don´t what the correct syntax that i need to use but can anyone help me to do this?

Thanks a lot

• ###### 1. Re: If statement -> HELP

In the second part of each of your lines, after "and", you need to type "age" again:

else if age >10 and age <= 12 , "sub 12",

• ###### 2. Re: If statement -> HELP

and the rest is ok?

• ###### 3. Re: If statement -> HELP

First, make sure you have the correct calculation result. Currently you have it set for text.

Second, I would use Case, I.e.

Case (

age<= 10; "sub10";

age<= 12; "sub 12";

age<= 14; "sub 14";

age<= 16; "sub 16";

age<= 35; "Sènior";

"Veteran"

)

• ###### 4. Re: If statement -> HELP

thanks a lot :)