0

In Google Sheet, we can use ROUND() to round float to the nearest. like

5.2 = 5
5.5 = 6.

What if I want it:

5.2 = 6
5.5 = 6.

If the number exceeds by a decimal, then rounded off to +1. Any idea?

3 Answers 3

1

Try ROUNDUP

Rounds a number to a certain number of decimal places, always rounding up to the next valid increment.

1

=ROUNDUP(A2; 0)
=ARRAYFORMULA(IF(LEN(A1:A); ROUNDUP(A1:A; 0); ))
1 1

0

Round a floating number to upper integer, at first you have to import math

import math

then write

number =  math.ceil(3.2)


print(number)

` output will be

4

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.