# DVD/0

K

Khalil Handal

Is there a VBA code to check all the sheets in a workbook so as to give an
empty cell (nothing seen in the cell) instead of the error values like
#DVD/0 (division over zero).

Khalil
 
K

Khalil Handal

My formula is:
=IF(COUNT(AVERAGE(Marks!T15:V15))="","",AVERAGE(Marks!T15:V15))
The range T15:V15 has either numeric values or average from other cell in
the sheet.

Khalil
 
B

Bob Phillips

=IF(COUNT(AVERAGE(Marks!T15:V15))=0,"",AVERAGE(Marks!T15:V15))

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
D

Dave Peterson

Or just count the numbers in the original range:

=IF(COUNT(Marks!T15:V15)=0,"",AVERAGE(Marks!T15:V15))
 
Top