ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Round a number help (https://www.excelbanter.com/excel-discussion-misc-queries/199689-round-number-help.html)

Mary

Round a number help
 
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.

Peo Sjoblom[_2_]

Round a number help
 
Round up a number to what, next integer?

--


Regards,


Peo Sjoblom

"Mary" wrote in message
...
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.




Duke Carey

Round a number help
 
=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))



"Mary" wrote:

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.


Harald Staff

Round a number help
 
=ROUND(A1+0.245,0)

HTH. Best wishes Harald

"Mary" skrev i melding
...
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.




Mary

Round a number help
 
Thank you so much Duke. It worked.

"Duke Carey" wrote:

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



"Mary" wrote:

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.



All times are GMT +1. The time now is 09:41 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com