# How to Replace each column value who belong to an interval of number by a specific value

Hello everybody,

I have a column where i want to replace each value who is between -5 et 5 by 0. How can i do that please ? I don’t find the solution with the math formula node.

Thank you verry much in advance and have a good day.

Hello @ThomasAmb33,

if you want to use Math Formula node you need to use if() function. Following expression should do it:

`if( between( -5, \$yourColName\$, 5 ), 0, \$yourColName\$)`

However I prefer Rule Engine node for such tasks. Find it more intuitive and readable.

``````\$yourColName\$  > -5 AND \$yourColName\$ < 5 => 0
TRUE => \$yourColName\$
``````

Br,
Ivan

6 Likes

Thank you verry much Ipazin for your reall quick answer, it works really well.

1 Like

Hi @ipazin

This is not working for me in ‘Math Formula’

Alternatively you can use:
`if( ceil(abs(\$yourColName\$)/5) <= 1, 0, \$yourColName\$)`

BR

1 Like