Consulting

Results 1 to 3 of 3

Thread: round function in excel

  1. #1

    round function in excel

    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.

  2. #2
    VBAX Mentor Teeroy's Avatar
    Joined
    Apr 2012
    Location
    Sydney, Australia
    Posts
    414
    Location
    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.
    _________________________________________________________________________
    "In theory there is no difference between theory and practice. In practice there is." - Chuck Reid

    Any day you learn something new is a day not wasted.

  3. #3
    VBAX Guru Kenneth Hobs's Avatar
    Joined
    Nov 2005
    Location
    Tecumseh, OK
    Posts
    4,956
    Location
    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.

    [VBA]round(0.5, 0)[/VBA]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •