Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Not understanding MROUND

Can somone answer an MROUND question for me?

Situation:

MROUND with a multiple of .1 rounds 773.65 to 773.6
MROUND with a multiple of .1 rounds 921.65 to 921.7

Isn't the remainder the same for both values? Shouldn't it round up
for both of these values?

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,393
Default Not understanding MROUND

You have hit one problems associated with the way computers (not just Excel)
stores numbers. A decimal number like 773.65 must be convert to a binary
number. Sometimes an exact conversion is not possible. See these sites for
more detail
Visual Basic and Arithmetic Precision
http://support.microsoft.com/default...NoWebContent=1
Tutorial to Understand IEEE Floating-Point Errors
http://support.microsoft.com/default...NoWebContent=1
What Every Computer Scientist Should Know About Floating Point
http://docs.sun.com/source/806-3568/ncg_goldberg.html
Go to source
http://www.cpearson.com/excel/rounding.htm

If you type 773.65 in A1 and in B1 use =MROUND(A1,0.1) you get 773.6 (an
erroneous result)
But if in A2 you use =A1+0.0000000000001 then =MROUND(A2,0.1) gives the
correct value of 773.7. Adding that small amount overcame the binary
conversion problem. As you are interested in only once decimal place you
might consider using =MROUND(A1+0.0001, 0.1)

Note when I use correct/incorrect I assume we are not using the
'round-to-even' convention.

best wishes
--
Bernard V Liengme
Microsoft Excel MVP
www.stfx.ca/people/bliengme
remove caps from email

wrote in message
oups.com...
Can somone answer an MROUND question for me?

Situation:

MROUND with a multiple of .1 rounds 773.65 to 773.6
MROUND with a multiple of .1 rounds 921.65 to 921.7

Isn't the remainder the same for both values? Shouldn't it round up
for both of these values?



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
MROUND cheeser83 Excel Discussion (Misc queries) 7 January 6th 07 04:07 AM
MRound Lucky_guy2000 Excel Discussion (Misc queries) 2 April 21st 06 01:44 PM
SUM & MROUND Formulas dewey Excel Discussion (Misc queries) 3 October 26th 05 09:40 AM
Mround to nearest 5 c Giorgos Excel Discussion (Misc queries) 1 July 5th 05 11:48 AM
Mround ynissel Excel Discussion (Misc queries) 1 June 2nd 05 05:32 PM


All times are GMT +1. The time now is 10:16 PM.

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"