Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 78
Default 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/

.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 269
Default 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/



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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/

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 269
Default 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/





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,651
Default 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
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Rounding to every 5th whole number LHS Excel Discussion (Misc queries) 4 October 3rd 08 10:22 AM
Rounding number to 0.25 ? Construk Excel Discussion (Misc queries) 5 July 17th 07 10:38 PM
number rounding tamiluchi Excel Worksheet Functions 8 April 20th 06 06:05 PM
How do I keep a value from rounding up to the next number? Abby Excel Worksheet Functions 1 January 5th 05 09:07 PM
Rounding a number to a multiple quantity that adds to a fixed total number wjlo Excel Worksheet Functions 1 November 9th 04 04:43 PM


All times are GMT +1. The time now is 06:34 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"