Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Coal Miner
 
Posts: n/a
Default Average, Excluding Zeros, Non-Consecutive Range

I am trying to average a range of numbers (F35:F38,F42:F45,F48:F54) that have
numeric zeros in some of the cells. However, I would like to exclude them,
and the cells from the calculation.

Why does this array not work?

=AVERAGE(IF((F35:F38,F42:F45,F48:F54)<0,(F35:F38, F42:F45,F48:F54)))
  #2   Report Post  
Domenic
 
Posts: n/a
Default

Try...

=AVERAGE(IF((1-ISNUMBER(MATCH(ROW(F35:F54),{39,40,41,46,47},0)))* (F35:F54
0),F35:F54))


....confirmed with CONTROL+SHIFT+ENTER, not just ENTER.

Hope this helps!

In article ,
"Coal Miner" <Coal wrote:

I am trying to average a range of numbers (F35:F38,F42:F45,F48:F54) that have
numeric zeros in some of the cells. However, I would like to exclude them,
and the cells from the calculation.

Why does this array not work?

=AVERAGE(IF((F35:F38,F42:F45,F48:F54)<0,(F35:F38, F42:F45,F48:F54)))

  #3   Report Post  
Coal Miner
 
Posts: n/a
Default

OK! That worked great on some of the data rows but for some reason some of
the data rows are returning the #DIV/0! error. What the heck?!?!

"Domenic" wrote:

Try...

=AVERAGE(IF((1-ISNUMBER(MATCH(ROW(F35:F54),{39,40,41,46,47},0)))* (F35:F54
0),F35:F54))


....confirmed with CONTROL+SHIFT+ENTER, not just ENTER.

Hope this helps!

In article ,
"Coal Miner" <Coal wrote:

I am trying to average a range of numbers (F35:F38,F42:F45,F48:F54) that have
numeric zeros in some of the cells. However, I would like to exclude them,
and the cells from the calculation.

Why does this array not work?

=AVERAGE(IF((F35:F38,F42:F45,F48:F54)<0,(F35:F38, F42:F45,F48:F54)))


  #4   Report Post  
Domenic
 
Posts: n/a
Default

You'll get that error if none of the target cells contain a value
greater than zero. In this case, the following formula will return a
blank...

=IF(INDEX(FREQUENCY((F35:F38,F42:F45,F48:F54),0),2 ),AVERAGE(IF((1-ISNUMBE
R(MATCH(ROW(F35:F54),{39,40,41,46,47},0)))*(F35:F5 40),F35:F54)),"")

Hope this helps!

In article ,
"Coal Miner" wrote:

OK! That worked great on some of the data rows but for some reason some of
the data rows are returning the #DIV/0! error. What the heck?!?!

"Domenic" wrote:

Try...

=AVERAGE(IF((1-ISNUMBER(MATCH(ROW(F35:F54),{39,40,41,46,47},0)))* (F35:F54
0),F35:F54))


....confirmed with CONTROL+SHIFT+ENTER, not just ENTER.

Hope this helps!

In article ,
"Coal Miner" <Coal wrote:

I am trying to average a range of numbers (F35:F38,F42:F45,F48:F54) that
have
numeric zeros in some of the cells. However, I would like to exclude
them,
and the cells from the calculation.

Why does this array not work?

=AVERAGE(IF((F35:F38,F42:F45,F48:F54)<0,(F35:F38, F42:F45,F48:F54)))


  #5   Report Post  
Coal Miner
 
Posts: n/a
Default

Domenic,

Thanks alot. That did fix the problem when none of the target cells
contained a value greater than zero. However, I am still getting the #DIV/0!
error in some cells. I checked to make sure formatting was correct. I
removed the "1-" portion of the formula (located immediately prior to
ISNUMBER) and this allows the formula to work in the cells that were
returning the #DIV/0!. But, that formula will now return the #DIV/0! error
in the other cells that were working correctly. What is the purpose of the
"1-" text within the formula. Maybe if I understand that I could repair
myself.

Please help as this is frustrating.

"Domenic" wrote:

You'll get that error if none of the target cells contain a value
greater than zero. In this case, the following formula will return a
blank...

=IF(INDEX(FREQUENCY((F35:F38,F42:F45,F48:F54),0),2 ),AVERAGE(IF((1-ISNUMBE
R(MATCH(ROW(F35:F54),{39,40,41,46,47},0)))*(F35:F5 40),F35:F54)),"")

Hope this helps!

In article ,
"Coal Miner" wrote:

OK! That worked great on some of the data rows but for some reason some of
the data rows are returning the #DIV/0! error. What the heck?!?!

"Domenic" wrote:

Try...

=AVERAGE(IF((1-ISNUMBER(MATCH(ROW(F35:F54),{39,40,41,46,47},0)))* (F35:F54
0),F35:F54))

....confirmed with CONTROL+SHIFT+ENTER, not just ENTER.

Hope this helps!

In article ,
"Coal Miner" <Coal wrote:

I am trying to average a range of numbers (F35:F38,F42:F45,F48:F54) that
have
numeric zeros in some of the cells. However, I would like to exclude
them,
and the cells from the calculation.

Why does this array not work?

=AVERAGE(IF((F35:F38,F42:F45,F48:F54)<0,(F35:F38, F42:F45,F48:F54)))




  #6   Report Post  
Domenic
 
Posts: n/a
Default

Try the following formula instead...

=IF(INDEX(FREQUENCY((F35:F38,F42:F45,F48:F54),0),2 ),AVERAGE(IF((1-ISNUMBE
R(MATCH(ROW(F35:F54)-ROW(F35)+1,{5,6,7,12,13},0)))*(F35:F540),F35:F54) ),
"")

....confirmed with CONTROL+SHIFT+ENTER, not just ENTER. Does this help?

In article ,
"Coal Miner" wrote:

Domenic,

Thanks alot. That did fix the problem when none of the target cells
contained a value greater than zero. However, I am still getting the #DIV/0!
error in some cells. I checked to make sure formatting was correct. I
removed the "1-" portion of the formula (located immediately prior to
ISNUMBER) and this allows the formula to work in the cells that were
returning the #DIV/0!. But, that formula will now return the #DIV/0! error
in the other cells that were working correctly. What is the purpose of the
"1-" text within the formula. Maybe if I understand that I could repair
myself.

Please help as this is frustrating.

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
average of visible cells in a filtered range dave roth Excel Worksheet Functions 5 May 23rd 05 12:56 PM
Average non continguous cells, excluding zero's Keithlearn Excel Worksheet Functions 2 April 27th 05 01:22 PM
Can I sum or average a range with more than 1 condition? BobT Excel Discussion (Misc queries) 4 February 14th 05 07:28 PM
EXcluding Zeros from the average in a row Geo Excel Discussion (Misc queries) 4 December 31st 04 04:07 PM
Can you average data in 1 column based on a range of values in another? kman24 Excel Worksheet Functions 2 November 17th 04 02:09 PM


All times are GMT +1. The time now is 07:28 PM.

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"