We will be migrating from Ask to Discourse on the first week of August, read the details here

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? [closed]

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

jerrysg7 gravatar image

updated 2021-06-15 16:26:35 +0200

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 reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Alex Kemp
close date 2020-09-28 14:03:18.486659

2 Answers

Sort by » oldest newest most voted

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

karolus gravatar image

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


=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 +0200 )edit

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

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

Question Tools

1 follower


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

Seen: 2,204 times

Last updated: Mar 24 '17