# Re: IF statement does not work properly

Solved
1092 0
cancel
Showing results for
Did you mean:
4 - Data Explorer

I have a survey set up with 5 of outcomes depending on the total amounts of points. To assign a certain score to a certain outcome I used the IF statement. See attached files. It does not work properly for at 60 points it should show 'Extreme angst'.

Any thoughts?

Thanks.

1 Solution

Accepted Solutions
11 - Venus

Hey @Jerrel

Try this:

``````IF(
{Score},
IF(
{Score} <= 15,
"Geen angst",
IF(
AND({Score} > 15, {Score} <= 25),
"Milde angst",
IF(
AND({Score} > 25, {Score} <= 35),
"Gematigde angst",
IF(
AND({Score} > 35, {Score} <= 45),
"Hevige angst",
IF(
AND({Score} > 45, {Score} <= 60),
"Extreme angst"
)
)
)
)
)
)``````

2 Replies 2
11 - Venus

Hey @Jerrel

Try this:

``````IF(
{Score},
IF(
{Score} <= 15,
"Geen angst",
IF(
AND({Score} > 15, {Score} <= 25),
"Milde angst",
IF(
AND({Score} > 25, {Score} <= 35),
"Gematigde angst",
IF(
AND({Score} > 35, {Score} <= 45),
"Hevige angst",
IF(
AND({Score} > 45, {Score} <= 60),
"Extreme angst"
)
)
)
)
)
)``````

4 - Data Explorer

Hi Ben_Young1,

It works! Thank you so much!

Regards,

Jerrel