PDA

View Full Version : round function in excel



volabos
01-03-2013, 11:10 AM
In the 'round' function, what algo is being used by excel? like round(0.5, 0) gives result as '1'.

Should not it be '0' as per the IEC 60559 standard (i.e. go for the even digit)?

Thanks for your input.

Teeroy
01-03-2013, 02:52 PM
Not having read the spec I can only say that Excel seems to conform to the mathematical definition of rounding.There is some discussion on this topic at the following https://stat.ethz.ch/pipermail/r-help/2009-March/190176.html. (https://stat.ethz.ch/pipermail/r-help/2009-March/190176.html)

Kenneth Hobs
01-03-2013, 03:02 PM
Depends on your standard and what Round you mean in Excel. In the US, most of us would round that up. I have seen even more rules to rounding than just those two basic ones.

Speaking of Excel, =round(0.5, 0) <> VBA's round(0.5, 0). In the VBE, put this in the Immediate window and press Enter key.

round(0.5, 0)