Search code examples
google-sheetsarray-formulasdivide-by-zero

Google Sheets: Avoid #DIV/0! In ArrayFormula()


I'm looking for the way to avoid the #DIV/0! error in an ArrayFormula. Originally the cell formula was:

=arrayformula(F2:F3406/G2:G3406)

I've since tried:

=arrayformula(iferror(F2:F3406/G2:G3406,''))
=iferror(arrayformula(F2:F3406/G2:G3406),'')

However, these both give #ERROR!, with the comment 'Formula parse error'.

How should this be done?


Solution

  • use:

    =ARRAYFORMULA(IFERROR(1/(1/(F2:F3406/G2:G3406))))
    

    or:

    =ARRAYFORMULA(IFERROR(1/(1/(F2:F3406/G2:G3406)), 0))