ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   rounding (https://www.excelbanter.com/excel-worksheet-functions/5971-rounding.html)

Alex

rounding
 
I need to do the following rounding in the column where the data obtained
from calculations:
61.4111 to 61.45
68.632 to 68.65
85.85015 to 85.85
33.68 to 33.70

So, the second digit should be 0 or 5. If the second digit was 5 it should
remain 5, if 0 and <= 5 and it should be 5, if 5 the second digit should
be 0 but the first digit will be by 1 more.

Could anybody advise what kind of formula could I use here?

Thanks in advance.

Jason Morin

=ROUNDUP(A1/0.05,0)*0.05

HTH
Jason
Atlanta, GA

-----Original Message-----
I need to do the following rounding in the column where

the data obtained
from calculations:
61.4111 to 61.45
68.632 to 68.65
85.85015 to 85.85
33.68 to 33.70

So, the second digit should be 0 or 5. If the second

digit was 5 it should
remain 5, if 0 and <= 5 and it should be 5, if 5 the

second digit should
be 0 but the first digit will be by 1 more.

Could anybody advise what kind of formula could I use

here?

Thanks in advance.
.


Alex

Thanks a lot, Jason.
I cannot understand it now. But, it's working perfectly.

"Jason Morin" wrote:

=ROUNDUP(A1/0.05,0)*0.05

HTH
Jason
Atlanta, GA

-----Original Message-----
I need to do the following rounding in the column where

the data obtained
from calculations:
61.4111 to 61.45
68.632 to 68.65
85.85015 to 85.85
33.68 to 33.70

So, the second digit should be 0 or 5. If the second

digit was 5 it should
remain 5, if 0 and <= 5 and it should be 5, if 5 the

second digit should
be 0 but the first digit will be by 1 more.

Could anybody advise what kind of formula could I use

here?

Thanks in advance.
.



K.S.Warrier

Hi,
Try this
if A1=61.4111, then rounding to the nearest 0.05 gives
B1=int(A1/1)+mod(A1,0.05)*0.05+if(dec(A1)-mod(A1,0.05)*0.05<0.025,0,.05)
Similarly others can also be rounded to the nearest 0.05.
Thank You,
K.S.Warrier
"Alex" wrote:

I need to do the following rounding in the column where the data obtained
from calculations:
61.4111 to 61.45
68.632 to 68.65
85.85015 to 85.85
33.68 to 33.70

So, the second digit should be 0 or 5. If the second digit was 5 it should
remain 5, if 0 and <= 5 and it should be 5, if 5 the second digit should
be 0 but the first digit will be by 1 more.

Could anybody advise what kind of formula could I use here?

Thanks in advance.


JEV

Would =MROUND(A1,0.05) work as well?

"K.S.Warrier" wrote:

Hi,
Try this
if A1=61.4111, then rounding to the nearest 0.05 gives
B1=int(A1/1)+mod(A1,0.05)*0.05+if(dec(A1)-mod(A1,0.05)*0.05<0.025,0,.05)
Similarly others can also be rounded to the nearest 0.05.
Thank You,
K.S.Warrier
"Alex" wrote:

I need to do the following rounding in the column where the data obtained
from calculations:
61.4111 to 61.45
68.632 to 68.65
85.85015 to 85.85
33.68 to 33.70

So, the second digit should be 0 or 5. If the second digit was 5 it should
remain 5, if 0 and <= 5 and it should be 5, if 5 the second digit should
be 0 but the first digit will be by 1 more.

Could anybody advise what kind of formula could I use here?

Thanks in advance.



All times are GMT +1. The time now is 12:13 PM.

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