[libreoffice-users] Re: Visible currency rounding

2013-07-23 Thread toodr
I had the same problem. I needed to implement the so called Bankers' Rounding Function, which would round with respect to the 4/5 rule. And finally I ended doing it myself in a short Function in LO Basic. I tried my best, although math and programming are not my strong sides. So here it is,

[libreoffice-users] Re: Visible currency rounding

2013-07-21 Thread toodr
Thank you for the reference in your answer. That is indeed the case and I must admit that my logic is wrong. I will have to rethink all this stuff. You are certainly right to point out that the original number is closer to the result as you have suggested. My fault ! And apologies to the other

[libreoffice-users] Re: Visible currency rounding

2013-07-20 Thread Luuk
On 20-07-2013 01:26, toodr wrote: I had the same problem. I needed to implement the so called Bankers' Rounding Function, if i read correctly at: http://en.wikipedia.org/wiki/Rounding Round half to even[edit] A tie-breaking rule that is less biased is round half to even, namely: If the

Re: [libreoffice-users] Re: Visible currency rounding

2013-07-20 Thread Brian Barker
At 22:30 19/07/2013 -0400, Mark LaPierre wrote: On 07/19/2013 07:26 PM, Todor Takov wrote: I needed to implement the so called Bankers' Rounding Function, which would round with respect to the 4/5 rule. [...] Just one point I would like to make. If you are working with money be sure that

[libreoffice-users] Re: Visible currency rounding

2013-07-20 Thread toodr
You described it in the most precise way. I needed a function that would round down the number if the followin digit is less then 5, and would round up if the followin digit is greater then 5, and if the followin digit is equal to 5 then it will test if the last digit to remain in the number is

[libreoffice-users] Re: Visible currency rounding

2013-07-20 Thread toodr
I have given my reasons in an explanation to a post by Luuk in this present discussion. But I think this is not an overkill, because if we have a significantly long number and we just look at the 3 digits to the right of the comma separator and just drop the rest of the digits to the right of

Re: [libreoffice-users] Re: Visible currency rounding

2013-07-20 Thread Brian Barker
At 08:54 20/07/2013 -0700, Todor Takov wrote: I have given my reasons in an explanation to a post by Luuk in this present discussion. But I think this is not an overkill, because if we have a significantly long number and we just look at the 3 digits to the right of the comma separator and

Re: [libreoffice-users] Re: Visible currency rounding

2013-07-19 Thread Brian Barker
At 16:26 19/07/2013 -0700, Todor Takov wrote: I needed to implement the so called Bankers' Rounding Function, which would round with respect to the 4/5 rule. And finally I ended doing it myself in a short Function in LO Basic. I tried my best, although math and programming are not my strong

Re: [libreoffice-users] Re: Visible currency rounding

2013-07-19 Thread Tom Davies
Subject: [libreoffice-users] Re: Visible currency rounding I had the same problem. I needed to implement the so called Bankers' Rounding Function, which would round with respect to the 4/5 rule. And finally I ended doing it myself in a short Function in LO Basic. I tried my best, although math

Re: [libreoffice-users] Re: Visible currency rounding

2013-07-19 Thread Mark LaPierre
On 07/19/2013 07:26 PM, toodr wrote: I had the same problem. I needed to implement the so called Bankers' Rounding Function, which would round with respect to the 4/5 rule. And finally I ended doing it myself in a short Function in LO Basic. I tried my best, although math and programming are

Re: [libreoffice-users] Re: Visible currency rounding

2013-07-16 Thread Marino / WellnessWebshop.se
: Monday, 15 July 2013, 19:38 Subject: [libreoffice-users] Re: Visible currency rounding Tom Let me put it another way. Take the following sales: 50 items @ 1.37 VAT @20% = 68.50 VAT = 13.70 If the same items are sold separately, the VAT would be different. 1 item @ 1.37 VAT @ 20% = 0.274

Re: [libreoffice-users] Re: Visible currency rounding

2013-07-16 Thread Tom Davies
: [libreoffice-users] Re: Visible currency rounding Hi :) Ahhh, that makes sense.  HMRC are the Vat collectors for the Uk but the Swedish one is likely to have similar rules. Regards from Tom :) From: Tinkerer j_taylo...@btinternet.com To: users@global.libreoffice.org

Re: [libreoffice-users] Re: Visible currency rounding

2013-07-16 Thread Marino / WellnessWebshop.se
Subject: Re: [libreoffice-users] Re: Visible currency rounding Hi :) Is it the AVKORTA that chops off the end of the decimals? English is really a few different languages added together so to be posh we use truncate for this sort of thing. It means the same as chop off but Maths geniuses

[libreoffice-users] Re: Visible currency rounding

2013-07-16 Thread Luuk
On 14-07-2013 09:11, Marino / WellnessWebshop.se wrote: Hi! I want to have visible currency rounding on an invoice template that I have made i Libre Office. I have this formula in the cell for currency rounding:

[libreoffice-users] Re: Visible currency rounding

2013-07-16 Thread Tinkerer
Tom In my early days of using spreadsheets, to be absolutely certain we would Round the decimal by multiplying the result by 100, then INT and then divide by 100. Tink. -- View this message in context: http://nabble.documentfoundation.org/Visible-currency-rounding-tp4065342p4065731.html Sent

[libreoffice-users] Re: Visible currency rounding

2013-07-15 Thread Tinkerer
Tom Let me put it another way. Take the following sales: 50 items @ 1.37 VAT @20% = 68.50 VAT = 13.70 If the same items are sold separately, the VAT would be different. 1 item @ 1.37 VAT @ 20% = 0.274 for the VAT This would be rounded to 27p and 50 x 0.27 = 13.50 Rounding has caused a difference

[libreoffice-users] Re: Visible currency rounding

2013-07-15 Thread Tinkerer
Tom The post said he wanted to round everything including the tax on his invoice template. As I said earlier. He needs to go into Tools Options Calc Calculate and check the Precision as shown box. This will make all his calculations precise as displayed. ie if he sets to two decimal places then

Re: [libreoffice-users] Re: Visible currency rounding

2013-07-15 Thread Tom Davies
Subject: [libreoffice-users] Re: Visible currency rounding Tom Let me put it another way. Take the following sales: 50 items @ 1.37 VAT @20% = 68.50 VAT = 13.70 If the same items are sold separately, the VAT would be different. 1 item @ 1.37 VAT @ 20% = 0.274 for the VAT This would be rounded

[libreoffice-users] Re: Visible currency rounding

2013-07-14 Thread Tinkerer
I do not understand your formula, but you can set the result to a number of decimal places and I assume that is what you have done. Calc displays the number of places you set, but this is not the exact result, eg it may display two decimal places, but in fact is carrying forward three decimal

[libreoffice-users] Re: Visible currency rounding

2013-07-14 Thread Tinkerer
Marino Format Cells Numbers nil decimal places. To get a correct roundup go to Tools Options Calc Calculate, make sure that Precision as shown checked. Tink. -- View this message in context: http://nabble.documentfoundation.org/Visible-currency-rounding-tp4065342p4065363.html Sent from the