Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


On Sat, Feb 19, 2011 at 01:05, plino <pedlino@gmail.com> wrote:

It's only slightly more complicated :)

=IF(VALUE(RIGHT(A9))=5;IF(ISEVEN(VALUE(LEFT(RIGHT(A9;2))));A9-0.005;A9+0.005);ROUND(A9;2))

Check if the last digit is 5. If it is add 0.005 if the previous digit is
odd or subtract if it is even. Otherwise use the standard round function
with two cases.

Now, if the numbers of decimal cases is not constant, then it would be
complicated :)

Actually, that is exactly what I am looking for, a round function that
allows me to do bankers rounding on *any* decimal position I choose. I
have files where I need to round-to-even to one decimal place...

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.