Most decimal fractions (including .82, .05, and .02) have no exact
finite binary representation, just as 1/3 has no exact decimal
representation. Since your inputs must be approximated, the results are
only approximate. Programming around this issue in floating point
calculations has been standard for over half a century (long before
Excel was a gleam in Bill's eye).
To understand the problem intuitively, consider a hypothetical computer
that does decimal arithmetic with 4 significant figures.
1 = 1/3 + 1/3 + 1/3
but on this hypothetical computer, then 1/3 = 0.3333 so
1/3 + 1/3 +1/3 = 0.9999 <> 1
Excel (and almost all other general purpose software) uses IEEE double
precision binary arithmetic. The IEEE double precision approximation
for 227.82 is
227.81999999999999317878973670303821563720703125
the approximation for 0.05 is
0.05000000000000000277555756156289135105907917022705078125
the approximation for 0.02 is
0.0200000000000000004163336342344337026588618755340576171875
Hence in binary 227+0.75+0.05+0.02 is greater than the binary
approximation to 227.82. That is why
=(227.82-(227+0.75+0.05+0.02))
returns -2.8421709430404E-14 (the correct result of the binary
operations) instead of zero.
You will get similar results in almost all general purpose software,
unless they apply some sort of fuzz factor to the calculations. Excel
applies a fuzz factor if the subtraction is the last operation, so that
=227.82-(227+0.75+0.05+0.02)
will return zero, but this fuzz factor does not apply inside an IF()
function.
Give the nature of the issue, two simple and theoretically correct way
to do your IF would be
=IF( ROUND(cell1-cell5,2)=0, TRUE, FALSE)
=IF( ABS(cell1-cell5)<epsilon, TRUE, FALSE)
where epsilon is a suitably small number (<0.01 in this case).
Jerry