View Single Post
  #11   Report Post  
Posted to microsoft.public.excel.misc
David Biddulph[_2_] David Biddulph[_2_] is offline
external usenet poster
 
Posts: 8,651
Default Numbers changing between sheets - Floating Point Example

That is true, but of course it doesn't explain the magnitude of discrepancy
which the OP reported.
--
David Biddulph

"Wondering" wrote in message
t...
Here is a prime example of a floating point representation of decimal
numbers.

Format A1 thru A4 as numeric with 2 places of decimal.

Enter the following values: in A1, 68.6; in A2, 60. In cell A3 enter the
formula =A1-A2. In A4 enter 8.6 In A5 enter the formula: =A4=A3

Surprise! A5 displays FALSE. 68.6 - 60 equals 8.6 which does not equal
8.6! How can this be? Expand range A1:A4 to 16 places of decimal.

A1 = 68.6000000000000000, A2 = 60.0000000000000000, A3 =
8.5999999999999900. A4 =8.6000000000000000 A5 = FALSE

Now you can see that even additions (and subtractions) can produce
approximate answers.


"Daan007" wrote in message
...
On sheet1: Cell C1 has value of the sum of two other cells. Cell C2 has
the
sum of two other cells. Cell C3 is the result of adding C1 and C2. All
numbers are to two decimals (Accounting format)
On sheet2: Cell D4 = 'sheet1'!C3 however when calculated, the number in
the
cell is to four decimal points and does not equal the number on sheet1
(C3 =
381.97 but D4 = 381.9683). What is causing this? All numbers are entered
as
two decimal place numbers and formatted as accounting (it is a budget
program). How do numbers with two decimal places become a smaller number
to
four decimal places when referenced from one sheet to another? This was
written in Excel 2007 and run in Excel 2007.