Ask Your Question

I get a wrong result in a simple division in calc

asked 2018-01-02 17:19:17 +0200

Tomas gravatar image

Hello, this is really confusing for me.

I'm trying to get the percentage in one column, and I get wrong results. Col A gets the values from a different tab from the same spreadsheet, but that should not matter. The formula I'm using in Col B is: A1/25*100 (A2, A3, ...)

12 47
12 46
12 47

But the correct answer should be 48.

What could be the reason?

edit retag flag offensive close merge delete



11,5/25*100 = 46. So, if you use a number format in your A cells, that doesn't show decimals, but rounds to integers, then you can see the results.

Mike Kaganski gravatar imageMike Kaganski ( 2018-01-02 17:29:02 +0200 )edit

Thank you Mike! That was indeed the case. Now i know why.

It there a was to fix that? I need to use integers. and I need to be sure that the numbers I see are the ones used for the calculations.

Is there a way to achieve this?

Tomas gravatar imageTomas ( 2018-01-02 17:43:31 +0200 )edit

Use correct formulas to get correct answers. Like, use "=ROUND(Sheet2.N1)" in your A cells, and get the integer data there from the start.

There's a way to use calculations "with precision as shown" (or something like that) in preferences - but I'd strongly advise against that, because that is the way to have more problems later (unless you understand very well the consequences).

Mike Kaganski gravatar imageMike Kaganski ( 2018-01-02 17:51:28 +0200 )edit

Thank you again Mike! I found that out after reading your first comment, doing some search and trying it out. Your second comment didn't appear until I had posted the answer.

Thank you so much!

P.S. The option you describe can be found under: Options - Libreoffice Calc - Calculate - Precision as shown, but using it would mean that other people opening and editing the file would get different results, so I understand why you discouraged me from using it. Thank you!

Tomas gravatar imageTomas ( 2018-01-02 18:07:33 +0200 )edit

1 Answer

Sort by » oldest newest most voted

answered 2018-01-02 18:04:26 +0200

Tomas gravatar image

I found the answer to my problem. Big thanks to MIke Kaganski to point me in the right direction!

To achieve the correct results, I have to use the ROUND function to be use the integer is used for further operations.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2018-01-02 17:19:17 +0200

Seen: 985 times

Last updated: Jan 02 '18