Skip to main content
Solved

IF statement does not work properly

  • February 16, 2023
  • 2 replies
  • 27 views

Forum|alt.badge.img+1
  • New Participant
  • 4 replies

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.

 

 

 

Best answer by Ben_Young1

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

Ben_Young1
Forum|alt.badge.img+22
  • Brainy
  • 520 replies
  • Answer
  • February 17, 2023

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" ) ) ) ) ) )

 

 


Forum|alt.badge.img+1
  • Author
  • New Participant
  • 4 replies
  • February 17, 2023

Hi Ben_Young1,

It works! Thank you so much!

Regards,

Jerrel