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))
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top