Re: [libreoffice-users] ROUND function consistency

2022-06-05 Thread Steve Edmonds
I just performed a bit of a test. Cells across. A1| =RANDBETWEEN(0,10)/100  # simulate dollar and cent amounts between 0.00 and $1000.00 B1| =A1*0.15                    # simulate a tax of 15% on the amounts in A C1| =ROUND(B1,2)                # round the tax amount to 2 places (whole

Re: [libreoffice-users] ROUND function consistency

2022-06-05 Thread Andrew Pitonyak
Sorry, this is NOT a bug. This is exactly the result I expect if I was using VBA in MSO. Read on to find out why.  I say this without looking at the code, but, you specifically told LO to use the VBA version of rounding, which is NOT normal rounding. VBA rounding uses bankers rounding. 

Re: [libreoffice-users] ROUND function consistency

2022-06-05 Thread Virgil Arrington Jr.
On 6/5/2022 6:54 AM, Michael H wrote: Are you sure it isn't somewhere else? I.e. the input to the actual round step from the vb and the LO function? LO automatically shortens numbers and rounds them as it does so... so a that shows 12.15 may actually contain 12.1499 or 12.151 This

Re: [libreoffice-users] ROUND function consistency

2022-06-05 Thread Michael D. Setzer II
=https://docs.microsoft.com/en-us/office/vba/language/reference/user-interface-help/round-function Was the page I found that mentioned it, but other pages didn't mention the banking rounding? So not sure if excell would use regular rounding in excell, but uses the banking rounding if using

Re: [libreoffice-users] ROUND function consistency

2022-06-05 Thread Michael H
Are you sure it isn't somewhere else? I.e. the input to the actual round step from the vb and the LO function? LO automatically shortens numbers and rounds them as it does so... so a that shows 12.15 may actually contain 12.1499 or 12.151 On Sat, Jun 4, 2022 at 9:45 PM Steve Edmonds

Re: [libreoffice-users] ROUND function consistency

2022-06-05 Thread Johnny Rosenberg
Den sön 5 juni 2022 kl 11:55 skrev Michael D. Setzer II : > One windows excell page mentions that it uses the > banking rounding method, which I believe is the round to > nearest even. So, using that method 12.125 would round > to 12.12, while 12.135 would round to 12.14.. > Oh, yes. I didn't

Re: [libreoffice-users] ROUND function consistency

2022-06-05 Thread Michael D. Setzer II
One windows excell page mentions that it uses the banking rounding method, which I believe is the round to nearest even. So, using that method 12.125 would round to 12.12, while 12.135 would round to 12.14.. With this method if next digit is 1,2,3,4 the number rounds down. If it is 6,7,8,9 it

Re: [libreoffice-users] ROUND function consistency

2022-06-05 Thread Johnny Rosenberg
I just found that you can do this with the already existing Format() function. No need for making your own function and no need for using VBA compatibility: Print Format(12.125, "0.00") The second parameter is what you would have written in the ”Format code” field when formatting a cell in Calc.

Re: [libreoffice-users] ROUND function consistency

2022-06-05 Thread Johnny Rosenberg
Looks like a bug to me. 12.125 returns 12.12, but 12.1251 returns 12.13. Both should return the same. I guess this bug should be reported. Meanwhile, you can make your own function that you can use. Here are two different suggestions. 1: This one use the Calc built-in ROUND() cell function. Place