#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default AVG Formula

I am looking to write an AVG function that doesn't count
cells with zero's in it. The information is all in one
column. Some cells just habve no info. Can anyone help?


Thanks,
Steve
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,253
Default AVG Formula

Steve:
does this work for you?
=SUMIF(A2:A5,"<0")/COUNTIF(A2:A5,"<0")

keepITcool

< email : keepitcool chello nl (with @ and .)
< homepage: http://members.chello.nl/keepitcool


"Steve" wrote:

I am looking to write an AVG function that doesn't count
cells with zero's in it. The information is all in one
column. Some cells just habve no info. Can anyone help?


Thanks,
Steve


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 141
Default AVG Formula

my number come out way low.
-----Original Message-----
Steve:
does this work for you?
=SUMIF(A2:A5,"<0")/COUNTIF(A2:A5,"<0")

keepITcool

< email : keepitcool chello nl (with @ and .)
< homepage: http://members.chello.nl/keepitcool


"Steve" wrote:

I am looking to write an AVG function that doesn't

count
cells with zero's in it. The information is all in one
column. Some cells just habve no info. Can anyone help?


Thanks,
Steve


.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,253
Default AVG Formula

hmm.. doesnt work great with empty cells, does it?
try:

{=SUM(A$1:$A$5)/COUNT(IF(A$1:$A$5=0,"",A$1:$A$5))}


it's an array formula:
enter without the {} but close with ctrl-shift-enter
you'll see the {} in the formula bar.



keepITcool

< email : keepitcool chello nl (with @ and .)
< homepage: http://members.chello.nl/keepitcool


"Steve" wrote:

my number come out way low.
-----Original Message-----
Steve:
does this work for you?
=SUMIF(A2:A5,"<0")/COUNTIF(A2:A5,"<0")

keepITcool

< email : keepitcool chello nl (with @ and .)
< homepage: http://members.chello.nl/keepitcool


"Steve" wrote:

I am looking to write an AVG function that doesn't

count
cells with zero's in it. The information is all in one
column. Some cells just habve no info. Can anyone help?


Thanks,
Steve


.



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,651
Default AVG Formula

On Thu, 1 Jul 2004 16:53:41 -0700, "Steve" wrote:

I am looking to write an AVG function that doesn't count
cells with zero's in it. The information is all in one
column. Some cells just habve no info. Can anyone help?


Thanks,
Steve


Use the array formula:

=AVERAGE(IF(rng<0,rng))

To enter an array formula, hold down <ctrl<shift while hitting <enter. XL
will place brackets {...} around the formula.


--ron


  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 837
Default AVG Formula

Or .../(COUTIF(range,"0")+COUNTIF(range,"<0"))

Jerry

keepITcool wrote:

hmm.. doesnt work great with empty cells, does it?
try:

{=SUM(A$1:$A$5)/COUNT(IF(A$1:$A$5=0,"",A$1:$A$5))}


it's an array formula:
enter without the {} but close with ctrl-shift-enter
you'll see the {} in the formula bar.



keepITcool

< email : keepitcool chello nl (with @ and .)
< homepage: http://members.chello.nl/keepitcool


"Steve" wrote:


my number come out way low.

-----Original Message-----
Steve:
does this work for you?
=SUMIF(A2:A5,"<0")/COUNTIF(A2:A5,"<0")

keepITcool

< email : keepitcool chello nl (with @ and .)
< homepage: http://members.chello.nl/keepitcool


"Steve" wrote:


I am looking to write an AVG function that doesn't

count

cells with zero's in it. The information is all in one
column. Some cells just habve no info. Can anyone help?


Thanks,
Steve


.




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
Commenting custom formula fields/formula on formula editor Muxer Excel Programming 2 July 24th 03 01:02 AM


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