
Originally Posted by
Jerry W. Lewis
Charles Blaquière wrote:
> Ron Rosenfeld wrote:
>
>
>>I cannot reproduce your problem with your posted data. I suspect the
>>two scores are NOT exactly the same on your worksheet.
>>
>>1. How are the scores calculated? If these are calculated rather
>>than simple entries of integers, it is likely that the two 19 point
>>scores are NOT exactly the same.
>>
>>2. What do you get if you do an equality between the two cells (e.g.
>>in some cell enter the formula =S19=S20 assuming S19 and S20 are the
>>two cells where you have these 19 point scores). If you get FALSE,
>>then they are not the same and the RANK function would rank them
>>differently.
>>
>
> Yes, the two 19-point scores are in S19 and S20. Entering =S19=S20 in a cell
> returns TRUE. <chuckle> What now?
=S19=S20 proves nothing. Try =(S19-S20) instead.
Excel (and almost all other software) follows the IEEE standard for
double precision storage of floating point numbers. Most decimal
fractions cannot be represented exactly with a terminating binary
fraction (just as 1/3 cannot be represented exactly with a terminating
decimal fraction). The net result is that calculated numbers that you
would expect to be the same may not be exactly the same. Excel tries to
help by including a fuzz factor in some operations, thus if A1 contains
0.3-0.2 and A2 contains 0.1, the cell contents will look the same, even
if formatted to 15 decimal places. Because of Excel's fuzz factor,
=A1-A2 will return 0 and =A1=A2 will return TRUE. But =(A1-A2) will
show the very small difference that correctly occurs between the binary
values, and RANK() will distinguish them.
ROUND() should solve the problem, as has already been suggested.
Jerry
Bookmarks