Ask LibreOffice - RSS feedhttps://ask.libreoffice.org/en/questions/Questions and answers for LibreOfficeenFri, 24 Mar 2017 19:52:12 +0100in calc how do i get the "else" in an IF statement to leave the cell blank when the initial condition is not met?https://ask.libreoffice.org/en/question/51709/in-calc-how-do-i-get-the-else-in-an-if-statement-to-leave-the-cell-blank-when-the-initial-condition-is-not-met/ Doing a simple spreadsheet of my weight loss progress. Plotting the weight vs. date. Future values are blank so that even though the plot range goes into the future, the plot stops with today. Now trying to calculate a 10 day moving average with the following IF statement. IF(cell# >0, sum(10 cell range)/10, ???) What do I put in as ??? in order to have the cell remain empty if there is no value in "cell#"? Leaving the ELSE value blank results in the cell having a zero value. If the 10 day moving average is plotted then everything after today will have a wrong value and the plot will go to zero after 10 days. Don't want anything to appear in plot after today.Tue, 09 Jun 2015 05:23:25 +0200https://ask.libreoffice.org/en/question/51709/in-calc-how-do-i-get-the-else-in-an-if-statement-to-leave-the-cell-blank-when-the-initial-condition-is-not-met/Answer by karolus for <p>Doing a simple spreadsheet of my weight loss progress. Plotting the weight vs. date. Future values are blank so that even though the plot range goes into the future, the plot stops with today. Now trying to calculate a 10 day moving average with the following IF statement. IF(cell# >0, sum(10 cell range)/10, ???) What do I put in as ??? in order to have the cell remain empty if there is no value in "cell#"? Leaving the ELSE value blank results in the cell having a zero value. If the 10 day moving average is plotted then everything after today will have a wrong value and the plot will go to zero after 10 days. Don't want anything to appear in plot after today.</p>
https://ask.libreoffice.org/en/question/51709/in-calc-how-do-i-get-the-else-in-an-if-statement-to-leave-the-cell-blank-when-the-initial-condition-is-not-met/?answer=51710#post-id-51710Hallo
=IF( A10 , AVERAGE( B1:B10 ) , "" )
Tue, 09 Jun 2015 06:31:12 +0200https://ask.libreoffice.org/en/question/51709/in-calc-how-do-i-get-the-else-in-an-if-statement-to-leave-the-cell-blank-when-the-initial-condition-is-not-met/?answer=51710#post-id-51710Comment by jerrysg7 for <p>Hallo</p>
<pre><code>=IF( A10 , AVERAGE( B1:B10 ) , "" )
</code></pre>
https://ask.libreoffice.org/en/question/51709/in-calc-how-do-i-get-the-else-in-an-if-statement-to-leave-the-cell-blank-when-the-initial-condition-is-not-met/?comment=51736#post-id-51736Thank you very much for this. Worked perfectly!Wed, 10 Jun 2015 00:48:26 +0200https://ask.libreoffice.org/en/question/51709/in-calc-how-do-i-get-the-else-in-an-if-statement-to-leave-the-cell-blank-when-the-initial-condition-is-not-met/?comment=51736#post-id-51736Answer by GeorgeRamsower3 for <p>Doing a simple spreadsheet of my weight loss progress. Plotting the weight vs. date. Future values are blank so that even though the plot range goes into the future, the plot stops with today. Now trying to calculate a 10 day moving average with the following IF statement. IF(cell# >0, sum(10 cell range)/10, ???) What do I put in as ??? in order to have the cell remain empty if there is no value in "cell#"? Leaving the ELSE value blank results in the cell having a zero value. If the 10 day moving average is plotted then everything after today will have a wrong value and the plot will go to zero after 10 days. Don't want anything to appear in plot after today.</p>
https://ask.libreoffice.org/en/question/51709/in-calc-how-do-i-get-the-else-in-an-if-statement-to-leave-the-cell-blank-when-the-initial-condition-is-not-met/?answer=91111#post-id-91111=IF( D192<>"" , (D$225-D192) , "" )
That's how I had to do it on MY spreadsheet. I use it for keeping tabs on my clocks and I didn't want it making indications on the chart/graph.
I found YOUR reply and modified it to work on MY spreadsheet.
Thanks for the tip, I needed the help on this one.
GeorgeFri, 24 Mar 2017 19:52:12 +0100https://ask.libreoffice.org/en/question/51709/in-calc-how-do-i-get-the-else-in-an-if-statement-to-leave-the-cell-blank-when-the-initial-condition-is-not-met/?answer=91111#post-id-91111