Originally Posted by
joeu2004
The problem is an anomaly with binary arithmetic and the internal implementations of ROUND, ROUNDDOWN and ROUNDUP.
ROUND(-0.25,1) returns the exact binary representation of -0.3. In other words, MATCH(ROUND(-0.25,1),{-0.3},0) returns 1.
But ROUNDUP(-0.21,1) does not. In other words, MATCH(ROUNDUP(-0.21,1),{-0.3},0) returns #N/A, indicating no match.
(But ROUNDUP(-0.21,1)=-0.3 returns TRUE because of a trick that Excel plays.)
Work-around: MATCH(ROUND(ROUNDUP(-0.21,1),1),{-0.3},0)
I suspect ROUNDDOWN also does not always return the exact binary representation, although it seems to work for some values that result on 0.2 and 0.3.
I think it would be prudent to use ROUND(ROUNDDOWN($D26,1),1) as well.
(I'm in a hurry. I might post more details later.)
PS.... Changing from VLOOKUP(...,FALSE) to VLOOKUP(...,TRUE) might seem to work because VLOOKUP does not look for an exact match. However, whether or not it always matches the correct row is coincidental, since the internal binary result of ROUNDUP (and ROUNDDOWN) might be infinitesimally less than expected in some cases.
Bookmarks