Yes my formula does works! [....]
=IF([...],IF(VALUE(RIGHT(TEXT(TRUNC(B5,2),"0.00"),1))>0,TRUNC(B5,1)+0.05,B5))
If your formula behaves as you want when TRUNC(B5,2) is of the form
x.x0, then none of the roundup/ceiling solutions truly works for you.
But I suspect you are simply not grasping the subtlety of the
situation.
(And if you did, I suspect you would want the roundup/ceiling solution
anyway.)
I suspect you enter and display values with just 2 decimal places, and
you think that exactly matches the underlying value in the cell.
Well, that is almost never the case. The only numbers of the form
x.x0 that exactly match the underlying value are x.00 and x.50
(assuming that "x" is no more than 15 and 14 significant digits
respectively). But, for example, if you enter 1.10 into a cell, the
actual value is
1.10000000000000,0088817841970012523233890533447265625. (The comma
demarcates the end of 15 significant digits to the left.)
If you only use your formula with B5 equal to a constant that you
entered, returning B5 instead of TRUNC(B5,2) makes no difference.
But if B5 is the result of some formula, the little differences
between internal and displayed values can cause significant
differences in the results of the formula -- large enough differences
so that, for example, a comparison with the constant 1.10 might return
false, even though 1.10 is displayed in the cell.
In such cases, I presume that you would prefer TRUNC(B5,2) so that
WYSIWYG. For example, a comparison with the constant 1.10 would
always return true if B5 appears to be 1.10 because both TRUNC(B5,2)
and the constant 1.10 would have the same (inexact) internal
representation.
Note: Sometimes Excel returns true for comparisons even if two
operands does not have the same internal represenation. But the Excel
heuristic to make that work is necessarily "inconsistent" because it
depends on just how different the internal representations are. There
is no right answer that will fit all applications (read: all personal
tastes).
HTH.
----- original posting -----