Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
TOM TOM is offline
external usenet poster
 
Posts: 6
Default I dont understand....

When I subtract this: 53,30 - 49,88 excel show this result: 3,42
but when I click to cell I see this: 3,41999999999999
Why? I need 3,42

I have got sheet where I subtract many tenth numbers and owing to this
"error" I have got bad results.

How can I correct this?

Many thanks
TOM


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default I dont understand....

You can use =round(Ref,2)
  #3   Report Post  
Posted to microsoft.public.excel.programming
TOM TOM is offline
external usenet poster
 
Posts: 4
Default I dont understand....

Of course, but why is this possible?


"vtisix" píse v diskusním príspevku
...
You can use =round(Ref,2)



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default I dont understand....

See Chip Pearson's page on this:

http://www.cpearson.com/excel/rounding.htm

--
Regards,
Tom Ogilvy

"TOM" wrote in message
...
Of course, but why is this possible?


"vtisix" píse v diskusním príspevku
...
You can use =round(Ref,2)





  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,651
Default I dont understand....

On Thu, 8 Jul 2004 14:54:13 +0200, "TOM" wrote:

When I subtract this: 53,30 - 49,88 excel show this result: 3,42
but when I click to cell I see this: 3,41999999999999
Why? I need 3,42

I have got sheet where I subtract many tenth numbers and owing to this
"error" I have got bad results.

How can I correct this?

Many thanks
TOM


Excel, like most spreadsheet programs, works in binary arithmetic and also is
limited to 15 decimal precision.

Since certain numbers cannot be expressed exactly in base 2 (binary), you will
see what you describe.

For example, certain numbers cannot be expressed exactly as decimal (base 10).
Take 1/3. No matter how many digits of precision you use, you cannot express
it exactly in Base 10. It will be 0.333333333...

So 1/3 + 1/3 +1/3 = 0.999999999... if the math is done in base 10.

To correct the problem, the simplest way is to round the result to the desired
number of decimals. Using Tools/Options/Precision as Displayed can do it also,
but that may be limiting to the rest of your worksheet.




--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
Gap or something I cannot understand MFS Excel Discussion (Misc queries) 1 August 26th 09 12:13 AM
not understand [email protected] New Users to Excel 1 February 24th 08 02:18 PM
I NEED HELP TO UNDERSTAND THIS MACRO!!! HERNAN Excel Discussion (Misc queries) 8 June 1st 07 07:28 PM
I don't Understand elusiverunner Excel Worksheet Functions 6 November 25th 05 09:19 PM
<> Scooterdog Excel Worksheet Functions 1 November 8th 04 07:56 AM


All times are GMT +1. The time now is 12:00 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"