Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 694
Default #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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 905
Default #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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,071
Default #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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 905
Default #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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,934
Default #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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 905
Default #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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 694
Default #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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 694
Default #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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 694
Default #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




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Visual Basic Error Run Time Error, Type Mismatch Meg Partridge Excel Discussion (Misc queries) 12 September 10th 08 06:10 PM
Error of slope taking into account error of the data points cer144 Excel Worksheet Functions 5 July 7th 08 07:26 PM
Counting instances of found text (Excel error? Or user error?) S Davis Excel Worksheet Functions 5 September 12th 06 04:52 PM
I have Error 1919 Error Configuring ODBC dataSource Database Texanna1 Excel Discussion (Misc queries) 1 September 12th 06 06:35 AM


All times are GMT +1. The time now is 05:19 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"