I have a mathematical problem that I am not sure how to solve. I am trying now but still cant find a solution.

What I is doing is this:

The example is that I have a number: "129" that I will need to round down to the nearest value. The answers to these example values look like this.

How can I find a formula that can round down to nearest value like these examples ?

Round down to nearest 5 gives: **125**

Round down to nearest 10 gives: **120**

Round down to nearest 20 gives: **120**

Round down to nearest 100 gives: **100**

Round down to nearest 1000 gives: **0**