Round of a number

Hi!

How to round the result obtained after multiplication to the nearest multiple of 25?

Example:
{=round("Click element" * 0.9)} suppose we got the following {=round(428 * 0.9)} ={=round(385.2)} = 385

If I want to round to the nearest multiple of 25, in this example, it should have been 400.

How to do this?

Hi, and welcome to the forum! :slight_smile:

The simplest way to do this is probably to divide by 25, round it, and then multiply by 25 again.

For example:

Input number: {formtext: default=427; name=n}

Rounded to the nearest 25: {=25 * round(n/25)}

Let me know if that helps!

1 Like

yea, it works.

Thank you!