I had a need for a Banker's rounding formula (aka Half Round to Even) so I did some searching and found a Mr. Excel video referencing a formula by Barry Houdini. My need was to round figures to the nearest even penny. (5.145 rounds to 5.14 and 5.155 rounds to 5.16) This is designed to keep the overall total close to the actual figure by sometimes rounding up and sometimes rounding down on an exact half cent.
The formula in question is: =ROUND(A1,2)-(MOD(A1,10)*1000,20)=5)/100
I found an interesting problem with it when the figure being rounded is based upon a calculation vs. just a number. In cell A1, I have a calculation and in cell A2, I have the same number just keyed in with no formula. One works and one doesn't and I can't see why. Any help would be appreciated. Thanks
The formula in question is: =ROUND(A1,2)-(MOD(A1,10)*1000,20)=5)/100
I found an interesting problem with it when the figure being rounded is based upon a calculation vs. just a number. In cell A1, I have a calculation and in cell A2, I have the same number just keyed in with no formula. One works and one doesn't and I can't see why. Any help would be appreciated. Thanks
Book2 | ||||||
---|---|---|---|---|---|---|
A | B | C | D | |||
1 | 6.5250000000000000 | 6.52 | ||||
2 | 6.5250000000000000 | 6.53 | ||||
3 | ||||||
4 | TRUE | |||||
Sheet2 |