Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
grinlrar
 
Posts: n/a
Default What is wrong with this formula?

I am trying too average some test scores and sometimes one of those numbers
can be zero. I read that the AVERAGE function will ignore blank cells, so I
tried to use an IF statement to change the zeros to blank cells. Here is what
I tried.
=AVERAGE(IF(D109:F109=0,"",D109:F109))
Any help would be greatly appreciated.
Thanks
Greg Ruff
  #2   Report Post  
Duke Carey
 
Posts: n/a
Default

Enter as an array (Ctrl-Shift-Enter)

=AVERAGE(IF(D109:F1090,D109:F109))

"grinlrar" wrote:

I am trying too average some test scores and sometimes one of those numbers
can be zero. I read that the AVERAGE function will ignore blank cells, so I
tried to use an IF statement to change the zeros to blank cells. Here is what
I tried.
=AVERAGE(IF(D109:F109=0,"",D109:F109))
Any help would be greatly appreciated.
Thanks
Greg Ruff

  #3   Report Post  
Anirudh
 
Posts: n/a
Default

Hi grinlrar,

Pls try this
=SUMIF(D109:F109,"0",D109:F109)/COUNTIF(D109:F109,"0")

"grinlrar" wrote:

I am trying too average some test scores and sometimes one of those numbers
can be zero. I read that the AVERAGE function will ignore blank cells, so I
tried to use an IF statement to change the zeros to blank cells. Here is what
I tried.
=AVERAGE(IF(D109:F109=0,"",D109:F109))
Any help would be greatly appreciated.
Thanks
Greg Ruff

  #4   Report Post  
pknivens
 
Posts: n/a
Default


This is simple and not sure if it is what you are looking for but
anyway.

=SUM(G1:G20)/20

Assuming that your test scores are in column G and you only have 20
scores.
this will account for the Zeros also


--
pknivens
------------------------------------------------------------------------
pknivens's Profile: http://www.excelforum.com/member.php...o&userid=27675
View this thread: http://www.excelforum.com/showthread...hreadid=472055

  #5   Report Post  
grinlrar
 
Posts: n/a
Default

Thanks for everyone's help. Actually I realized the formula is working except
if all three numbers that it is trying to average are zeros, so you get the
Divided by zero error.
I put this project together several months ago and am just now picking it
back up again so it is hard to remember what I was thinking back then.
I can live with the errors on the individual spreadsheets because I know
that it is actutally a zero. My problem now, is that the data from many
spreadsheets are averaged together to give an office wide percentage and if
one contains an error, it creates an error in the office wide spreadsheet.
Is there a way to make it ignore an error cell in a group of cells that are
being averaged together?

"grinlrar" wrote:

I am trying too average some test scores and sometimes one of those numbers
can be zero. I read that the AVERAGE function will ignore blank cells, so I
tried to use an IF statement to change the zeros to blank cells. Here is what
I tried.
=AVERAGE(IF(D109:F109=0,"",D109:F109))
Any help would be greatly appreciated.
Thanks
Greg Ruff



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
adding row to forumla carrera Excel Discussion (Misc queries) 9 August 23rd 05 10:24 PM
Formula retrieves wrong data Newmoon Excel Discussion (Misc queries) 2 August 11th 05 04:02 PM
Recalculating Formula - Getting the wrong answers skherzog Excel Discussion (Misc queries) 2 June 29th 05 12:31 PM
Wrong answer after using the payment formula in excel punkyh New Users to Excel 8 April 28th 05 07:56 PM
What wrong with VLOOKUP formula TARZAN Excel Worksheet Functions 2 January 31st 05 10:09 PM


All times are GMT +1. The time now is 12:41 AM.

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"