Solved how to use IF and Round function and return a blank answer

April 1, 2013 at 10:38:37
Specs: Windows 7
I want to get the average of 3 numbers.When only one number is given I want the cell for the average to remain blank. What must I do?

See More: how to use IF and Round function and return a blank answer

Report •


#1
April 1, 2013 at 11:46:10
✔ Best Answer
Assuming you're talking about Microsoft Excel:

=IF((IF(A1>0,10,0))+(IF(B1>0,10,0))+(IF(C1>0,10,0))=30, ((A1+B1+C1)/3), 0)

A1, B1 and C1 are the cells I want the average of. I am also assuming you're only averaging 3 cells.


Report •

#2
April 1, 2013 at 13:26:49
You could also do something like:

=IF(COUNTBLANK(A1:A3)>=2,"",AVERAGE(A1:A3))

Provided that the cell is actually BLANK, and NOT a Zero.

If you are using Zeros, then this

=IF(COUNTIF(A1:A3,0)>=2,"",AVERAGE(A1:A3))

MIKE

http://www.skeptic.com/


Report •

#3
April 1, 2013 at 16:01:41
Why does your subject line mention the ROUND function? Nothing in your question mentions ROUND.

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.


Report •
Related Solutions


Ask Question