Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default How do I exclude zero's from an average of five non-adjacent cells

I am trying to average the values in several non-adjacent cells in a row, and
a number of them contain zero values. How do I exclude the zero values from
the average? They are non-adjacent, or not in a specific range (e.g., they
may be in cells A2, C2, F2, J2, L2).
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default How do I exclude zero's from an average of five non-adjacent cells

How about:
=SUM(A2:L2)/(COUNTIF(A2:L2,"<" & 0)-COUNTBLANK(A2:L2))

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 364
Default How do I exclude zero's from an average of five non-adjacent cells

this may work, you didn't specilfy if there were or weren't any other
numbers in the row that you didn't want in the average.

=SUMIF(A2:N2,"0")/MAX(1,COUNTIF(A2:N2,"0"))

--


Gary


"MikeG" wrote in message
...
I am trying to average the values in several non-adjacent cells in a row,
and
a number of them contain zero values. How do I exclude the zero values
from
the average? They are non-adjacent, or not in a specific range (e.g., they
may be in cells A2, C2, F2, J2, L2).



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 cells that exclude conditional formats? AHartong Excel Worksheet Functions 5 August 7th 09 02:09 PM
Average non-adjacent cells & exclude zeros Danni2004 Excel Discussion (Misc queries) 3 September 18th 07 04:00 PM
Average Non-Continuous Cells Without Zero's raeleanne Excel Worksheet Functions 8 July 22nd 05 02:48 PM
Limit or Exclude cells in Average and Sum formula dagger Excel Worksheet Functions 3 July 7th 05 03:52 PM
Average non continguous cells, excluding zero's Keithlearn Excel Worksheet Functions 2 April 27th 05 01:22 PM


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