Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Average Without Zeroes

My spread sheet contains already some COUNTIF formula which are working
okay.

As soon as i try to change which cells are included in the formula so
they do not go in sequence i get the #VALUE! coming up

the one that works goes as follows

=SUM(AA200:AA205)/COUNTIF(AA200:AA205,"<0")

the one that doesnt is

=SUM(AA207:AA211,AA217)/COUNTIF((AA207:AA211,AA217),"<0")

Any suggestions?

Thanks

Tom

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default Average Without Zeroes

Tom:

the one that doesnt is

=SUM(AA207:AA211,AA217)/COUNTIF((AA207:AA211,AA217),"<0")


What are you trying to do? Use a condition in the sum? Than try:

=SUMIF(AA207:AA211,AA217,"<0")/COUNTIF((AA207:AA211,AA217),"<0")

I am not sure if I use correct syntax (I have spanish version). But I
believe your error is provoked in "sum(AA207:AA211,AA217)", which does not
seem to be posible.

Hope some else can help out too.

Martin

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Average Without Zeroes

=SUM(AA207:AA211,AA217)/SUM(COUNTIF(AA207:AA211,"<0"),COUNTIF(AA217,"<0" ))


--
Regards,
Tom Ogilvy


"tom" wrote:

My spread sheet contains already some COUNTIF formula which are working
okay.

As soon as i try to change which cells are included in the formula so
they do not go in sequence i get the #VALUE! coming up

the one that works goes as follows

=SUM(AA200:AA205)/COUNTIF(AA200:AA205,"<0")

the one that doesnt is

=SUM(AA207:AA211,AA217)/COUNTIF((AA207:AA211,AA217),"<0")

Any suggestions?

Thanks

Tom


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Average Without Zeroes

the suggested solution will not work.

Sumif and Countif will not work with discontiguous ranges as suggested.

--
Regards,
Tom Ogilvy



"Martin Los" wrote:

Tom:

the one that doesnt is

=SUM(AA207:AA211,AA217)/COUNTIF((AA207:AA211,AA217),"<0")


What are you trying to do? Use a condition in the sum? Than try:

=SUMIF(AA207:AA211,AA217,"<0")/COUNTIF((AA207:AA211,AA217),"<0")

I am not sure if I use correct syntax (I have spanish version). But I
believe your error is provoked in "sum(AA207:AA211,AA217)", which does not
seem to be posible.

Hope some else can help out too.

Martin

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Average Without Zeroes

Thanks anyway

Can you think of any way to work around this as i cannot use the
inbetween field without alot of work due to the number of times this
calculation would be used.

Thanks

Tom



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Average Without Zeroes

Possibly with

=Average(if(isnumer(AA207:AA1000)*(AA207:AA1000<0 ),AA207:AA1000))

Entered with Ctrl+shift+enter since this is an Array formula

If you want to average all numeric values not zero in your range (cells to
be skipped would be blank or contain text).

--
Regards,
Tom Ogilvy


"tom" wrote:

Thanks anyway

Can you think of any way to work around this as i cannot use the
inbetween field without alot of work due to the number of times this
calculation would be used.

Thanks

Tom


  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Average Without Zeroes

Great help

Thanks Very Much

Tom

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
disregarding zeroes Sapper Excel Discussion (Misc queries) 4 April 27th 09 02:28 PM
Can you eliminate zeroes JimS Excel Discussion (Misc queries) 2 April 21st 09 08:47 AM
Can I set the default for "show zeroes" to not show the zeroes? jeel Setting up and Configuration of Excel 1 January 25th 08 07:18 PM
F5 function for zeroes? Lee Harris Excel Worksheet Functions 3 November 22nd 05 10:24 PM
Leading Zeroes Ken Excel Discussion (Misc queries) 1 October 7th 05 03:17 PM


All times are GMT +1. The time now is 09:27 AM.

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

About Us

"It's about Microsoft Excel"