开发者

Rounding a value to the nearest 50

I want to round values to its nearest 50. For e.g.

121 should get rounded to 100
129 should get rounded to 150
178 should get rounded to 200
165 should get rounded to 150

I have tried the following functions...

=FLOOR(C629,50)
=FLOOR((C629+50),50)
=CEILING(C631,50)

But I am still not getting the result开发者_高级运维s as expected.


From the examples you have provided, it appears that you want to move each number to the nearest multiple of 50.

This function should accomplish this:

=ROUND(C629 / 50 , 0) * 50

This works in the following manner for 129:

  1. 129 / 50 = 2.58
  2. ROUND(2.58 , 0) = 3
  3. 3 * 50 = 150

EDIT: The OP's comment to use the in-built MROUND is a much better idea.


For clarity, the simplest answer is MROUND, e.g.:

=MROUND(589,50)

This solution was submitted in a comment by shantanuo.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜