Need Help with Excel Function

New Contributor

I am trying to make the following code not average blank spaces. Please help 


4 Replies


What do you mean by "blank spaces"?

Either empty cells or cells with a space in them?

In any case AVERAGEIF() ignores empty cells and text.


Empty Cells.
Unless I have a number in at least one cell, It continues to give me the #DIV/0! error
best response confirmed by Johntyler1 (New Contributor)


That's how every average function works. You need at least one number value to calculate an average.

You can wrap IFERROR( ) around your formula to show a message or a 0.

=IFERROR(your_formula;"no values")