If you don't want any errors even in the 10th digit, I think it's probably a
good idea to use ROUNDUP and ROUNDDOWN instead of adding or subtracting
0.005 for the final result. So, my final function for a Bankers Round that
I'm using is:
=IF(ROUND(100*A1-INT(100*A1),8)=0.5,IF(MOD(ROUND(100*A1-0.5,0),2),ROUNDUP(A1,2),ROUNDDOWN(A1,2)),ROUND(A1,2))
Kind of repetitious with all the ROUND functions, but works and gives an
exact match to GnuCash results witch was what I needed. Usually I'm
inserting something like A1/4 instead of just A1 where the banker's round of
A1/4 is "my personal expenses" and the difference of that and A1 is my
business expense. Without any rounding, all the data seemed to match
between GnuCash and LibreOffice Calc, but the totals would be off by a few
pennies - not acceptable because often a mismatch like that points to an
oversight on my part in entering values into Calc. To my surprise though,
simple rounding to 2 digits didn't work either. Eventually, I realized
GnuCash was using this bankers rounding method.
Does anyone know how to create a user-defined function in LibreOffice Calc
so I could just enter "BANKROUND(A1)" instead of the messy function listed
above?
--
View this message in context:
http://nabble.documentfoundation.org/Missing-function-Bankers-Rounding-tp2530641p2669358.html
Sent from the Users mailing list archive at Nabble.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
- Re: [libreoffice-users] Re: Missing function: Bankers Rounding (continued)
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.