Explanation

About the #DIV/0!

error

The #DIV/0!

error appears when a formula attempts to divide by zero, or a value equivalent to zero.

#DIV/0! error example - blank cell

Like other errors, the #DIV/0!

is useful, because it tells you there is something missing or unexpected in a spreadsheet.

You may see #DIV/0!

#DIV/0! error example - blank cell

errors when data is being entered, but is not yet complete.

For example, a cell in the worksheet is blank because data is not yet available.

Although a #DIV/0!

#DIV/0! error example - blank cell

For example, if any cell in A1:A5 contains a #DIV/0!

error, the SUM formula below will display #DIV/0!

:

The best way to prevent #DIV/0!

#DIV/0! error example - blank cell

errors is to double-check data is complete.

If you see an unexpected #DIV/0!

#DIV/0!

#DIV/0! error example - blank cell

error and blank cells

Blank cells are a common cause of #DIV/0!

#DIV/0!

with average functions

Excel has three functions for calculating averages:AVERAGE,AVERAGEIF, andAVERAGEIFS.

#DIV/0! error example with AVERAGE function

All three functions can return a #DIV/0!

error when the count of “matching” values is zero.

This is because the general formula for calculating averages is =sum/count, and count can sometimes be zero.

#DIV/0! error example with AVERAGEIFS function

because the count of matching records is zero.

Because there is no color “blue” in the data (i.e.

the count of “blue” records is zero), AVERAGEIFS returns #DIV/0!.

Excel formula: How to fix the #N/A error

This can be confusing when you are “certain” there are matching records.

Trapping the #DIV/0!

error with IF

A simple way to trap the #DIV/0!

Excel formula: How to fix the #DIV/0! error

is to check required values with theIF function.

In the example shown, the #DIV/0!

Trapping the #DIV/0!

Excel formula: How to fix the #REF! error

error with IFERROR

Another option for trapping the #DIV/0!

error is theIFERROR function.

IFERROR will catch any error and return an alternative result.

Excel formula: How to fix the #NAME? error

To trap the #DIV/0!

error, just wrap the message in quotes.

while C6 remains blank.

Excel formula: How to fix the #VALUE! error

error

How to fix the #REF!

error

How to fix the #NAME?

error

How to fix the #VALUE!

Excel formula: How to fix the #NUM! error

error

How to fix the #NUM!

error

How to fix the #NULL!

error

How to fix the #CALC!

Excel formula: How to fix the #NULL! error

IFERROR is an elegant way to trap and manage errors without using more complicated nested IF statements.

you’re free to use ERROR.pop in to test for specific kinds of errors.

If no error exists, ERROR.throw in returns #N/A.

Excel formula: How to fix the #### (hashtag) error

See below for a key to the error codes returned by ERROR.punch in.

Excel formula error codes

How to trace a formula error

Excel formula: How to fix the #SPILL! error

Excel formula: How to fix the #CALC! error

Excel IFERROR function

Excel ISERROR function

Excel ERROR.TYPE function

Article image

Article image