Ask LibreOffice - RSS feedhttps://ask.libreoffice.org/en/questions/Questions and answers for LibreOfficeenMon, 07 Jul 2014 00:33:47 +0200Can I round down in Calc?https://ask.libreoffice.org/en/question/36561/can-i-round-down-in-calc/Just like the ROUNDUP feature, it'd be nice to have a ROUNDDOWN or ROUNDDN feature to always round down no matter what. Using this function would always output the base integer whether you have 52.00001 or 52.9, you'd get 52 for both.
Ex: 6/4 = 1.5, but =ROUNDDN(6/4) would output 1.
Here's a direct example of what I'm trying to do. I want to round down so I don't go over and instead the amount one below is automatically chosen. I do this for Fletching logs into arrow shafts in Runescape to make gp. :)
Money to Spend:
[I3] Pouch: 1,218,070 gp
[I4] Price of Logs: 336 gp
[I5] GP to use: 218,070 gp
[I6] Amount of Logs: 649.0178571429 {=I5/I4}
[I7] Pouch After: 1,000,000 gp {=I3-(I6*I4)}
I'd like the value on I6 to be 649 instead of all those other decimals to make it easier (remove all errors) with all the other calculations further down the chart. So in this case I would put "=ROUNDDN(I5/I4) in I5 rather than what's there.
Thank you for your time.Sun, 06 Jul 2014 23:39:28 +0200https://ask.libreoffice.org/en/question/36561/can-i-round-down-in-calc/Answer by bencomp for <p>Just like the ROUNDUP feature, it'd be nice to have a ROUNDDOWN or ROUNDDN feature to always round down no matter what. Using this function would always output the base integer whether you have 52.00001 or 52.9, you'd get 52 for both.</p>
<p>Ex: 6/4 = 1.5, but =ROUNDDN(6/4) would output 1.</p>
<p>Here's a direct example of what I'm trying to do. I want to round down so I don't go over and instead the amount one below is automatically chosen. I do this for Fletching logs into arrow shafts in Runescape to make gp. :)</p>
<pre><code>Money to Spend:
[I3] Pouch: 1,218,070 gp
[I4] Price of Logs: 336 gp
[I5] GP to use: 218,070 gp
[I6] Amount of Logs: 649.0178571429 {=I5/I4}
[I7] Pouch After: 1,000,000 gp {=I3-(I6*I4)}
</code></pre>
<p>I'd like the value on I6 to be 649 instead of all those other decimals to make it easier (remove all errors) with all the other calculations further down the chart. So in this case I would put "=ROUNDDN(I5/I4) in I5 rather than what's there.</p>
<p>Thank you for your time.</p>
https://ask.libreoffice.org/en/question/36561/can-i-round-down-in-calc/?answer=36563#post-id-36563There already is a function `ROUNDDOWN( number; count)` that takes the number to round and the number of decimals to keep after the decimal separator.
In your example, you would want the *count* to be 0.Mon, 07 Jul 2014 00:26:35 +0200https://ask.libreoffice.org/en/question/36561/can-i-round-down-in-calc/?answer=36563#post-id-36563Comment by AnonGuyy for <p>There already is a function <code>ROUNDDOWN( number; count)</code> that takes the number to round and the number of decimals to keep after the decimal separator.</p>
<p>In your example, you would want the <em>count</em> to be 0.</p>
https://ask.libreoffice.org/en/question/36561/can-i-round-down-in-calc/?comment=36565#post-id-36565Wow, I'm an idiot. .-. I swear I've tried this before many times and it just gave me errors.
Anywho, thank you very much!Mon, 07 Jul 2014 00:29:27 +0200https://ask.libreoffice.org/en/question/36561/can-i-round-down-in-calc/?comment=36565#post-id-36565Comment by bencomp for <p>There already is a function <code>ROUNDDOWN( number; count)</code> that takes the number to round and the number of decimals to keep after the decimal separator.</p>
<p>In your example, you would want the <em>count</em> to be 0.</p>
https://ask.libreoffice.org/en/question/36561/can-i-round-down-in-calc/?comment=36566#post-id-36566You're welcome, but please do not add "//SOLVED" to the question; instead mark the answer as correct to indicate your question was answered (and let us both receive karma :)).Mon, 07 Jul 2014 00:33:47 +0200https://ask.libreoffice.org/en/question/36561/can-i-round-down-in-calc/?comment=36566#post-id-36566