j66_europe
New Member
- Joined
- Jun 13, 2016
- Messages
- 4
I'm really struggling when trying to understand how Excel deals with number representation. It would appear that (1.2 / 0.2) and (12 / 2) are NOT the same. Although both results appear as '6' in the formula bar, I noticed that in a pivot table, Excel 2013 was not summarising both values. Instead, the '6' appeared twice in the pivot results.
Bizarrely, the following formula returns true:
However, clearly the two 6s can't be equivalent if the pivot table is not aggregating them.
I then experimented with dec2bin and dec2hex:
=DEC2BIN(1.2/0.2) yields 101 which is 5, yet...
=DEC2BIN(12/2) yields 110 which is 6
So what's going on here? How can I check how Excel is storing my numbers, because when it displays both as 6, and when my if function suggests the values are the same, how can they be? Is this expected behaviour? Thanks
Bizarrely, the following formula returns true:
Code:
=IF((1.2/0.2)=(12/2),TRUE,FALSE)
However, clearly the two 6s can't be equivalent if the pivot table is not aggregating them.
I then experimented with dec2bin and dec2hex:
=DEC2BIN(1.2/0.2) yields 101 which is 5, yet...
=DEC2BIN(12/2) yields 110 which is 6
So what's going on here? How can I check how Excel is storing my numbers, because when it displays both as 6, and when my if function suggests the values are the same, how can they be? Is this expected behaviour? Thanks