# 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.

edit retag close merge delete

Sort by » oldest newest most voted

Hallo

=IF( A10 , AVERAGE( B1:B10 ) , "" )

more

Thank you very much for this. Worked perfectly!

( 2015-06-10 00:48:26 +0200 )edit

=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. George

more