ElyxAI

AVERAGE #DIV/0!: No Numbers in Range

AVERAGE returns #DIV/0! when it finds no numbers to divide by. Blanks and text do not count, a zero does, and a number stored as text is still text.

#DIV/0!
+AVERAGE

AVERAGE divides the sum of the numbers it finds by how many numbers it finds. #DIV/0! is that division when the count is zero. Inside a range, the function skips blank cells, text, and the values TRUE and FALSE. It keeps zeros. A column of zeros averages to 0. A column of blanks, or of words such as n/a, has nothing to divide by, so Excel returns #DIV/0!. A cell can look like 100 and still be text, after an import or a leading apostrophe. AVERAGE skips it. If every cell in the range is text, the result is #DIV/0! even though the column looks full. Those cells usually carry the green triangle for Number Stored as Text. Convert to Number turns them into values AVERAGE can use. VALUE does the same for one cell. A filter does not create this error. AVERAGE still reads rows hidden by AutoFilter. An error already sitting in the range, such as #N/A or another #DIV/0!, is returned as that error. AVERAGEIF and AVERAGEIFS return #DIV/0! for a different reason: no cell met the criteria. To show a blank when the range simply has no numbers, test the count first: =IF(COUNT(A2:A100)=0,"",AVERAGE(A2:A100)). COUNT ignores text and blanks, the same cells AVERAGE ignores. =IFERROR(AVERAGE(A2:A100),"") also hides #DIV/0!, and it hides every other error in that formula too.

Why AVERAGE causes #DIV/0!

The range has no numbers

AVERAGE ignores blanks and text. When nothing numeric remains, the count is 0 and Excel returns #DIV/0!. Zeros are numbers and do not cause this error.

=AVERAGE(A2:A10) when A2:A10 is blank or contains only labels such as n/a

The numbers are stored as text

Imported values and cells with a leading apostrophe can look numeric and still be text. AVERAGE skips them. If the whole range is text, the result is #DIV/0!.

=AVERAGE(B2:B20) when B2:B20 shows 10, 20, 30 with the green Number Stored as Text triangle

An error is already in the range

AVERAGE returns an error it finds in the range. A #DIV/0! from a division inside the range is passed through. It is not the same case as an empty count. AGGREGATE can average while ignoring error values.

=AVERAGE(C2:C50) when some cells in C2:C50 already show #DIV/0!

Step-by-Step Solution

  1. 1Select the cell and read the range in the formula bar.
  2. 2Check that range for at least one real number. Formulas > Show Formulas (Ctrl+` on Windows) shows formulas instead of results if you need to see what those cells calculate.
  3. 3If the cells show the green triangle, open the warning and choose Convert to Number. VALUE converts one text number: =VALUE(B2).
  4. 4If some cells already show an error, fix those cells, or average while ignoring errors: =AGGREGATE(1,6,C2:C50). Function 1 is AVERAGE and option 6 ignores errors. If nothing numeric remains, AGGREGATE still returns an error.
  5. 5To leave the cell blank when there is nothing to average, use =IF(COUNT(A2:A100)=0,"",AVERAGE(A2:A100)).
  6. 6Recalculate with Formulas > Calculate Now (F9 on Windows) and confirm the cell shows a number or the blank you asked for.

Concrete Example

Weekly score column that is still empty

A workbook averages a score column for a team. At the start of the month the score cells are blank.

Before (error)

=AVERAGE(B2:B30)

After (fixed)

=IF(COUNT(B2:B30)=0,"",AVERAGE(B2:B30))

Problem: =AVERAGE(B2:B30) returns #DIV/0! because COUNT of that range is 0. The blanks are not zeros.

Solution: Keep the average, and show a blank until the first score is entered.

Prevention Tip

Test COUNT before AVERAGE when a range can be empty. Do not replace the error with 0 unless a zero average is what you want to report.

Free Tools to Fix Your Formulas

Use these free tools to avoid this error:

Frequently Asked Questions

Don’t want to do it by hand? Ask Elyx

Example request

“Fix the #DIV/0! error in my AVERAGE formula in column D”

Elyx does it directly in your Excel file.

7 days free · No credit card required

See also