Round a number help

M

Mary

Hi I want to round up a number only if the decimal part is greater than 0.25,
if not leave it as a whole number
Thank you.
 
D

Duke Carey

=if(mod(a1,1)>.25,int(a1)+1,a1)

If A1 = 2.3, that formula will give you 3
If A1 = 2.2, that formula will give you 2.2

If you want 2.2 to be turned into 2.0, then use

=if(mod(a1,1)>.25,int(a1)+1,int(a1))
 
M

Mary

Thank you so much Duke. It worked.

Duke Carey said:
=if(mod(a1,1)>.25,int(a1)+1,a1)

If A1 = 2.3, that formula will give you 3
If A1 = 2.2, that formula will give you 2.2

If you want 2.2 to be turned into 2.0, then use

=if(mod(a1,1)>.25,int(a1)+1,int(a1))
 
Top