ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   computation error (https://www.excelbanter.com/excel-discussion-misc-queries/155353-computation-error.html)

Rajneesh Arora

computation error
 
enter following numbers in worksheet (in same sequence)
14189.05
-13605.77
-544.23
-39.05
sum of above
The answer(sum) should be exactly zero. But the answer computed and
displayed is -1.1795E-12
Now change the sequence of numbers and sum them. Answer will be exactly zero.
Any ideas, whats the reason.
Any solution to overcome this - I want to reach an answer of exactly zero
(without changing the sequence).
There are many other combinations of sums in which there is a similar problem.
Please help.

Peo Sjoblom

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


http://www.mcgimpsey.com/excel/pennyoff.html


--
Regards,

Peo Sjoblom



"Rajneesh Arora" wrote in message
...
enter following numbers in worksheet (in same sequence)
14189.05
-13605.77
-544.23
-39.05
sum of above
The answer(sum) should be exactly zero. But the answer computed and
displayed is -1.1795E-12
Now change the sequence of numbers and sum them. Answer will be exactly
zero.
Any ideas, whats the reason.
Any solution to overcome this - I want to reach an answer of exactly zero
(without changing the sequence).
There are many other combinations of sums in which there is a similar
problem.
Please help.




Farhad

computation error
 
Hi,

seems it would be possible just by rounding like:

=ROUND(SUM(your range),0)

Thanks,
--
Farhad Hodjat


"Rajneesh Arora" wrote:

enter following numbers in worksheet (in same sequence)
14189.05
-13605.77
-544.23
-39.05
sum of above
The answer(sum) should be exactly zero. But the answer computed and
displayed is -1.1795E-12
Now change the sequence of numbers and sum them. Answer will be exactly zero.
Any ideas, whats the reason.
Any solution to overcome this - I want to reach an answer of exactly zero
(without changing the sequence).
There are many other combinations of sums in which there is a similar problem.
Please help.


Pranav Vaidya

computation error
 
change the format of all the cells including result to Number with 2
decimals. It will be zero then. I suppose currently the cells are of general
format.

The sum was 0 on my PC after I changed the formatting.
Hope this helps.
--
Pranav Vaidya
VBA Developer
PN, MH-India
If you think my answer is useful, please rate this post as an ANSWER!!


"Rajneesh Arora" wrote:

enter following numbers in worksheet (in same sequence)
14189.05
-13605.77
-544.23
-39.05
sum of above
The answer(sum) should be exactly zero. But the answer computed and
displayed is -1.1795E-12
Now change the sequence of numbers and sum them. Answer will be exactly zero.
Any ideas, whats the reason.
Any solution to overcome this - I want to reach an answer of exactly zero
(without changing the sequence).
There are many other combinations of sums in which there is a similar problem.
Please help.


Peo Sjoblom

computation error
 
No it wasn't, formatting only changes the display so if you format
1.00000002 to 2 decimals it will display as 1.00 but it will still be
1.00000002


You can select precision as displayed under toolsoptionscalculations but
that can affect other parts of the spreadsheet



--
Regards,

Peo Sjoblom



"Pranav Vaidya" wrote in message
...
change the format of all the cells including result to Number with 2
decimals. It will be zero then. I suppose currently the cells are of
general
format.

The sum was 0 on my PC after I changed the formatting.
Hope this helps.
--
Pranav Vaidya
VBA Developer
PN, MH-India
If you think my answer is useful, please rate this post as an ANSWER!!


"Rajneesh Arora" wrote:

enter following numbers in worksheet (in same sequence)
14189.05
-13605.77
-544.23
-39.05
sum of above
The answer(sum) should be exactly zero. But the answer computed and
displayed is -1.1795E-12
Now change the sequence of numbers and sum them. Answer will be exactly
zero.
Any ideas, whats the reason.
Any solution to overcome this - I want to reach an answer of exactly zero
(without changing the sequence).
There are many other combinations of sums in which there is a similar
problem.
Please help.





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

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