ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   round a 15 digit decimal down from .05 (https://www.excelbanter.com/excel-programming/324608-round-15-digit-decimal-down-05-a.html)

Excell-ent

round a 15 digit decimal down from .05
 
What code to use to round a 15 digit decimal down if it's less than .05 and
up if it's over that in EXCEL.

My work does calculations in grams.

Also, need to know how to divide the above number by 100 to get a per cent
of total weight .

I'm tending to want to use MOD, MROUND and INTEGER.


Jerry W. Lewis

round a 15 digit decimal down from .05
 
In Excel
=ROUND(x,1)
or in VBA
Application.Round(x,1)

Jerry

Excell-ent wrote:

What code to use to round a 15 digit decimal down if it's less than .05 and
up if it's over that in EXCEL.

My work does calculations in grams.

Also, need to know how to divide the above number by 100 to get a per cent
of total weight .

I'm tending to want to use MOD, MROUND and INTEGER.



Excell-ent

round a 15 digit decimal down from .05
 
I'll try it and get back to you. Thanks. What about the cell that makes a
percent from dividing two cells of the grams with 15 digits - please answer
in both Excel and VBA.

"Jerry W. Lewis" wrote:

In Excel
=ROUND(x,1)
or in VBA
Application.Round(x,1)

Jerry

Excell-ent wrote:

What code to use to round a 15 digit decimal down if it's less than .05 and
up if it's over that in EXCEL.

My work does calculations in grams.

Also, need to know how to divide the above number by 100 to get a per cent
of total weight .

I'm tending to want to use MOD, MROUND and INTEGER.





All times are GMT +1. The time now is 07:50 AM.

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