Rounding to 5.0 or 0.0

C

chris.cudmore

Both these answers will work in the positive domain.

Mine will round -101 to -105
Ron's will round -101 to -100

Take your pick depending on how you want to handle negatives.
 
D

daddylonglegs

Both these answers will work in the positive domain.

Mine will round -101 to -105
Ron's will round -101 to -100

Take your pick depending on how you want to handle negatives.


Hi Chris

=CEILING(A1,5)

doesn't work for negative values, you need to use

=CEILING(A1,-5)

and then this will give the same result as your ROUNDUP formula

To make CEILING work for negative or positive values

=CEILING(A1,SIGN(A1)*5)
 
Top