ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Personale Number Rounding!!!!! (https://www.excelbanter.com/excel-programming/283638-personale-number-rounding.html)

giax79

Personale Number Rounding!!!!!
 

Hello!!
I have to make rounding on some numbers but the rule of my roundin
would be these:

1)if the number has the value "4" in the 3rd decimal position leave th
number rounded on second decimal. Example
if number is 8932,2341 the rounded number would be 8932,23.

2)if the number has the 3rd decimal position greater than "4", roun
off for excess. Example if number is 62725,1591 the rounded numbe
would be 62725,16.

I don't know how make this in excel because the default roundin
doesn't work with specifical number on a specifical decimal position
Someone can tell me how solve this problem???!?!

-----------------------------------------------
~~ Message posted from http://www.ExcelTip.com
~~View and post usenet messages directly from http://www.ExcelForum.com


Kevin Beckham

Personale Number Rounding!!!!!
 
Use the ROUND function in which you specify the number of
decimal places you want, e.g
=ROUND(123.4446, 2) = 123.44

Kevin Beckham

-----Original Message-----

Hello!!
I have to make rounding on some numbers but the rule of

my rounding
would be these:

1)if the number has the value "4" in the 3rd decimal

position leave the
number rounded on second decimal. Example
if number is 8932,2341 the rounded number would be

8932,23.

2)if the number has the 3rd decimal position greater

than "4", round
off for excess. Example if number is 62725,1591 the

rounded number
would be 62725,16.

I don't know how make this in excel because the default

rounding
doesn't work with specifical number on a specifical

decimal position.
Someone can tell me how solve this problem???!?!?


------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from

http://www.ExcelForum.com/

.


Howard Kaikow

Personale Number Rounding!!!!!
 
You would need to create your own rounding function.

The function would convert the number to a string representation, then it
would determine how to round, and round as needed.

--
http://www.standards.com/; See Howard Kaikow's web site.
"giax79" wrote in message
...

Hello!!
I have to make rounding on some numbers but the rule of my rounding
would be these:

1)if the number has the value "4" in the 3rd decimal position leave the
number rounded on second decimal. Example
if number is 8932,2341 the rounded number would be 8932,23.

2)if the number has the 3rd decimal position greater than "4", round
off for excess. Example if number is 62725,1591 the rounded number
would be 62725,16.

I don't know how make this in excel because the default rounding
doesn't work with specifical number on a specifical decimal position.
Someone can tell me how solve this problem???!?!?


------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from http://www.ExcelForum.com/




giax79[_2_]

Personale Number Rounding!!!!!
 

And how can I convert number in string, than check the 3rd decimal
position, make a condition and return the right value??!


------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from http://www.ExcelForum.com/


Howard Kaikow

Personale Number Rounding!!!!!
 
Use, say, CStr function to convert to string.
The use VBA built-in string functions to parse the string.

--
http://www.standards.com/; See Howard Kaikow's web site.
"giax79" wrote in message
...

And how can I convert number in string, than check the 3rd decimal
position, make a condition and return the right value??!


------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from http://www.ExcelForum.com/




Ron Rosenfeld

Personale Number Rounding!!!!!
 
On Wed, 26 Nov 2003 03:14:42 -0600, giax79
wrote:


Hello!!
I have to make rounding on some numbers but the rule of my rounding
would be these:

1)if the number has the value "4" in the 3rd decimal position leave the
number rounded on second decimal. Example
if number is 8932,2341 the rounded number would be 8932,23.

2)if the number has the 3rd decimal position greater than "4", round
off for excess. Example if number is 62725,1591 the rounded number
would be 62725,16.

I don't know how make this in excel because the default rounding
doesn't work with specifical number on a specifical decimal position.
Someone can tell me how solve this problem???!?!?


Yes, but the default worksheet rounding does work they way you specify!

=ROUND(8932.2349,2) -- 8932.23
=ROUND(67275.1591,2) -- 67275.16

If you are using VBA, be sure you use Application.WorksheetFunction.Round as
later versions of VBA round differently.




--ron


All times are GMT +1. The time now is 05:32 AM.

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