Ask Your Question

Function to round decimal numbers?

asked 2015-03-28 16:25:43 +0200

MathGirl77 gravatar image

updated 2015-03-28 20:16:35 +0200

I have been using the ROUNDUP / ROUNDDOWN functions to get whole numbers, but in some cases, I need to round up to the nearest 1/4 number. How would I go about creating a function to check 24.118, and then tell the software to round it up to 24.25? Thanks kindly.

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted

answered 2015-03-28 17:37:55 +0200

Lupp gravatar image

updated 2015-03-28 17:42:24 +0200

As 'Math' doesn't round anything I suppose you are talking of spreadsheet formulae. Please add the tag 'Calc' to your question.

Let's talk of ROUNDing first. Let's in addition call the number you want to get integer multiples of (1/4 in your example) the MODULUS, the number you want to be rounded the ARGUMENT. What you want to get is simply named the RESULT.


ROUND is the Calc standard function. You may use ROUNDUP and ROUNDDOWN in the same way.

For even more sophisticated rounding (neither 'nearest' nor 'up' nor 'down') you will have to use the QUOTIENT function.

edit flag offensive delete link more


Thanks. I have been using roundup and rounddown, and I found another one called mround, but none of those have worked quite well enough. I will check out the quotient function.

MathGirl77 gravatar imageMathGirl77 ( 2015-03-28 20:15:31 +0200 )edit

I think can work rounding up with ROUND((Argument+Modulus/2-1) / Modulus) * Modulus or =MROUND(Argument+Modulus/2-1;Modulus), adding (Modulus/2-1) we get to round up.

m.a.riosv gravatar imagem.a.riosv ( 2015-03-29 03:31:42 +0200 )edit

answered 2015-03-28 22:44:45 +0200

karolus gravatar image

updated 2015-03-28 22:47:51 +0200




edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2015-03-28 16:25:43 +0200

Seen: 20,336 times

Last updated: Mar 28 '15