If expression

so I have a list of number vary from 5-20, and need to make the list number like this: if x<10, make it 5, if 10<x<15, make it 10 etc.
so I write
If(x<10,5, If 10<x<15,10, If 15<x<18,15, If 18<x<20,20)))), and it’s not a correct expression. Can anyone give me a suggestion?
thanks very much

You have to pass 2 arguments in if function.
And maybe to use somewhere <= or >= , but i left you as you described…

if (x<10, 5, if ((x>10) and (x<15), 10, if ((x>15) and (x<18), 18, if ((x>18) and (x<20),20,"A"))))

what the “A” stand for?
cheers

Second argument. Could be x as well. It is mandatory.

why 6,7,11,13 rows became A?

Because of this :slight_smile:
You can use x instead.

Edit: “A” is not affecting anything now.

If_RE.gh (9.4 KB)

right! I got it. Thanks!!