Ask LibreOffice - RSS feedhttps://ask.libreoffice.org/en/questions/Questions and answers for LibreOfficeenTue, 02 Apr 2013 15:40:54 +0200Calculations in calc with "empty"cells.https://ask.libreoffice.org/en/question/15588/calculations-in-calc-with-emptycells/I'm using an IF formula, to summ a range of numbers by a given variables, the formula shortened would be "=IF(SUMIF()=0;"";SUMIF())" it's supposed to check if the summ is grater than or equal to 0, if the summ is equal to 0, then the cell should be empty, if the summ is greater than 0 then it should summ the numbers. And after that, there is a formula (cell A + cell B - cell C) containing cells with this IF formula, but there is a problem with the "empty" cells, A+B-C formula result is #VALUE!
For now, the only solution I found would be changing the "THEN" variable of the IF formula to 0, but it would result in zeros instead of empty cells :( Is there a way to have "empty" cells and still have the A+B-C formula to work?Tue, 02 Apr 2013 15:11:53 +0200https://ask.libreoffice.org/en/question/15588/calculations-in-calc-with-emptycells/Answer by JohnSUN for <p>I'm using an IF formula, to summ a range of numbers by a given variables, the formula shortened would be "=IF(SUMIF()=0;"";SUMIF())" it's supposed to check if the summ is grater than or equal to 0, if the summ is equal to 0, then the cell should be empty, if the summ is greater than 0 then it should summ the numbers. And after that, there is a formula (cell A + cell B - cell C) containing cells with this IF formula, but there is a problem with the "empty" cells, A+B-C formula result is #VALUE!</p>
<p>For now, the only solution I found would be changing the "THEN" variable of the IF formula to 0, but it would result in zeros instead of empty cells :( Is there a way to have "empty" cells and still have the A+B-C formula to work?</p>
https://ask.libreoffice.org/en/question/15588/calculations-in-calc-with-emptycells/?answer=15590#post-id-15590Try to use function [N()](https://help.libreoffice.org/scalc/SC_HID_FUNC_N?Language=en-US&System=WIN&Version=4.0#bm_id3153786):
N(cell A)+N(cell B)-N(cell C)Tue, 02 Apr 2013 15:34:41 +0200https://ask.libreoffice.org/en/question/15588/calculations-in-calc-with-emptycells/?answer=15590#post-id-15590Comment by Aigars for <p>Try to use function <a href="https://help.libreoffice.org/scalc/SC_HID_FUNC_N?Language=en-US&System=WIN&Version=4.0#bm_id3153786">N()</a>:</p>
<pre><code>N(cell A)+N(cell B)-N(cell C)
</code></pre>
https://ask.libreoffice.org/en/question/15588/calculations-in-calc-with-emptycells/?comment=15591#post-id-15591Thanks, it works :)Tue, 02 Apr 2013 15:40:54 +0200https://ask.libreoffice.org/en/question/15588/calculations-in-calc-with-emptycells/?comment=15591#post-id-15591