On Sat, Feb 19, 2011 at 00:24, plino <pedlino@gmail.com> wrote:
I had never heard of bankers rounding before. Interesting concept.
There is no such function in OOo/LO, Excel or Gnumeric...
But you can easily create a function
=IF(A1-INT(A1)=0.5;IF(ISEVEN(INT(A1));A1-0.5;A1+0.5);ROUND(A1))
(Adjust if your separator is a comma instead of a semi-colon)
What this does is check if the fractional part is 0.5 and adds 0.5 to the
number if the integer is odd and subtracts if it is even. If it is not 0.5
then it uses the regular Round() function ;)
Hope this helps!
Yes, but mostly no...
The above works for 22.5 and -1234.5, but now I want to deal with currencies...
Like $ 123.455 or € 99.125, which should be rounded to $ 123.46 and € 99.12
In other words, the issue is slightly more complicated...
Robert
--
Robert AH Prins
robert.ah.prins@gmail.com
--
Unsubscribe instructions: E-mail to users+help@libreoffice.org
List archive: http://listarchives.libreoffice.org/www/users/
*** All posts to this list are publicly archived for eternity ***
Context
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.