If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
#Div/0 error, can't get rid of it
Hi Everyone
I use this array formula and it works well, =IF(COUNT(J5:J36)1,"",AVERAGE(IF(J5:J360,J5:J36, ""))) But if I only have 0 in that column, I get #Div/0, I tried this version =IF(ISERROR(COUNT($K$5:$K$36)=0),"",AVERAGE(IF($K$ 5:$K$360,$K$5:$K$36,""))) but to no avail. Anyone can help me with this. Thanking you in advance John |
#2
|
|||
|
|||
#Div/0 error, can't get rid of it
"John" wrote:
Subject: #Div/0 error, can't get rid of it "John" wrote in message ... Hi Everyone I use this array formula and it works well, =IF(COUNT(J5:J36)1,"",AVERAGE(IF(J5:J360,J5:J36, ""))) But if I only have 0 in that column, I get #Div/0, I tried this version =IF(ISERROR(COUNT($K$5:$K$36)=0),"",AVERAGE(IF($K$ 5:$K$360,$K$5:$K$36,""))) but to no avail. Anyone can help me with this. Thanking you in advance John |
#3
|
|||
|
|||
#Div/0 error, can't get rid of it
The error is occurring with the average, where you have a division. Move
the ISERROR to the average. HTH Otto "John" wrote in message ... Hi Everyone I use this array formula and it works well, =IF(COUNT(J5:J36)1,"",AVERAGE(IF(J5:J360,J5:J36, ""))) But if I only have 0 in that column, I get #Div/0, I tried this version =IF(ISERROR(COUNT($K$5:$K$36)=0),"",AVERAGE(IF($K$ 5:$K$360,$K$5:$K$36,""))) but to no avail. Anyone can help me with this. Thanking you in advance John |
#4
|
|||
|
|||
#Div/0 error, can't get rid of it
"John" wrote:
Subject: #Div/0 error, can't get rid of it =IF(COUNT(J5:J36)1,"",AVERAGE(IF(J5:J360,J5:J36, ""))) Try: =If(COUNTIF(J5:J36,"0")=0, "", AVERAGE(IF(J5:J360,J5:J36,""))) ----- original message ----- "John" wrote in message ... Hi Everyone I use this array formula and it works well, =IF(COUNT(J5:J36)1,"",AVERAGE(IF(J5:J360,J5:J36, ""))) But if I only have 0 in that column, I get #Div/0, I tried this version =IF(ISERROR(COUNT($K$5:$K$36)=0),"",AVERAGE(IF($K$ 5:$K$360,$K$5:$K$36,""))) but to no avail. Anyone can help me with this. Thanking you in advance John |
#5
|
|||
|
|||
#Div/0 error, can't get rid of it
Assuming you really mean to average only non-zero numbers, I would use the
array-entered formula... =IF(ISERROR(AVERAGE(IF(J5:J360,J5:J36,""))),"",AV ERAGE(IF(J5:J360,J5:J36,""))) where you simply test your functional expression for an error and react to it. -- Rick (MVP - Excel) "John" wrote in message ... Hi Everyone I use this array formula and it works well, =IF(COUNT(J5:J36)1,"",AVERAGE(IF(J5:J360,J5:J36, ""))) But if I only have 0 in that column, I get #Div/0, I tried this version =IF(ISERROR(COUNT($K$5:$K$36)=0),"",AVERAGE(IF($K$ 5:$K$360,$K$5:$K$36,""))) but to no avail. Anyone can help me with this. Thanking you in advance John |
#6
|
|||
|
|||
#Div/0 error, can't get rid of it
ERRATA....
I wrote: =If(COUNTIF(J5:J36,"0")=0, "", AVERAGE(IF(J5:J360,J5:J36,""))) Should be: If(COUNTIF(J5:J36,"0")=0, "", AVERAGE(IF(J5:J360,J5:J36,""))) ----- original message ----- "Joe User" joeu2004 wrote in message ... "John" wrote: Subject: #Div/0 error, can't get rid of it =IF(COUNT(J5:J36)1,"",AVERAGE(IF(J5:J360,J5:J36, ""))) Try: =If(COUNTIF(J5:J36,"0")=0, "", AVERAGE(IF(J5:J360,J5:J36,""))) ----- original message ----- "John" wrote in message ... Hi Everyone I use this array formula and it works well, =IF(COUNT(J5:J36)1,"",AVERAGE(IF(J5:J360,J5:J36, ""))) But if I only have 0 in that column, I get #Div/0, I tried this version =IF(ISERROR(COUNT($K$5:$K$36)=0),"",AVERAGE(IF($K$ 5:$K$360,$K$5:$K$36,""))) but to no avail. Anyone can help me with this. Thanking you in advance John |
#7
|
|||
|
|||
#Div/0 error, can't get rid of it
Thank you Rick
Works like a charm. Best wishes for the Holiday Regards John "Rick Rothstein" wrote in message ... Assuming you really mean to average only non-zero numbers, I would use the array-entered formula... =IF(ISERROR(AVERAGE(IF(J5:J360,J5:J36,""))),"",AV ERAGE(IF(J5:J360,J5:J36,""))) where you simply test your functional expression for an error and react to it. -- Rick (MVP - Excel) "John" wrote in message ... Hi Everyone I use this array formula and it works well, =IF(COUNT(J5:J36)1,"",AVERAGE(IF(J5:J360,J5:J36, ""))) But if I only have 0 in that column, I get #Div/0, I tried this version =IF(ISERROR(COUNT($K$5:$K$36)=0),"",AVERAGE(IF($K$ 5:$K$360,$K$5:$K$36,""))) but to no avail. Anyone can help me with this. Thanking you in advance John |
#8
|
|||
|
|||
#Div/0 error, can't get rid of it
Thank you Otto
Best Wishes for the Holiday Regards John "Otto Moehrbach" wrote in message ... The error is occurring with the average, where you have a division. Move the ISERROR to the average. HTH Otto "John" wrote in message ... Hi Everyone I use this array formula and it works well, =IF(COUNT(J5:J36)1,"",AVERAGE(IF(J5:J360,J5:J36, ""))) But if I only have 0 in that column, I get #Div/0, I tried this version =IF(ISERROR(COUNT($K$5:$K$36)=0),"",AVERAGE(IF($K$ 5:$K$360,$K$5:$K$36,""))) but to no avail. Anyone can help me with this. Thanking you in advance John |
#9
|
|||
|
|||
#Div/0 error, can't get rid of it
Hi Joe
This one works well, thank you Best wishes for the Holiday Regards John "Joe User" joeu2004 wrote in message ... ERRATA.... I wrote: =If(COUNTIF(J5:J36,"0")=0, "", AVERAGE(IF(J5:J360,J5:J36,""))) Should be: If(COUNTIF(J5:J36,"0")=0, "", AVERAGE(IF(J5:J360,J5:J36,""))) ----- original message ----- "Joe User" joeu2004 wrote in message ... "John" wrote: Subject: #Div/0 error, can't get rid of it =IF(COUNT(J5:J36)1,"",AVERAGE(IF(J5:J360,J5:J36, ""))) Try: =If(COUNTIF(J5:J36,"0")=0, "", AVERAGE(IF(J5:J360,J5:J36,""))) ----- original message ----- "John" wrote in message ... Hi Everyone I use this array formula and it works well, =IF(COUNT(J5:J36)1,"",AVERAGE(IF(J5:J360,J5:J36, ""))) But if I only have 0 in that column, I get #Div/0, I tried this version =IF(ISERROR(COUNT($K$5:$K$36)=0),"",AVERAGE(IF($K$ 5:$K$360,$K$5:$K$36,""))) but to no avail. Anyone can help me with this. Thanking you in advance John |
Thread Tools | |
Display Modes | |
|
|