Search code examples
google-sheetsdivide-by-zero

How do I avoid the "#DIV/0!" error in Google docs spreadsheet?


I have a column with average(K23:M23) that starts out with #DIV/0! when the K23 through M23 cells are empty. Preferably I'd like to only do the average of cells that contain non-zero, non-blank values. I think it's possible using the query command:

https://docs.google.com/support/bin/answer.py?hl=en&answer=159999

But their example doesn't help me.


Solution

  • Wrap your formula with IFERROR.

    =IFERROR(yourformula)