Ask Your Question

in calc how do i get the "else" in an IF statement to leave the cell blank when the initial condition is not met?

asked 2015-06-09 05:23:25 +0100

jerrysg7 gravatar image

updated 2015-10-26 22:00:21 +0100

Alex Kemp gravatar image

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 flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted

answered 2015-06-09 06:31:12 +0100

karolus gravatar image

updated 2015-06-09 06:34:34 +0100


=IF( A10 , AVERAGE( B1:B10 ) , "" )
edit flag offensive delete link more


Thank you very much for this. Worked perfectly!

jerrysg7 gravatar imagejerrysg7 ( 2015-06-10 00:48:26 +0100 )edit

answered 2017-03-24 19:52:12 +0100

GeorgeRamsower3 gravatar image

=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

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2015-06-09 05:23:25 +0100

Seen: 1,697 times

Last updated: Mar 24 '17