Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Daesthai
 
Posts: n/a
Default Compound array question - what am I doing wrong?

I'm trying to use an array to average a row of numbers, ignore zeroes, and
display a "-" if there is a div/0 error.

Using the format =IF(ISERROR(old_formula),"",old_formula) listed in help to
hide the error message, I end up with:

=IF(ISERROR(AVERAGE(IF(b4:h4<0,b4:h4,False)))),"-",AVERAGE(IF(b4:h4<0,b4:h4,False))

But I get an error textbox saying it is an incorrectly written array. What
do I need to change to get the desired results?
  #2   Report Post  
Daesthai
 
Posts: n/a
Default

D'oh! Nevermind. I found the misplaced parenthesis.
  #3   Report Post  
Ron Rosenfeld
 
Posts: n/a
Default

On Wed, 12 Oct 2005 19:43:02 -0700, "Daesthai"
wrote:

I'm trying to use an array to average a row of numbers, ignore zeroes, and
display a "-" if there is a div/0 error.

Using the format =IF(ISERROR(old_formula),"",old_formula) listed in help to
hide the error message, I end up with:

=IF(ISERROR(AVERAGE(IF(b4:h4<0,b4:h4,False)))) ,"-",AVERAGE(IF(b4:h4<0,b4:h4,False))

But I get an error textbox saying it is an incorrectly written array. What
do I need to change to get the desired results?


Well, I think that the only time you should get a DIV/0 error is if there are
only 0's or blanks in the range to be averaged (rng). So perhaps

=IF(SUM(rng)=0,"-",AVERAGE(IF(rng<0,rng)))

(as an array formula)


--ron
  #4   Report Post  
Daesthai
 
Posts: n/a
Default

Thank you. that simplified things quite a bit.

"Ron Rosenfeld" wrote:

On Wed, 12 Oct 2005 19:43:02 -0700, "Daesthai"
wrote:

I'm trying to use an array to average a row of numbers, ignore zeroes, and
display a "-" if there is a div/0 error.

Using the format =IF(ISERROR(old_formula),"",old_formula) listed in help to
hide the error message, I end up with:

=IF(ISERROR(AVERAGE(IF(b4:h4<0,b4:h4,False)))) ,"-",AVERAGE(IF(b4:h4<0,b4:h4,False))

But I get an error textbox saying it is an incorrectly written array. What
do I need to change to get the desired results?


Well, I think that the only time you should get a DIV/0 error is if there are
only 0's or blanks in the range to be averaged (rng). So perhaps

=IF(SUM(rng)=0,"-",AVERAGE(IF(rng<0,rng)))

(as an array formula)


--ron

  #5   Report Post  
Ron Rosenfeld
 
Posts: n/a
Default

On Wed, 12 Oct 2005 21:06:04 -0700, "Daesthai"
wrote:

Thank you. that simplified things quite a bit.


You're welcome. Glad I could be of help.

--ron
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
Basic Array Question Annabelle Excel Discussion (Misc queries) 2 August 29th 05 10:50 PM
Array Question Renee Excel Worksheet Functions 0 June 29th 05 07:10 PM
Array Function Question sunfish62 Excel Worksheet Functions 3 June 23rd 05 12:52 AM
Three Dimensional Array Question Tornados Excel Discussion (Misc queries) 1 June 20th 05 12:58 AM
Array Function Question Henrik Excel Worksheet Functions 1 June 8th 05 02:24 AM


All times are GMT +1. The time now is 08:58 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"