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 [email protected] List archive: http://listarchives.libreoffice.org/www/users/ *** All posts to this list are publicly archived for eternity ***
