#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 16
Default #DIV/0! error

I have the following formula entered to compute the average of a range of
cells and discount zeros. Until I change one of the zeros to a number, I get
#DIV/0!, How do I get rid of this

My formula is: =AVERAGE(Q8:Q18,"<0",Q8:Q18)
--
dbconn
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,651
Default #DIV/0! error

That formula will not give you either your required value or a #DIV/0!
error. It will return #VALUE! because one of the 23 values which you have
asked it to average is the text string "<0". The other 22 numbers which
you are asking it to average are two instances each of the elements in the
array Q8:Q18.

Perhaps you have fallen into the trap of typing into the newsgroup the
formula that you thought you were using, rather than copying the actual
formula from the formula bar and pasting it here.

The formula which you may have intended might have been the *array* formula
=AVERAGE(IF(Q8:Q18<0,Q8:Q18,"")) [entered with Control Shift Enter]. That
formula will indeed return #DIV/0! if there are no non=zero numbers in the
array Q8:Q18, so you may want something like
=IF(COUNT(Q8:Q18)-COUNTIF(Q8:Q18,0)=0,"",AVERAGE(IF(Q8:Q18<0,Q8:Q18 ,"")))
[again as an array formula].
--
David Biddulph

"dbconn" wrote in message
...
I have the following formula entered to compute the average of a range of
cells and discount zeros. Until I change one of the zeros to a number, I
get
#DIV/0!, How do I get rid of this

My formula is: =AVERAGE(Q8:Q18,"<0",Q8:Q18)
--
dbconn



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
Excel 2007 - error saving file & error loading dll TinaF Excel Discussion (Misc queries) 0 July 1st 09 01:49 PM
Error of slope taking into account error of the data points cer144 Excel Worksheet Functions 5 July 7th 08 07:26 PM
Error: "Excel encountered an error and had to remove some formatti Carl Excel Discussion (Misc queries) 0 September 18th 06 06:39 PM
Counting instances of found text (Excel error? Or user error?) S Davis Excel Worksheet Functions 5 September 12th 06 04:52 PM


All times are GMT +1. The time now is 11:57 PM.

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"