Ask LibreOffice - RSS feedhttps://ask.libreoffice.org/en/questions/Questions and answers for LibreOfficeenTue, 02 Jan 2018 18:07:33 +0100I get a wrong result in a simple division in calchttps://ask.libreoffice.org/en/question/142084/i-get-a-wrong-result-in-a-simple-division-in-calc/ 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, ...)
A B
12 47
12 46
12 47
But the correct answer should be 48.
What could be the reason?Tue, 02 Jan 2018 17:19:17 +0100https://ask.libreoffice.org/en/question/142084/i-get-a-wrong-result-in-a-simple-division-in-calc/Comment by Tomas for <p>Hello, this is really confusing for me.</p>
<p>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, ...)</p>
<p>A B <br>
12 47 <br>
12 46 <br>
12 47 </p>
<p>But the correct answer should be 48.</p>
<p>What could be the reason?</p>
https://ask.libreoffice.org/en/question/142084/i-get-a-wrong-result-in-a-simple-division-in-calc/?comment=142088#post-id-142088Thank 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?Tue, 02 Jan 2018 17:43:31 +0100https://ask.libreoffice.org/en/question/142084/i-get-a-wrong-result-in-a-simple-division-in-calc/?comment=142088#post-id-142088Comment by Mike Kaganski for <p>Hello, this is really confusing for me.</p>
<p>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, ...)</p>
<p>A B <br>
12 47 <br>
12 46 <br>
12 47 </p>
<p>But the correct answer should be 48.</p>
<p>What could be the reason?</p>
https://ask.libreoffice.org/en/question/142084/i-get-a-wrong-result-in-a-simple-division-in-calc/?comment=142085#post-id-14208511,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.Tue, 02 Jan 2018 17:29:02 +0100https://ask.libreoffice.org/en/question/142084/i-get-a-wrong-result-in-a-simple-division-in-calc/?comment=142085#post-id-142085Comment by Tomas for <p>Hello, this is really confusing for me.</p>
<p>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, ...)</p>
<p>A B <br>
12 47 <br>
12 46 <br>
12 47 </p>
<p>But the correct answer should be 48.</p>
<p>What could be the reason?</p>
https://ask.libreoffice.org/en/question/142084/i-get-a-wrong-result-in-a-simple-division-in-calc/?comment=142094#post-id-142094Thank 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!Tue, 02 Jan 2018 18:07:33 +0100https://ask.libreoffice.org/en/question/142084/i-get-a-wrong-result-in-a-simple-division-in-calc/?comment=142094#post-id-142094Comment by Mike Kaganski for <p>Hello, this is really confusing for me.</p>
<p>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, ...)</p>
<p>A B <br>
12 47 <br>
12 46 <br>
12 47 </p>
<p>But the correct answer should be 48.</p>
<p>What could be the reason?</p>
https://ask.libreoffice.org/en/question/142084/i-get-a-wrong-result-in-a-simple-division-in-calc/?comment=142090#post-id-142090Use 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).Tue, 02 Jan 2018 17:51:28 +0100https://ask.libreoffice.org/en/question/142084/i-get-a-wrong-result-in-a-simple-division-in-calc/?comment=142090#post-id-142090Answer by Tomas for <p>Hello, this is really confusing for me.</p>
<p>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, ...)</p>
<p>A B <br>
12 47 <br>
12 46 <br>
12 47 </p>
<p>But the correct answer should be 48.</p>
<p>What could be the reason?</p>
https://ask.libreoffice.org/en/question/142084/i-get-a-wrong-result-in-a-simple-division-in-calc/?answer=142093#post-id-142093I 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.Tue, 02 Jan 2018 18:04:26 +0100https://ask.libreoffice.org/en/question/142084/i-get-a-wrong-result-in-a-simple-division-in-calc/?answer=142093#post-id-142093