Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Mikewoodmsw
 
Posts: n/a
Default how do I get AVERAGE to ingore a zero value cell

I am using the AVERAGE function but if i have two cells where one is "0" how
do I get it to preserve the first value rather than halving it?
E.G
what I need it to do is:
3+3 = 6, average score = 3
5+0 = 5 average score = 5
  #2   Report Post  
Ola
 
Posts: n/a
Default

Try this:
=SUMIF(A1:A5,"<0")/COUNTIF(A1:A5,"<0")

Ola Sandstrom

  #3   Report Post  
Myrna Larson
 
Posts: n/a
Default

=IF(COUNTIF(A1:B1,0)<0,SUM(A1:B1),AVERAGE(A1:B1))

or, if you need to extend this across more columns:

=SUM(A1:K1)/COUNTIF(A1:K1,"<0")

or an array formula (enter with CTRL+SHIFT+ENTER):

=AVERAGE(IF(A1:K1<0,A1:K1))


On Sat, 22 Jan 2005 10:05:04 -0800, "Mikewoodmsw"
wrote:

I am using the AVERAGE function but if i have two cells where one is "0" how
do I get it to preserve the first value rather than halving it?
E.G
what I need it to do is:
3+3 = 6, average score = 3
5+0 = 5 average score = 5


  #4   Report Post  
Bob Phillips
 
Posts: n/a
Default

Mike,

Use

=AVERAGE(IF(A1:A100,A1:A10))

which is an array formula, so commit with Ctrl-Shift-Enter

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Mikewoodmsw" wrote in message
...
I am using the AVERAGE function but if i have two cells where one is "0"

how
do I get it to preserve the first value rather than halving it?
E.G
what I need it to do is:
3+3 = 6, average score = 3
5+0 = 5 average score = 5



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
Using The Average Function if a cell has NA carl Excel Worksheet Functions 6 May 21st 23 07:46 PM
inserting data from a row to a cell, when the row number is specified by a formula in a cell [email protected] New Users to Excel 2 January 6th 05 07:18 AM
Addition to Turn cell red if today is greater or equal to date in cell Rich New Users to Excel 2 December 9th 04 02:06 AM
GET.CELL Biff Excel Worksheet Functions 2 November 24th 04 07:16 PM
VLookup resulting in a blank cell... KempensBoerke Excel Worksheet Functions 1 October 28th 04 09:57 PM


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