# #DIV/0! Error Formula Help

#### lhk201

##### New Member
Hello everyone,

I am using the following formula for a number of cells

=AVERAGE(a2:a99)

Some results come back #DIV/0! but because I am using the figures for a chart I would like the result to show blank if this is the case.

Is there an IF formula that can help me with this maybe?

### Excel Facts

Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)

#### Michael M

##### Well-known Member
try
Code:
``=IF(ISERROR(AVERAGE(A2:A99)),"",AVERAGE(A2:A99))``

##### MrExcel MVP
Hello everyone,

I am using the following formula for a number of cells

=AVERAGE(a2:a99)

Some results come back #DIV/0! but because I am using the figures for a chart I would like the result to show blank if this is the case.

Is there an IF formula that can help me with this maybe?

On Excel 2007 or later...

=IFERROR(AVERAGE(A2:A99),"")

Otherwise, something like:

=IF(COUNT(A2:A9),AVERAGE(A2:A99),"")

#### lhk201

##### New Member
Thanks everyone for their speedy response, I used Micheal's formula and it work just fine! Replies
1
Views
40
Replies
2
Views
63
Replies
15
Views
221
Replies
3
Views
86
Replies
9
Views
88