ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   #DIV/0! (https://www.excelbanter.com/excel-discussion-misc-queries/191251-div-0-a.html)

Richard

#DIV/0!
 
=SUM(A1,B1,C1)/COUNT(A1,B1,C1)How would you keep this error #DIV/0! from
showing up when nothing is in a cell. Thanks in advance!

Max

#DIV/0!
 
One of these would be options:
=IF(COUNT(A1:C1)=0,"",SUM(A1:C1)/COUNT(A1:C1))
=IF(COUNT(A1:C1)=0,"",AVERAGE(A1:C1))
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Richard" wrote:
=SUM(A1,B1,C1)/COUNT(A1,B1,C1)How would you keep this error #DIV/0! from
showing up when nothing is in a cell. Thanks in advance!


T. Valko

#DIV/0!
 
Try this:

=IF(COUNT(A1:C1),AVERAGE(A1:C1),"")

--
Biff
Microsoft Excel MVP


"Richard" wrote in message
...
=SUM(A1,B1,C1)/COUNT(A1,B1,C1)How would you keep this error #DIV/0! from
showing up when nothing is in a cell. Thanks in advance!




muddan madhu

#DIV/0!
 
try this

=IF(ISERROR(SUM(A1:C1)/COUNT(A1:C1)),"",SUM(A1:C1)/COUNT(A1:C1))


On Jun 14, 10:10*pm, Richard
wrote:
=SUM(A1,B1,C1)/COUNT(A1,B1,C1)How would you keep this error #DIV/0! from
showing up when nothing is in a cell. Thanks in advance!



Mike H

#DIV/0!
 
Hi,

Why are you making averages complicated, use this

=IF(ISERROR(AVERAGE(A1:C1)),"",AVERAGE(A1:C1))


Mike

"Richard" wrote:

=SUM(A1,B1,C1)/COUNT(A1,B1,C1)How would you keep this error #DIV/0! from
showing up when nothing is in a cell. Thanks in advance!


T. Valko

#DIV/0!
 
P.S.

If there might be 3 0s in the range you'll still get the error.

Or, if there might be a situation like this you'll still get the error:

A1 = 10
B1 = -10
C1 = 0

For a generic "catch-all" see Mike's suggestion.

--
Biff
Microsoft Excel MVP


"T. Valko" wrote in message
...
Try this:

=IF(COUNT(A1:C1),AVERAGE(A1:C1),"")

--
Biff
Microsoft Excel MVP


"Richard" wrote in message
...
=SUM(A1,B1,C1)/COUNT(A1,B1,C1)How would you keep this error #DIV/0! from
showing up when nothing is in a cell. Thanks in advance!






Dave Peterson

#DIV/0!
 
I don't think you really meant this warning.

"T. Valko" wrote:

P.S.

If there might be 3 0s in the range you'll still get the error.

Or, if there might be a situation like this you'll still get the error:

A1 = 10
B1 = -10
C1 = 0

For a generic "catch-all" see Mike's suggestion.

--
Biff
Microsoft Excel MVP

"T. Valko" wrote in message
...
Try this:

=IF(COUNT(A1:C1),AVERAGE(A1:C1),"")

--
Biff
Microsoft Excel MVP


"Richard" wrote in message
...
=SUM(A1,B1,C1)/COUNT(A1,B1,C1)How would you keep this error #DIV/0! from
showing up when nothing is in a cell. Thanks in advance!




--

Dave Peterson

Mike H

#DIV/0!
 

If there might be 3 0s in the range you'll still get the error.


or perhaps not:)

"T. Valko" wrote:

P.S.


Or, if there might be a situation like this you'll still get the error:

A1 = 10
B1 = -10
C1 = 0

For a generic "catch-all" see Mike's suggestion.

--
Biff
Microsoft Excel MVP


"T. Valko" wrote in message
...
Try this:

=IF(COUNT(A1:C1),AVERAGE(A1:C1),"")

--
Biff
Microsoft Excel MVP


"Richard" wrote in message
...
=SUM(A1,B1,C1)/COUNT(A1,B1,C1)How would you keep this error #DIV/0! from
showing up when nothing is in a cell. Thanks in advance!







T. Valko

#DIV/0!
 
I don't think you really meant this warning.

You are correct. I didn't mean that at all! <g

Time for a break.


--
Biff
Microsoft Excel MVP


"Dave Peterson" wrote in message
...
I don't think you really meant this warning.

"T. Valko" wrote:

P.S.

If there might be 3 0s in the range you'll still get the error.

Or, if there might be a situation like this you'll still get the error:

A1 = 10
B1 = -10
C1 = 0

For a generic "catch-all" see Mike's suggestion.

--
Biff
Microsoft Excel MVP

"T. Valko" wrote in message
...
Try this:

=IF(COUNT(A1:C1),AVERAGE(A1:C1),"")

--
Biff
Microsoft Excel MVP


"Richard" wrote in message
...
=SUM(A1,B1,C1)/COUNT(A1,B1,C1)How would you keep this error #DIV/0!
from
showing up when nothing is in a cell. Thanks in advance!



--

Dave Peterson





All times are GMT +1. The time now is 10:18 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com