If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Microsoft Excel > a problem of average formula

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-13-05, 22:02
cuongvt cuongvt is offline
Registered User
 
Join Date: May 2004
Posts: 133
Red face a problem of average formula

I'm facing a problem about average formula that I can not solve at the moment but I know it's quite simple for you.
My excel table is as follow:
a1 b1 c1 d1 e1 f1
0 3 2 0 5 =average(a1:e1)

the problem is I want to average only cells that is greater than 0 (the result must be 3.33, not 2)

Could anyone help me to solve above problem
thanks in advanced.
Reply With Quote
  #2 (permalink)  
Old 01-13-05, 23:10
shades shades is offline
Registered User
 
Join Date: Oct 2003
Posts: 1,091
If only positive numbers and zero will be entered, then use this:

=SUM(A1:E1)/COUNTIF(A1:E1,">0")

If negative numbers can also be used, then use this:

=SUM(A1:E1)/COUNTIF(A1:E1,"<>0")
__________________
old, slow, and confused
but at least I'm inconsistent!

Rich
(retired Excel 2003 user, 3/28/2008)

How to ask a question on forums
Reply With Quote
  #3 (permalink)  
Old 01-14-05, 02:20
cuongvt cuongvt is offline
Registered User
 
Join Date: May 2004
Posts: 133
it works for me. thank you very much
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On